Turned on all ruff rules. Formatted all files.

This commit is contained in:
2024-05-22 15:06:39 -04:00
parent 3ac164ab65
commit 796b052bfc
18 changed files with 161 additions and 469 deletions
+3 -9
View File
@@ -17,9 +17,7 @@ class BotPresence(commands.Cog, name="Bot Presence"):
self.bot = bot
@commands.Cog.listener()
async def on_guild_join(
self, guild: nextcord.Guild
): # pylint: disable=unused-argument
async def on_guild_join(self, guild: nextcord.Guild): # pylint: disable=unused-argument
"""Listener for Guild Join. Updated presence on guild join."""
await self.change_presence()
@@ -39,10 +37,6 @@ class BotPresence(commands.Cog, name="Bot Presence"):
"""Randomly chooses a presence and updates bot's presence."""
with Session(engine) as session:
presence = session.scalar(
select(Presences.Presence).order_by(func.random())
)
presence = session.scalar(select(Presences.Presence).order_by(func.random()))
await self.bot.change_presence(
activity=nextcord.CustomActivity(name="Custom Status", state=presence)
)
await self.bot.change_presence(activity=nextcord.CustomActivity(name="Custom Status", state=presence))