Skip to content

Commit 7726e5c

Browse files
committed
Fix custom emoji sync failing if emojis already exist
1 parent 0417952 commit 7726e5c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bot/src/ghutils/core/bot.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,12 @@ async def fetch_custom_emojis(self):
159159

160160
async def sync_custom_emojis(self):
161161
logger.info("Syncing/uploading custom emojis")
162+
162163
self._custom_emoji.clear()
164+
165+
for emoji in await self.fetch_application_emojis():
166+
await emoji.delete()
167+
163168
for custom_emoji in CustomEmoji:
164169
self._custom_emoji[custom_emoji] = await self.create_application_emoji(
165170
name=custom_emoji.name,

0 commit comments

Comments
 (0)