Skip to content

Commit

Permalink
fixding type mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
Ereiarrus committed Feb 4, 2024
1 parent 0641289 commit e47c6e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/complements_bot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,8 @@ async def userid(self, ctx: commands.Context) -> None:
Get the twitch user's ID from their username
"""

userid: str = str(await self.name_to_id(self.isolate_args(ctx.message.content)))
userid = userid or await self.name_to_id(ctx.author.name)
userid: Optional[str] = await self.name_to_id(self.isolate_args(ctx.message.content))
userid = userid or (await self.name_to_id(ctx.author.name))

await ComplementsBot.cmd_body(
ctx,
Expand All @@ -604,7 +604,7 @@ async def username(self, ctx: commands.Context) -> None:
Get the twitch user's ID from their username
"""

username: str = str(await self.id_to_name(self.isolate_args(ctx.message.content)))
username: Optional[str] = await self.id_to_name(self.isolate_args(ctx.message.content))

await ComplementsBot.cmd_body(
ctx,
Expand Down

0 comments on commit e47c6e8

Please sign in to comment.