Add check for when there's no tables to delete

main
sgoudham 3 years ago
parent 2ec0cbb9f7
commit edf5a0ba1f
Signed by: hammy
GPG Key ID: 44E818FD5457EEA4

@ -117,6 +117,10 @@ class Tournament(interactions.Extension):
success, all_tournaments = Database.view_all_tournaments() success, all_tournaments = Database.view_all_tournaments()
tables = [table[0] for table in all_tournaments[1:]] tables = [table[0] for table in all_tournaments[1:]]
if not tables:
await ctx.send("No Tables To Delete!")
return
menu = interactions.SelectMenu( menu = interactions.SelectMenu(
custom_id="tournament_deletes_menu", custom_id="tournament_deletes_menu",
options=[interactions.SelectOption(label=table, value=table) for table in tables], options=[interactions.SelectOption(label=table, value=table) for table in tables],

Loading…
Cancel
Save