mirror of
https://github.com/zhayujie/bot-on-anything.git
synced 2026-02-16 16:25:48 +08:00
fix: telegram prefix bug #67
This commit is contained in:
@@ -66,9 +66,10 @@ class TelegramChannel(Channel):
|
||||
except Exception as e:
|
||||
logger.exception(e)
|
||||
|
||||
|
||||
def check_prefix(self,msg,prefix_list):
|
||||
def check_prefix(self, msg, prefix_list):
|
||||
if not prefix_list:
|
||||
return None
|
||||
for prefix in prefix_list:
|
||||
if msg.text.startswith(prefix):
|
||||
return prefix
|
||||
return None
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user