Questions tagged [telebot]

Telebot is a bot framework for the Telegram Bot API. The package provides a kind API for command routing, inline query requests and keyboards, as well as callbacks.

Telebot is a bot framework for the Telegram Bot API, available at https://github.com/tucnak/telebot

213 questions
0
votes
1 answer

Telebot Python - How to make bot answer after "yes" without sending another message

I have written a simple telegramm bot with pyTelegramBotAPI. The dialog I need should look like this: You: 'something' Bot: Hi there, I am Example bot. What's your name? You: 'some name' Bot: 'Choose your number' (shows keyboard with numbers) You:…
0
votes
0 answers

How can i call register next step handler in class base with different class or module in telebot?

How to handle register next_step_handler with new module file in call register next step handler work in telebot ? This is my code. class AgencyBot: def __init__(self, agency_name): self.agency_name =…
0
votes
1 answer

Telethon and Telebot libraries on Python. Do they work together?

I have recently started writing a script based on telethon. The only thing it does is - retriving videos, photos from channel/group, saving them to folder. So then I have decided to actually make a bot with command to run the telethon script which…
0
votes
1 answer

How do I get ONLY Telegram Bot's first_name using get_bot()?

I'm creating a Telegram Bot using Telebot. bot.get_me() get_me() is the same as getme() in Telegram Bot Api. I need to get the bot's first name. Code above gives me: { "id":5519834543, "is_bot":true, "first_name":"BOTtle", …
Daria
  • 5
  • 3
0
votes
1 answer

How to change the message sent by the inline bot?

There is this code: @bot.inline_handler(lambda query: query.query == 'text') def query_text(inline_query): try: r = types.InlineQueryResultArticle('1', 'text', types.InputTextMessageContent('2')) …
Flamer
  • 1
  • 2
0
votes
1 answer

how to send media album from local storage on telebot?

I'm trying to make a telegram bot that sends media from local storage and i got this error. Also if there is a list with over 10 items on it and you try to send as a album does telegram automatically seperates them to different album to send it? A…
ciumai
  • 21
  • 1
  • 6
0
votes
2 answers

Telegram bot with aws lambda and API gateway

I am developing a telegram bot with python (telebot) , aws lambda and api gateway. I have a problem in the lambda function and I can't understand why I have this kind of problem. My lambda is this: import telebot import datetime TOKEN = 'xxx' def…
Difettoso
  • 51
  • 1
  • 1
  • 10
0
votes
1 answer

RuntimeWarning: coroutine 'claimcode' was never awaited. Enable tracemalloc to get the object allocation traceback (telebot)

The portion of the code where i am getting this error. @bot.message_handler(commands=['redeemcode']) def get_code(message): code = bot.send_message(chatid, "Send the Code to Redeem") bot.register_next_step_handler(code, claimcode) async…
dedSec PC
  • 5
  • 1
  • 4
0
votes
1 answer

Sending photos without compression, telegrambot file

How do I send a photo to chat without compression, as a file. When I implement it with the current method, the file is sent as a document without an extension. bot = TeleBot("API") @bot.message_handler(content_types=['text']) def send(message): …
Risinell
  • 1
  • 2
0
votes
1 answer

Make codes run for each individual

Is it possible to listen to each users contract events from the database at once? I've tried but it only works for one user. Web3 python telebot from web3 import Web3 import json,os,sys import datetime import requests from db import * import…
0
votes
1 answer

Multi thread making it run all once

I really appreciate everyone who contributed to my first question though am new here If I didn't ask in a way you can understand do bear with me. I have a database and in it a table name contracts which the data in the rows are contract and group,…
Bigo Calls
  • 25
  • 3
0
votes
1 answer

How can I send more than 1 photo by telebot?

I want to send more than 1 photo to people from bot. So if I will write three time "bot.send_photo" it won`t be 1 message, so I want to send >1 photo in 1 message. How can I do it?
0
votes
2 answers

Why can't I send messages to Telegram bot?

I'm using Telebot to build a simple Telegram bot. I've set up a message handler that responds to commands succesfully, but when I try to send a single message I get an error if I use the chat id (ex: 1234567890): Error code: 403. Description:…
Antonio P.
  • 48
  • 1
  • 6
0
votes
1 answer

pyTelegramBotAPI inline google search engine

@bot.inline_handler(func=lambda query: len(query.query) > 0) def query_text(query): sleep(6) text=query.query html=requests.get(f'https://google.com/search?q={text}') # print(html.status_code) …
0
votes
1 answer

Error 409 occurred in telebot when using multiprocessing [exe file]

I want to start another process, it will start, if I write to telegram bot "start". But right after this occurring the ERROR: 2022-04-11 11:16:13,602 (__init__.py:688 Thread-1) ERROR - TeleBot: "A request to the Telegram API was unsuccessful. Error…
An Ri
  • 406
  • 5
  • 13