Enhancement: bot_core breaks() now uses a formatted list
This commit is contained in:
@@ -322,7 +322,10 @@ async def breaks(interaction: discord.Interaction, days: int = 365) -> None:
|
|||||||
delete_invalidate()
|
delete_invalidate()
|
||||||
cleanup_invalidate()
|
cleanup_invalidate()
|
||||||
await interaction.response.defer(thinking=True)
|
await interaction.response.defer(thinking=True)
|
||||||
await interaction.followup.send(str(DATABASE_CONN.query_breaks()))
|
breaks: list = DATABASE_CONN.query_breaks(days=days)
|
||||||
|
break_output: str = DATABASE_CONN.format_list_of_breaks(breaks=breaks)
|
||||||
|
await interaction.followup.send(f'Breaks for the next {days} days:\n{break_output}')
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
@client.tree.command()
|
@client.tree.command()
|
||||||
|
|||||||
Reference in New Issue
Block a user