use set for webhook ids

This commit is contained in:
git-bruh 2021-02-06 20:03:10 +05:30
parent abef3a122d
commit 9936b5cec8
No known key found for this signature in database
GPG key ID: E1475C50075ADCE6

View file

@ -232,7 +232,7 @@ class DiscordClient(discord.ext.commands.Bot):
self.channel_store = {} self.channel_store = {}
self.webhook_ids = [] self.webhook_ids = set()
self.ready = asyncio.Event() self.ready = asyncio.Event()
@ -261,7 +261,7 @@ class DiscordClient(discord.ext.commands.Bot):
if not hook: if not hook:
hook = await channel.create_webhook(name=hook_name) hook = await channel.create_webhook(name=hook_name)
self.webhook_ids.append(hook.id) self.webhook_ids.add(hook.id)
return hook return hook