Problem with invites still, panic

pull/126/head
bobloy 4 years ago
parent 5693d690e1
commit d8ec75701d

@ -1,3 +1,4 @@
import asyncio
import logging import logging
from typing import Union from typing import Union
@ -232,7 +233,13 @@ class StealEmoji(Cog):
await self.config.autobank.set(False) await self.config.autobank.set(False)
log.exception("Unable to create guilds, disabling autobank") log.exception("Unable to create guilds, disabling autobank")
return return
async with self.config.guildbanks() as guildbanks:
guildbanks.append(guildbank.id)
await asyncio.sleep(2)
invite = await guildbank.text_channels[0].create_invite() invite = await guildbank.text_channels[0].create_invite()
await self.bot.send_to_owners(invite) await self.bot.send_to_owners(invite)
log.info(f"Guild created id {guildbank.id}. Invite: {invite}") log.info(f"Guild created id {guildbank.id}. Invite: {invite}")
else: else:

Loading…
Cancel
Save