I need solution with correct program in python only the bot should work only in super group very quickly I will give upvote if answer my question

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
I need solution with correct program in python only the bot should work only in super group very quickly I will give upvote if answer my question
22 lines (19 sloc)
650 Bytes
Raw
import telebot
2.
from helper import CheggHelper
import os
4
bot = telebot. TeleBot ('YOUR_BOT_TOKEN', parse_mode-None)
obj = CheggHelper()
6
ebot.message_handler(commands-['ans']).
def send ans (message):
9.
10
try:
ques link - message.text.split(' ')[1]
# print (ques_link)
stat, filex, captionx = obj.getQAns(ques 1ink)
11
12
13
14
if stat == True:
15
bot.send document (message.chat.id, open(filex, 'rb'), caption=captionx, reply_to_message_id-message.message_id)
16
os.remove(filex).
17
else:
18
bot.reply to(message, captionx)
19
except Exception as e:
20
bot.reply to(message, str(e))
21
22
bot.polling()
Type here to search
NC
Transcribed Image Text:22 lines (19 sloc) 650 Bytes Raw import telebot 2. from helper import CheggHelper import os 4 bot = telebot. TeleBot ('YOUR_BOT_TOKEN', parse_mode-None) obj = CheggHelper() 6 ebot.message_handler(commands-['ans']). def send ans (message): 9. 10 try: ques link - message.text.split(' ')[1] # print (ques_link) stat, filex, captionx = obj.getQAns(ques 1ink) 11 12 13 14 if stat == True: 15 bot.send document (message.chat.id, open(filex, 'rb'), caption=captionx, reply_to_message_id-message.message_id) 16 os.remove(filex). 17 else: 18 bot.reply to(message, captionx) 19 except Exception as e: 20 bot.reply to(message, str(e)) 21 22 bot.polling() Type here to search NC
Expert Solution
steps

Step by step

Solved in 3 steps with 6 images

Blurred answer
Knowledge Booster
Concept of Threads
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education