Compare commits

...

3 Commits

Author SHA1 Message Date
733563d243 Merge pull request 'Add break readout for the bot-aux' (#2) from gabby-dev into main
All checks were successful
test and deploy / test (3.11.5) (push) Successful in 1m45s
test and deploy / push-and-build (push) Successful in 33s
Reviewed-on: #2
2025-12-23 13:15:05 +00:00
a32eb42998 Merge branch 'main' into gabby-dev
All checks were successful
Test Helper Module / test (3.11.5) (push) Successful in 1m44s
2025-12-23 13:12:44 +00:00
bbe1c0aec6 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
2025-12-22 11:01:28 -06:00

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