def chati(arg):
return arg.split()[1:]
def text(arg):
return arg.split()[2]
@bot.message_handler(commands=["text"])
def sendmt(message):
ci = chati(message.text)
mt = text(message.text)
bot.send_message(chat_id=ci,text=mt)
bot.reply_to(message, 'Отправлено!')