use set for webhook ids
This commit is contained in:
parent
abef3a122d
commit
9936b5cec8
1 changed files with 2 additions and 2 deletions
4
main.py
4
main.py
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue