diff --git a/discord_bot.py b/discord_bot.py index 42c6579..6cb6cc5 100644 --- a/discord_bot.py +++ b/discord_bot.py @@ -27,10 +27,6 @@ logger.info('start bot') # bot = discord.Bot(proxy='http://127.0.0.1:1235') bot = discord.Bot() -@bot.event -async def on_ready(): - logger.info(f"We have logged in as {bot.user}") - channel_id = 1152167937852055552 @tasks.loop(minutes=1) @@ -167,6 +163,8 @@ async def before_check_rank_changes(): @bot.event async def on_ready(): + logger.info(f"We have logged in as {bot.user}") + channel = bot.get_channel(channel_id) send_message.start(channel) heartbeat.start()