Skip to content

[FAQ] upload guild emoji

Housa Hitomi edited this page Nov 3, 2022 · 1 revision

snippet:

@bot.command()
async def foo(m: Message, b: Bot):
    g = m.ctx.guild
    emo = await g.create_emoji(open('/path/to/file.png', 'rb'))
    await m.ctx.channel.send(f'[:{emo["name"]}:{emo["id"]}]')

remind: emoji file is required to be .png format

Clone this wiki locally