Skip to content

Commit

Permalink
update and run ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
AbstractUmbra committed Jul 31, 2024
1 parent 71a48f3 commit f3e2da3
Show file tree
Hide file tree
Showing 5 changed files with 137 additions and 129 deletions.
5 changes: 1 addition & 4 deletions core/utils/paginator.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,7 @@ async def stop_pages(self, interaction: discord.Interaction | None = None) -> No
stop = stop_pages # type: ignore

def _check(self, interaction: discord.Interaction) -> bool:
if interaction.user.id != self.author.id:
return False

return True
return interaction.user.id == self.author.id

async def interaction_check(self, interaction: discord.Interaction) -> bool:
resp = self._check(interaction)
Expand Down
1 change: 1 addition & 0 deletions launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ async def main() -> None:
tasks.add(asyncio.create_task(bot.start(core.CONFIG["TOKENS"]["bot"])))
await server.serve()


try:
asyncio.run(main())
except KeyboardInterrupt:
Expand Down
5 changes: 1 addition & 4 deletions modules/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@ def predicate(ctx: Context) -> bool:
if not isinstance(channel, discord.Thread):
return False

if channel.parent_id != Channels.HELP_FORUM:
return False

return True
return channel.parent_id == Channels.HELP_FORUM

return commands.check(predicate)

Expand Down
Loading

0 comments on commit f3e2da3

Please sign in to comment.