From d8ec75701dc567f458ebd42efe29f5a031272996 Mon Sep 17 00:00:00 2001 From: bobloy Date: Fri, 21 Aug 2020 17:29:54 -0400 Subject: [PATCH] Problem with invites still, panic --- stealemoji/stealemoji.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stealemoji/stealemoji.py b/stealemoji/stealemoji.py index 5a08265..2ee68eb 100644 --- a/stealemoji/stealemoji.py +++ b/stealemoji/stealemoji.py @@ -1,3 +1,4 @@ +import asyncio import logging from typing import Union @@ -232,7 +233,13 @@ class StealEmoji(Cog): await self.config.autobank.set(False) log.exception("Unable to create guilds, disabling autobank") return + async with self.config.guildbanks() as guildbanks: + guildbanks.append(guildbank.id) + + await asyncio.sleep(2) + invite = await guildbank.text_channels[0].create_invite() + await self.bot.send_to_owners(invite) log.info(f"Guild created id {guildbank.id}. Invite: {invite}") else: