Add separate offtopic message for @TelethonOffTopic

This commit is contained in:
Tulir Asokan 2018-09-02 20:40:17 +03:00
parent 07ea993178
commit 34c00405ec

View File

@ -61,10 +61,13 @@ SPAM = (
"welcome here." "welcome here."
) )
OFFTOPIC = ( OFFTOPIC = {
-1001109500936:
'That is not related to Telethon. ' 'That is not related to Telethon. '
'You may continue the conversation in @TelethonOffTopic' 'You may continue the conversation in @TelethonOffTopic'
) -1001200633650:
'That seems to be related to Telethon. Try asking in @TelethonChat'
}
ASK = ( ASK = (
"Hey, that's not how you ask a question! If you want helpful advice " "Hey, that's not how you ask a question! If you want helpful advice "
@ -226,7 +229,7 @@ async def handler(event):
"""#ot, #offtopic: Tells the user to move to @TelethonOffTopic.""" """#ot, #offtopic: Tells the user to move to @TelethonOffTopic."""
await asyncio.wait([ await asyncio.wait([
event.delete(), event.delete(),
event.respond(OFFTOPIC, reply_to=event.reply_to_msg_id) event.respond(OFFTOPIC[event.chat_id], reply_to=event.reply_to_msg_id)
]) ])