Skip to content

Commit 77f8c37

Browse files
authored
command encode to UTF8
Error : UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal command change to utf8.
1 parent d190ece commit 77f8c37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

telegram/ext/commandhandler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def check_update(self, update):
145145
else:
146146
res = self.filters(message)
147147

148-
return res and (command[0].lower() in self.command
148+
return res and (command[0].lower().encode("utf8") in self.command
149149
and command[1].lower() == message.bot.username.lower())
150150
else:
151151
return False

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy