Здраствуйте имеется такой код:
@bot.message_handler(commands=["pmute"])
def handle_text(message):
mute = bot.send_message(message.chat.id, privacy.pbanforid)
bot.register_next_step_handler(mute, timem)
def timem(message):
timec = bot.send_message(message.chat.id, privacy.pbanforid)
bot.register_next_step_handler(timec, mutea)
def mutea(message):
bot.restrict_chat_member(message.chat.id, '{muteid}'.format(muteid=message.text), until_date=time()+ '{sec}'.format(sec=message.text))
При котором,я пишу /pmute,бот отвечает введите айди человека,я пишу,после он справшивает время.Но после того как я пишу время, выскакивает такая ошибка:
2018-09-23 16:48:25,495 (util.py:65 WorkerThread2) ERROR - TeleBot: "TypeError occurred, args=("unsupported operand type(s) for +: 'float' and 'str'",)
Traceback (most recent call last):
File "C:\Users\Helle\AppData\Local\Programs\Python\Python37-32\lib\site-packages\telebot\util.py", line 59, in run
task(*args, **kwargs)
File "C:/Users/Helle/PycharmProjects/BOT/botEX/main.py", line 63, in mutea
bot.restrict_chat_member(message.chat.id, '{muteid}'.format(muteid=message.text), until_date=time()+ '{sec}'.format(sec=message.text)) #621330381
TypeError: unsupported operand type(s) for +: 'float' and 'str'
"
Traceback (most recent call last):
File "C:/Users/Helle/PycharmProjects/BOT/botEX/main.py", line 108, in
bot.polling(none_stop=True, interval=0)
File "C:\Users\Helle\AppData\Local\Programs\Python\Python37-32\lib\site-packages\telebot\__init__.py", line 389, in polling
self.__threaded_polling(none_stop, interval, timeout)
File "C:\Users\Helle\AppData\Local\Programs\Python\Python37-32\lib\site-packages\telebot\__init__.py", line 413, in __threaded_polling
self.worker_pool.raise_exceptions()
File "C:\Users\Helle\AppData\Local\Programs\Python\Python37-32\lib\site-packages\telebot\util.py", line 108, in raise_exceptions
six.reraise(self.exc_info[0], self.exc_info[1], self.exc_info[2])
File "C:\Users\Helle\AppData\Local\Programs\Python\Python37-32\lib\site-packages\six.py", line 693, in reraise
raise value
File "C:\Users\Helle\AppData\Local\Programs\Python\Python37-32\lib\site-packages\telebot\util.py", line 59, in run
task(*args, **kwargs)
File "C:/Users/Helle/PycharmProjects/BOT/botEX/main.py", line 63, in mutea
bot.restrict_chat_member(message.chat.id, '{muteid}'.format(muteid=message.text), until_date=time()+ '{sec}'.format(sec=message.text)) #621330381
TypeError: unsupported operand type(s) for +: 'float' and 'str'
Помогите исправить