Changed send_highscore_message to take guild rather than channel.

This commit is contained in:
alwayscompiling
2022-12-08 13:02:39 -05:00
parent a9b889234a
commit f468a028d0
4 changed files with 12 additions and 29 deletions
+3 -3
View File
@@ -120,7 +120,7 @@ class DeleteCog(commands.Cog, name="Table Management"):
stmt = select(CategoryGroup).where(CategoryGroup.GroupId.in_(group_ids))
for group in session.scalars(stmt):
await send_highscore_message(session, interaction.guild.get_channel(group.ChannelId), group)
await send_highscore_message(session, interaction.guild, group)
await interaction.send(f'User "{user_name}" was removed from all tables.', ephemeral=True)
@@ -163,7 +163,7 @@ class DeleteCog(commands.Cog, name="Table Management"):
session.delete(session.scalar(stmt))
session.commit()
await send_highscore_message(session, interaction.guild.get_channel(group.ChannelId), group)
await send_highscore_message(session, interaction.guild, group)
await interaction.response.send_message(
f'User "{user_name}" removed from "{category_name}".', ephemeral=True
)
@@ -194,7 +194,7 @@ class DeleteCog(commands.Cog, name="Table Management"):
session.delete(score)
session.commit()
await send_highscore_message(session, interaction.guild.get_channel(group.ChannelId), group)
await send_highscore_message(session, interaction.guild, group)
await interaction.response.send_message(
f'User "{user_name}" removed from all categories in {group.GroupName}.', ephemeral=True
)