Update guild listener command to new data classes.

This commit is contained in:
alwayscompiling
2022-08-02 21:23:16 -04:00
parent 80f3966d39
commit 3fac5f7a06
+2 -2
View File
@@ -17,7 +17,7 @@ class GuildListener(commands.Cog, name="Guild Listener"):
@commands.Cog.listener()
async def on_guild_join(self, guild: nextcord.Guild):
"""Listener for Guild Join. Creates skeleton for new guild joined and saves it."""
highscores_data.add_new_server(guild.id)
highscores_data.add_guild(guild.id)
welcome_message: str = "Hello, I keep track of Highscores for you!"
welcome_message += " Currently only supporting RuneScape boss highscores,"
@@ -30,7 +30,7 @@ class GuildListener(commands.Cog, name="Guild Listener"):
async def on_guild_remove(self, guild: nextcord.Guild):
"""Listener for Guild Remove. Removes data from highscores_data."""
print(f"Removing data for guild {guild.name} (id {guild.id}).")
highscores_data.remove_guild(guild.id, guild.name)
highscores_data.remove_guild(guild.id)
# This function will be called when this extension is loaded.