Answer the question
In order to leave comments, you need to log in
How can I make one piece of the script run with the on argument?
The code:
def
mode:
return arg.split()[1]
@bot.message_handler(commands=['antim'])
def mat(message):
mod=mode(message.text)
if mod == 'on':
names = ['mats']
for name in names:
if name in message.text.lower():
bot.reply_to(message, ' Не матерись!')
elif mod == 'off':
None
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question