set presence via bot constructor

pull/1/head
qwewqa 4 years ago
parent 4200658897
commit 7a780eb9da
  1. 6
      main.py

@ -12,10 +12,9 @@ logging.basicConfig(level=logging.INFO)
with open('config.json') as f: with open('config.json') as f:
bot_token = json.load(f)['token'] bot_token = json.load(f)['token']
asset_manager = AssetManager('assets') 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.card')
bot.load_extension('miyu_bot.commands.cogs.event') bot.load_extension('miyu_bot.commands.cogs.event')
@ -26,7 +25,6 @@ bot.load_extension('miyu_bot.commands.cogs.utility')
@bot.event @bot.event
async def on_ready(): async def on_ready():
logging.getLogger(__name__).info(f'Current server count: {len(bot.guilds)}') 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) bot.run(bot_token)

Loading…
Cancel
Save