From 7a780eb9da5922d9871669592a80e2829eb72013 Mon Sep 17 00:00:00 2001 From: qwewqa <198e559dbd446d973355f415bdfa34@gmail.com> Date: Sat, 23 Jan 2021 15:31:27 -0500 Subject: [PATCH] set presence via bot constructor --- main.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 3f3b63f..4a19814 100644 --- a/main.py +++ b/main.py @@ -12,10 +12,9 @@ logging.basicConfig(level=logging.INFO) with open('config.json') as f: bot_token = json.load(f)['token'] - asset_manager = AssetManager('assets') -bot = D4DJBot(asset_manager, MasterFilterManager(asset_manager), command_prefix='!', case_insensitive=True) - +bot = D4DJBot(asset_manager, MasterFilterManager(asset_manager), command_prefix='!', case_insensitive=True, + activity=discord.Game(name='https://discord.gg/TThMwrAZTR')) bot.load_extension('miyu_bot.commands.cogs.card') bot.load_extension('miyu_bot.commands.cogs.event') @@ -26,7 +25,6 @@ bot.load_extension('miyu_bot.commands.cogs.utility') @bot.event async def on_ready(): logging.getLogger(__name__).info(f'Current server count: {len(bot.guilds)}') - await bot.change_presence(activity=discord.Game(name='https://discord.gg/TThMwrAZTR')) bot.run(bot_token)