telegram

Does pyrogram support Finite State Machine or FSM for short

Does pyrogram support Finite State Machine or FSM for short Question: Good time of a day to you all! Short Question: Does pyrogram support FSM how it’s implemented in AIOGram? Long Question: I’m just searching for a telegram API wrapper other than AIOgram and PyTelegramBotApi and found this. I read documentation intro for Pyrogram and …

Total answers: 1

ModuleNotFoundError: No module named 'telegram.utils'

ModuleNotFoundError: No module named 'telegram.utils' Question: I have installed python-telegram-bot like: pip install python-telegram-bot When I’m try to do this: from telegram.ext import Updater, CommandHandler, MessageHandler, filters from telegram.utils.helpers import escape_markdown I get this error: ModuleNotFoundError: No module named ‘telegram.utils’ Asked By: Jakeer || Source Answers: See telegram sourcecode: The function escape_markdown is located in …

Total answers: 1

Python Telegram Bot answer

Python Telegram Bot answer Question: How can I get response from Telegram bot and get some information to answer from local file? I wrote code below, but part with current_status doesn’t work. Could you please tell me why it doesn’t work? import telebot import requests url = "https://link.com" bot = telebot.TeleBot(‘TOKEN’) @bot.message_handler(content_types=[‘text’]) def get_text_messages(message): if …

Total answers: 1

Python Telegram Bot – Calling variable in URL?

Python Telegram Bot – Calling variable in URL? Question: am having difficulty calling a variable as part of the url in a message I intend to send via the Python Telegram bot. Due to the nature of my code, the ‘webpage’ variable varies and the url has to be called as a variable. Placing the …

Total answers: 1

how to get chat folders? – telethon

how to get chat folders? – telethon Question: I’m trying to get the chat folders using telethon I’m not sure what to do and there’s nothing I found in the documentation. Can anyone help? Asked By: Shards-7 || Source Answers: Folders are called Filters in the full api, you can get them with GetDialogFilters req …

Total answers: 1

Getting an AttributeError: 'Update' object has no attribute 'send_message' when I try to send a message with Telegram bot

Getting an AttributeError: 'Update' object has no attribute 'send_message' when I try to send a message with Telegram bot Question: Im getting an AttributeError: ‘Update’ object has no attribute ‘send_message’ when I try to send a message. And I know that ‘Update’ class does not have a ‘send_message’ attribute but Im not using the ‘Update’ …

Total answers: 1

Where are secrets kept in Telegram Bots?

Where are secrets kept in Telegram Bots? Question: I’m developing a Telegram Bot which will make HTTP request to an external API which requires an API key. Is there a special place wherein secrets like this should be kept in Telegram Bots? The one that Telegram API or SDK may provide? Or is it normal …

Total answers: 1

Telegram bot – How to handle conversations?

Telegram bot – How to handle conversations? Question: I am trying to learn to make a telegram bot but I am not sure how to achieve continuous conversations. All I know is how to respond to the individual messages, for example like this – If a user enters wrong command, for example /jnaddaad def unknown_response(update: …

Total answers: 1

Telethon async and await mess

Telethon async and await mess Question: Here is my code as follows: import time import telethon import asyncio # Enter your API ID and API hash here api_id = 13****** api_hash = ‘8ba0a***********************’ # Enter the name of the text file containing the messages message_file = ‘messages.txt’ async def main(): # Connect to the Telegram …

Total answers: 1

Telthon client Get link/url for all Groups or channel

Telthon client Get link/url for all Groups or channel Question: Hello im try to find a solution to get for all groups i have in telgram app to save in one list If is group i can generate a link if is private channel can i generate join url i get group id name and …

Total answers: 1