mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-08-27 21:10:13 +00:00
Merge pull request #50 from jeroenvermeulen/fix-wx-gws-usage
Respond to only `wx` and `gwx` command with usage.
This commit is contained in:
@@ -85,7 +85,7 @@ class GlobalWxCommand(BaseCommand):
|
||||
content = content[1:].strip()
|
||||
content_lower = content.lower()
|
||||
for keyword in self.keywords:
|
||||
if content_lower.startswith(keyword + ' '):
|
||||
if content_lower.startswith(keyword + ' ') or content_lower == keyword:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ class WxCommand(BaseCommand):
|
||||
content = content[1:].strip()
|
||||
content_lower = content.lower()
|
||||
for keyword in self.keywords:
|
||||
if content_lower.startswith(keyword + ' '):
|
||||
if content_lower.startswith(keyword + ' ') or content_lower == keyword:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user