Add break readout for the bot-aux
All checks were successful
Test Helper Module / test (3.11.5) (push) Successful in 2m9s
Test Helper Module / test (3.11.5) (pull_request) Successful in 1m35s

This commit is contained in:
2025-12-22 11:01:28 -06:00
parent 33e5df4dfe
commit bbe1c0aec6

View File

@@ -36,11 +36,22 @@ async def on_ready():
print(f'{client.user} has connected.')
print(args.guild_id)
guild: discord.Guild = client.get_guild(args.guild_id)
channel: discord.TextChannel = guild.get_channel(args.channel_id)
callouts = DATABASE_CONN.query_callouts(NUMBER_OF_DAYS)
formatted_callouts = DATABASE_CONN.formatted_list_of_callouts(callouts)
output = f'Callouts for the next {NUMBER_OF_DAYS} days:\n' + formatted_callouts
output += '\n\n'
output += f'Breaks for the next {NUMBER_OF_DAYS} days:\n'
breaks: str = DATABASE_CONN.query_breaks(NUMBER_OF_DAYS)
formatted_breaks: str = DATABASE_CONN.formatted_list_of_breaks(breaks)
output += formatted_breaks
await channel.send(output)
await client.close() # Another way to exit, a little bit cleaner than exit(0)
return