From e148e04a87ae5f13d61b05e61810065da656feef Mon Sep 17 00:00:00 2001 From: Ave Ozkal Date: Thu, 27 Dec 2018 15:20:18 +0300 Subject: [PATCH] Drop requirement for the first whitelisted guild to be the one containing log channel --- Robocop.py | 4 ++-- config.py.template | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Robocop.py b/Robocop.py index 92a667e..c5c4be0 100755 --- a/Robocop.py +++ b/Robocop.py @@ -83,8 +83,8 @@ async def on_ready(): game_name = f"{config.prefixes[0]}help" # Send "Robocop has started! x has y members!" - guild = discord.utils.get(bot.guilds, id=config.guild_whitelist[0]) - log_channel = guild.get_channel(config.log_channel) + log_channel = bot.get_channel(config.log_channel) + guild = log_channel.guild msg = f"{bot.user.name} has started! "\ f"{guild.name} has {guild.member_count} members!" diff --git a/config.py.template b/config.py.template index e05298c..328449e 100644 --- a/config.py.template +++ b/config.py.template @@ -17,8 +17,6 @@ embed_desc = "Robocop-NG is developed by [Ave](https://github.com/aveao)"\ # Minimum account age required to join the discord min_age = datetime.timedelta(minutes=15) -# IMPORTANT: It's assumed that the first guild here -# is the one containing log_channel guild_whitelist = [ 526372255052201993, # NotSwitched discord 269333940928512010 # ReSwitched discord