Skip to content

Commit 57dffea

Browse files
thesharpPietro Albini
authored andcommitted
Fix sending messages to supergroups in Bot.send()
Fixes: GH-74
1 parent 6464e8c commit 57dffea

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

botogram/frozenbot.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,12 +276,7 @@ def hide_commands(self):
276276
@utils.deprecated("Bot.%s()" % _proxy.__name__, "1.0",
277277
"Use Bot.chat(id).%s() instead." % _proxy.__name__)
278278
def _wrapper(self, chat, *args, __proxy=_proxy, **kwargs):
279-
# String chats are channels
280-
if type(chat) == str:
281-
obj = objects.Chat({"id": 0, "type": "channel", "username": chat},
282-
self.api)
283-
else:
284-
obj = objects.Chat({"id": chat, "type": ""}, self.api)
279+
obj = self.chat(chat)
285280

286281
return __proxy(obj, *args, **kwargs)
287282

0 commit comments

Comments
 (0)