1
0
Fork 0
mirror of https://github.com/uhIgnacio/EmoteManager.git synced 2024-08-15 02:23:13 +00:00

fix EmoteClient.create() not returning an emoji

This would manifest as the bot saying, for example:

Emote {'name': 'AkkoLewd', 'roles': [], 'id': '857107131931951145', 'require_colons': True, 'managed': False, 'animated': True, 'available': True} successfully created as a GIF.
This commit is contained in:
io 2021-06-23 04:21:11 +00:00
parent 437a35bd05
commit f508085e29
2 changed files with 15 additions and 14 deletions

View file

@ -76,7 +76,7 @@ class Emotes(commands.Cog):
+ self.bot.http.user_agent
})
self.emote_client = EmoteClient(token=self.bot.config['tokens']['discord'])
self.emote_client = EmoteClient(self.bot)
with open('data/ec-emotes-final.json') as f:
self.ec_emotes = json.load(f)
@ -444,7 +444,7 @@ class Emotes(commands.Cog):
image_data = await utils.image.resize_in_subprocess(image_data)
if reason is None:
reason = 'Created by ' + utils.format_user(self.bot, author_id)
return await self.emote_client.create(guild_id=guild.id, name=name, image=image_data, reason=reason)
return await self.emote_client.create(guild=guild, name=name, image=image_data, reason=reason)
@commands.command(aliases=('delete', 'delet', 'rm'))
async def remove(self, context, emote, *emotes):