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
1
vote
2 answers

Python telegram bot, how to store and show users data for each users?

Hello I am new one for python and telegram api so i have some questions. I am creating telegram bot(python telegram api) with users profile. I have created database(mysql.connector) and store there all users info after registration. Also i have…
Falubii
  • 11
  • 1
  • 4
1
vote
1 answer

AttributeError: 'TeleBot' object has no attribute 'chat'

I want to create a variable, message.chat.id outside of function for example like this bot = telebot.teleBot("token") global message message = bot.message.chat.id @bot.message_handler(commands=["start"]) def welcome(): …
1
vote
1 answer

How to make user hyperlink in python telegram bot?

Stack overflow! I'm using telebot module for my telegram bot (from telebot import types). I want to send messages to telegram users. In this messages I want to paste a link to another telegram users. My code is: linked_user =…
1
vote
2 answers

How can i make a inline keyboardbutton with telebot for a chatterbot?

I am making a chatterbot and I wonder how can I put inlinekeyboardbutton, how can I make that? I need a code of keyboardbutton that handles a big conversation, please and thank you.
lucahh
  • 11
  • 4
1
vote
1 answer

Delete Join message in Telegram group using telebot

I used this code to Delete user join / left messages from my group It worked properly,But the only message that can not be deleted is 'user joined the group via invite link' How can I delete the joining message of people who enter through the…
dark diamond
  • 103
  • 6
1
vote
1 answer

Telegram bot VOIP calls

there is an option to make my telegram bot call my telegram account? Something like bot.make_call(...). I'm using telebot library on python, Thanks!
0
votes
0 answers

Button that sends back the next message

I'm learning to create bots and got stuck with creating a button, that would send back the next message. For example: it's a quest bot, user entered some discovered code -> got a message with instructions and a button 'Continue' -> after tapping the…
Paulie
  • 1
  • 1
0
votes
0 answers

Telegram Python bot function to send and receive a message

so i need a specific function in python to send a message i want to my tg bot and and then be able to respond (wait for response) from tg and process that response. I know this may be a simple question i couldn't find an specific example in the…
germor197
  • 19
  • 1
0
votes
1 answer

telegram python anonymous messages

I need to create anonymous messages so that a person can send a question to the developer and he answered it.but I have an error, instead of responding, the bot simply does not send a message to the user import telebot bot =…
idfdf2
  • 1
0
votes
2 answers

How to make the tg bot send the document that the user sent back to the user?

In this block of code: @bot.message_handler(content_types=["document"]) def sending_document(message): if ".docx" in message.document.file_name: bot.send_document(message.chat.id, message.document) #<- problem I don't know where to get…
George
  • 3
  • 1
0
votes
0 answers

Is there something like "uptime" in telebot library python

I kinda want to make admin panel in my bot where uptime will be displayed, is there something like this in telebot lib? At first i wanted to make it my own way, but i tought - "maybe there is something like this in telebot library"
0
votes
0 answers

How do I put all the answers in a list? Telebot

I have a problem. I want the bot to wait for an answer after each question and then write it down in the list And yes, I understand what I'm doing absolutely wrong in this code, but I cut out all my attempts and inserted "Clean Code" here to convey…
Artem
  • 1
0
votes
0 answers

How to determine whether a message is from a bot or a human user?

I am creating a bot that is simply sent message to a specific group. code import telebot import time # BOT_TOKEN bot = telebot.TeleBot('6332067145:AAElyMP_w69oR9********') group_id = '-10017112******' def send_msg(): …
Drhunter
  • 11
  • 4
0
votes
0 answers

Forward video thumbnail using TeleBot

The code I'm using looks like that: bot.send_photo(id, message.video.thumbnail.file_id, caption=message.caption) And it throws this error: telebot.apihelper.ApiTelegramException: A request to the Telegram API was unsuccessful. Error code: 400.…
Kuki
  • 33
  • 7
0
votes
1 answer

Telebot - get message id of message before previous message

I want to create a Telegram questionnaire bot. I use bot.send_message(...) to display a question. A user can then input the answer; the answer is saved, the question is deleted and the next question is shown. However, a user also has the option…
theb
  • 117
  • 9
1 2
3
14 15