Answer the question
In order to leave comments, you need to log in
How to display 1 message through for and not several?
How to display 1 message through for and not several?
leaktext = messege.text
url = "https://leakcheck.io/api/"
key = ""
type = "auto"
query = {leaktext}
data = {'key': key, 'type': type, "check": query}
req = requests.get(url, data)
json = req.json()
if(json['success'] == True):
for result in json['result']:
bot.send_message(messege.chat.id,result['line'])
Answer the question
In order to leave comments, you need to log in
if json['success']:
text_message = '\n'.join([result['line'] for result in json['result']])
bot.send_message(messege.chat.id, result['line'])
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question