import telebot
from telebot import TeleBot
import requests
bot = telebot.TeleBot('XXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
@bot.message_handler(commands=['start'])
def start_message(message):
bot.send_message(message.chat.id, 'HELP - /command user|name')
@bot.message_handler(commands=["command"])
def f(message):
f = (message.text.split()[1])
a = open("test.txt", "w+")
for x in f:
x = x.replace("\n\r", "")
z = requests.get("https://ngrok.io/check?command="+x).text
if z == "valid":
bot.send_message(message.chat.id, x)
if __name__ == '__main__':
bot.polling(none_stop=True)
Traceback (most recent call last):
File "C:\Users\Admin\Desktop\main.py", line 17, in <module>
for x in f:
TypeError: 'function' object is not iterable
def f(message):
f = (message.text.split()[1])
for x in f...