Turned on all ruff rules. Formatted all files.
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user