Skip to content

Commit

Permalink
Fix precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
TLNBS2405 committed Mar 24, 2024
1 parent 742d034 commit 4f3d60b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/heihachi/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

class FrameDataBot(discord.Client):
def __init__(
self,
framedb: FrameDb,
frame_service: FrameService,
config: Configurator,
self,
framedb: FrameDb,
frame_service: FrameService,
config: Configurator,
) -> None:
intents = discord.Intents.default()
intents.message_content = False
Expand Down Expand Up @@ -98,7 +98,7 @@ async def on_message(self, message: discord.Message) -> None:
logger.debug(f"Message from {message.author.name} in {message.guild} is not a valid command")

async def _character_name_autocomplete(
self, interaction: discord.Interaction, current: str
self, interaction: discord.Interaction, current: str
) -> List[discord.app_commands.Choice[str]]:
"""
Autocomplete function for character names
Expand All @@ -109,8 +109,8 @@ async def _character_name_autocomplete(
current = current.lower() # autocomplete is case-sensitive
choices = self.framedb.autocomplete.search(word=current, max_cost=3, size=3)
return [discord.app_commands.Choice(name=choice[0].title(), value=choice[0]) for choice in choices][
:25
] # Discord has a max choice number of 25 (https://github.com/Rapptz/discord.py/discussions/9241)
:25
] # Discord has a max choice number of 25 (https://github.com/Rapptz/discord.py/discussions/9241)

def _add_bot_commands(self) -> None:
"Add all frame commands to the bot"
Expand Down

0 comments on commit 4f3d60b

Please sign in to comment.