Skip to content

Commit

Permalink
Fix pre commit stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
TLNBS2405 committed Mar 13, 2024
1 parent e4b8d09 commit 993901b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/heihachi/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ async def on_ready(self) -> None:
self.add_view(button.DoneButton(action_channel))
logger.info(f"Logged on as {self.user}")

def _character_command_factory(self, name: str):
def _character_command_factory(self, name: str) -> Callable[[Interaction, str], Coroutine[Any, Any, None]]:
async def command(interaction: discord.Interaction, move: str) -> None:
if not (self._is_user_blacklisted(str(interaction.user.id)) or self._is_author_newly_created(interaction)):
logger.info(f"Received character command from {interaction.user.name} in {interaction.guild}: /fd {name} {move}")
logger.info(
f"Received character command from {interaction.user.name} in {interaction.guild}: /fd {name} {move}"
)
embed = get_frame_data_embed(self.framedb, self.frame_service, name, move)

await interaction.response.defer()
Expand Down Expand Up @@ -129,7 +131,6 @@ async def _frame_data_cmd(interaction: discord.Interaction, character: str, move
await interaction.response.defer()
await asyncio.sleep(0)
await interaction.followup.send(embed=embed, ephemeral=False)


if self.config.feedback_channel_id and self.config.action_channel_id:

Expand Down

0 comments on commit 993901b

Please sign in to comment.