refactor: Move on_ready event definition to a more appropriate location and restore logging functionality
This commit is contained in:
parent
e103e8706c
commit
44336e5ff0
@ -27,10 +27,6 @@ logger.info('start bot')
|
|||||||
# bot = discord.Bot(proxy='http://127.0.0.1:1235')
|
# bot = discord.Bot(proxy='http://127.0.0.1:1235')
|
||||||
bot = discord.Bot()
|
bot = discord.Bot()
|
||||||
|
|
||||||
@bot.event
|
|
||||||
async def on_ready():
|
|
||||||
logger.info(f"We have logged in as {bot.user}")
|
|
||||||
|
|
||||||
channel_id = 1152167937852055552
|
channel_id = 1152167937852055552
|
||||||
|
|
||||||
@tasks.loop(minutes=1)
|
@tasks.loop(minutes=1)
|
||||||
@ -167,6 +163,8 @@ async def before_check_rank_changes():
|
|||||||
|
|
||||||
@bot.event
|
@bot.event
|
||||||
async def on_ready():
|
async def on_ready():
|
||||||
|
logger.info(f"We have logged in as {bot.user}")
|
||||||
|
|
||||||
channel = bot.get_channel(channel_id)
|
channel = bot.get_channel(channel_id)
|
||||||
send_message.start(channel)
|
send_message.start(channel)
|
||||||
heartbeat.start()
|
heartbeat.start()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user