From 733c6470c7c43e107e142ef4a7e5c13281af6d9b Mon Sep 17 00:00:00 2001 From: Purpur <43528123+Pemigrade@users.noreply.github.com> Date: Sun, 10 Jan 2021 05:05:53 -0600 Subject: [PATCH] Update linking.py --- cogs/linking.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cogs/linking.py b/cogs/linking.py index 08d5b81..10a9fb7 100644 --- a/cogs/linking.py +++ b/cogs/linking.py @@ -16,8 +16,12 @@ class Linking(commands.Cog): self.bot = bot async def link_account(self, message): - guild_id = int(os.getenv('guild_id')) - print(str(guild_id)) + try: + guild_id + print(str(guild_id) + "exists") + except NameError: + guild_id=int(os.getenv('guild_id') + print(str(guild_id) + "created") if message.author != self.bot.user and message.guild == None: channel = message.channel await channel.send("Processing, please wait...")