382 questions
1
vote
1
answer
192
views
Userbot Telegram API
I am creating a userbot. I can't figure out how to implement it: when I am offline from Telegram (I exit the app), it automatically changes the name in one way and when I am online in another. I can't ...
0
votes
0
answers
73
views
Problem in deploying telegram bot in Render. There is no error but the bot does not respond to /latestjobs
import os
from flask import Flask
from threading import Thread
from telegram import Update
from telegram.ext import (
ApplicationBuilder,
CommandHandler,
ContextTypes,
)
import ...
1
vote
1
answer
162
views
Is there a method to accept pending requests for membership in a channel or group?
For Python telegram bot is there a method to accept pending requests for membership in a channel or group?
def get_pending_requests(update: Update, context: CallbackContext):
try:
...
0
votes
0
answers
38
views
Python Telegram bot freezes when run by Airflow
I'm trying to execute a Python Telegram Bot through an Airflow DAG. The DAG works and execute the bot, but it don't do any response to the commands.
When I execute the file manually it do the ...
0
votes
2
answers
365
views
how to count the number of reactions of a post in a channel. pyTelegramBotAPI?
I'm trying to create a chatbot that will read the number of reactions and send them to me. In the pyTelegramBotAPI documentation, I found the message_reaction_count_handler and ...
2
votes
1
answer
74
views
Telebot. @bot.callback_query_handler isn't working
Can somebody tell me what am I doing wrong? The bot sends me an inline keyboard, but after clicking the button, I do not receive any callbacks (even the logger doesn't send anything).
Also, if I pass ...
0
votes
0
answers
688
views
Telegram stars payment invalid
I made a telegram bot integrated with mongodb to handle payments through getting telegram stars from users, but I get the error
telebot.apihelper.ApiTelegramException: A request to the Telegram API ...
0
votes
1
answer
91
views
how to let userBot and my bot work together?
I'm trying to build telegram bot which forwards msgs from a specific channel to the bot using userBot and then the bot should react automatically to the forwarded msg
@client.on(events.NewMessage(...
-1
votes
1
answer
1k
views
Opening direct chat from within Telegram Mini-app
I have been trying to create a feature in my telegram mini-app where a user can open a direct chat with another user by clicking on an icon. The methods i have tried dont open up any chat.
I have ...
0
votes
1
answer
133
views
How do I fix AttributeError: 'NoneType' object has no attribute 'bot'?
This is the code:
AttributeError: 'NoneType' object has no attribute 'bot'
from telegram.ext import CallbackContext
from telegram import Bot
import os
# Initialize your bot with the token from ...
0
votes
0
answers
48
views
FileNotFoundError: [WinError 2] The system cannot find the file specified (telegram-bot)
Im trying to make this script run on telegram which works fine until i send a picture to the bot and it gives me this error.
I am trying to run this script:
import os
import subprocess
from telegram ...
-1
votes
1
answer
102
views
Error when entering data via Telegram bot for the second time
Error when creating a telegram bot, when entering the Name/Email/Phone, I ask him to do this again, then he gives me the following error message:
<HttpError 400 when requesting https://sheets....
-5
votes
2
answers
417
views
nameerror : name 'bot' is not defined
i am trying to create a telegram bot and its having issues
import os
import telebot
my_secret = os.environ['Example']
@bot.message_handler(command=['Greet'])
def greet(message):
bot.reply_to(...
0
votes
2
answers
599
views
PyTelegrambotApi — @callback_query_handler does not work
I'm trying to create my first telegram bot with PyTelegrambotApi, but I encountered a weird problem: I get no callback after I press any inline buttons. Nothing happens. According to the documentation ...
0
votes
1
answer
856
views
Telegram bot can't send a message from another thread, Request Timeout
I use async version of pyTelegramBotApi for a Telegram bot part. I use vk-api for a VK part (not sure if that matters).
I have a bot that monitors other social network (Vkontakte) and, on some ...
0
votes
1
answer
199
views
It is a Telegram bot API bug?
Working with the bots API.
When I try to use /sendmessage function:
https://core.telegram.org/bots/api#sendmessage
if the text var contains " H" (blank space + H), the message is not sent. ...
0
votes
1
answer
383
views
How to detect user's reaction such as "thumbs up", "like", "dislike" on the message of the channel
The code below detects nothing when I click the "like" on the channel. I don't know what's wrong with my code.
# pyTelegramBotAPI Version 4.14.1
import telebot
from telebot import ...
0
votes
0
answers
30
views
Can't solve a problem with the handler when writing a music tg bot
I am writing a telebot bot that will be able to store songs from the user in the sqlite3 database and display information about the songs. Now the part with the addition of songs is ready. That is, ...
2
votes
1
answer
3k
views
Disable preview for a specific link in Telegram bot API
Does anyone know if a bot sets the disable_web_page_preview: false in sendMessage method and sends a link as part of a message, can I somehow programmatically disable the preview for a this (one) link?...
1
vote
1
answer
2k
views
How to get ALL topics for telegram supergroup using TelegramAPI
I need to get all topics for my telegram group using python3 and pyTelegramBotAPI library. How can I do it?
Thanks!
I can get topic ID during creating. But can't get all topics list. Or may be I dont ...
0
votes
1
answer
955
views
Python telebot not working properly while executing scripts from my server
I've created a telegram bot using telebot or pyTelegramBotAPI and created a command in it that let's users execute a python script from my server the script actually scrapes information from lots of ...
0
votes
1
answer
686
views
How to print user's message in telegram bot?
I'm making a telegram bot that supposed to ask users for ID and print it out in terminal
import telebot
from time import sleep
bot = telebot.TeleBot('BOT TOKEN')
from telebot import types
...
-1
votes
1
answer
396
views
Can telegram bot create a group after setting a certain command?
Can the bot create a group chat after setting a certain command?
E.g., a user pushes a button and a new chat is created for him and another user
I know that in the previous Telegram APIs bot cannot do ...
0
votes
2
answers
422
views
i want to get channel history whith pytelegrambotapi
I want to select all the posts that already exist in a Telegram channel with py-telegram-bot-api and send them somewhere
i used get_chat_history but py-telegram-bot-api has no this attribute.
0
votes
0
answers
464
views
I keep getting Bad Request Error from Telegram Api
I really don't get why I have not been able to send inline links through telegram API, any solution?
I have previously tried using html inline link format but it's always giving me bad request. What ...