Skip to content

Commit 245a3b8

Browse files
committed
Change if not to explicit None check in _translated methods
1 parent 365e212 commit 245a3b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

twitchio/ext/commands/context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ async def send_translated(self, content: str, *, me: bool = False, langcode: str
607607
except Exception as e:
608608
raise TranslatorError(f"An exception occurred fetching a language code for '{invoked}'.", original=e) from e
609609

610-
if not code:
610+
if code is None:
611611
return await self.channel.send_message(sender=self.bot.bot_id, message=new)
612612

613613
try:
@@ -735,7 +735,7 @@ async def reply_translated(self, content: str, *, me: bool = False, langcode: st
735735
except Exception as e:
736736
raise TranslatorError(f"An exception occurred fetching a language code for '{invoked}'.", original=e) from e
737737

738-
if not code:
738+
if code is None:
739739
return await self.channel.send_message(sender=self.bot.bot_id, message=new, reply_to_message_id=self._payload.id)
740740

741741
try:

0 commit comments

Comments
 (0)