Skip to content

Commit a084638

Browse files
author
Pietro Albini
committed
Fix "unknown command" not showing up on private chats (fixes #25)
This was a regression of 850d6e9.
1 parent eff892a commit a084638

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

botogram/defaults.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
"""
88

99
from . import utils
10-
from . import objects
1110
from . import components
1211
from . import decorators
1312

@@ -142,7 +141,7 @@ def no_commands_hook(self, bot, chat, message):
142141
username = bot.itself.username
143142

144143
mentioned = splitted[0] == "/%s@%s" % (command, username)
145-
single_user = isinstance(chat, objects.User)
144+
single_user = chat.type == "private"
146145
if mentioned or single_user:
147146
chat.send("\n".join([
148147
bot._("Unknown command: /%(name)s", name=command),

0 commit comments

Comments
 (0)