fix: hopefully made custom emojis work again

This commit is contained in:
Seaswimmer 2023-08-08 10:59:25 -04:00
parent b1dbdd06dc
commit dab65b2794
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -130,7 +130,11 @@ class Galaxy(commands.Cog):
await interaction.response.send_message(embed=embed) await interaction.response.send_message(embed=embed)
else: else:
emoji_id = self.extract_id(input_string=emoji) emoji_id = self.extract_id(input_string=emoji)
emoji_obj = self.bot.get_emoji(emoji_id) for guild in self.bot.guilds:
emoji_to_find = discord.utils.get(guild.emojis, id=emoji_id)
if emoji_to_find:
emoji_obj = emoji_to_find
break
if emoji_obj is None: if emoji_obj is None:
await interaction.response.send_message(content=f"You're trying to set the coco emoji to an emoji I don't have access to!\n{emoji_id}", ephemeral=True) await interaction.response.send_message(content=f"You're trying to set the coco emoji to an emoji I don't have access to!\n{emoji_id}", ephemeral=True)
return return