pythontelegrambotgroup | Unsorted

Telegram-канал pythontelegrambotgroup - >>> telegram.Bot()

7508

This group is for questions, answers and discussions around the python-telegram-bot library. Off-topic group: @pythontelegrambottalk | Website: https://python-telegram-bot.org

Subscribe to a channel

>>> telegram.Bot()

Just set start and help. Explain cmds in help. Why do you have to set all cmds 🤷

Читать полностью…

>>> telegram.Bot()

Do note that this only affects the list of displayed commands, you still need to check the chat type inside handlers

Читать полностью…

>>> telegram.Bot()

Hey. You can find an explanation of @roolsbot's functionality on 'GitHub.

Читать полностью…

>>> telegram.Bot()

better use sqlAlchamy

Читать полностью…

>>> telegram.Bot()

You can use anything from PTB Persistence to an SQL database.

The idea is that you log all messages in a database and query them when you need some chat history.

Читать полностью…

>>> telegram.Bot()

Oh shoot, no i'm wrong. it worked after using allowed_updates.

Читать полностью…

>>> telegram.Bot()

Hey. You seem to be using the new version (>=20.0) of python-telegram-bot but your code is written for an older and deprecated version (<=13.15).
Please update your code to the new v20 by reading the release notes and the transition guide linked below.
You can also install a version of PTB that is compatible with your code base, but please note that the library has undergone significant changes in v20 and the older version is not supported anymore. It may contain bugs that will not be fixed by the PTB team and it also doesn't support new functions added by newer Bot API releases.

Читать полностью…

>>> telegram.Bot()

It just get deleted now 😐
a new one: https://nekobin.com/lezuseziri.py

Читать полностью…

>>> telegram.Bot()

Hey. You seem to be using a version <=13.15 of python-telegram-bot. Please note that we only provide support for the latest stable version and that the library has undergone significant changes in v20. Please consider upgrading to v20 by reading the release notes and the transition guide linked below.

Читать полностью…

>>> telegram.Bot()

My code: https://nekobin.com/jigokepeso.py

Читать полностью…

>>> telegram.Bot()

Not sure where in the docs you read that it cuts it off, it is a meta information for telegram

Читать полностью…

>>> telegram.Bot()

how to send that game emoji using bot?

i want to send that slot machine emoji

i am sending 🎰 this , but it's not working as game

Читать полностью…

>>> telegram.Bot()

I honestly think it's already broken in some ways

Читать полностью…

>>> telegram.Bot()

you can use that version, just install that version of PTB. Note that it is unmaintained and might break in future

Читать полностью…

>>> telegram.Bot()

but can't we user 13.7 version of it

Читать полностью…

>>> telegram.Bot()

it's a Python module, what I suggest is generally a model of data storage, no matter what middleware is involved

Читать полностью…

>>> telegram.Bot()

BotCommandScope
python-telegram-bot documentation for this class:
telegram.BotCommandScope

Telegram's official Bot API documentation has more info about BotCommandScope.

Читать полностью…

>>> telegram.Bot()

Question: do you know if it is possible to modify the list of bot commands based on whether it is a group etc...

Читать полностью…

>>> telegram.Bot()

I use MySQL personally as I already have a WordPress site running.

Читать полностью…

>>> telegram.Bot()

Might I ask the link for the docs that keeps track of messages?

Читать полностью…

>>> telegram.Bot()

I'm testing it but i think it works like a filter and all of updates are allowed even without using it (i guess)

Читать полностью…

>>> telegram.Bot()

https://github.com/python-telegram-bot/python-telegram-bot/wiki/Transition-guide-to-Version-20.0


need to update your code too
Tutorial: Your first bot

Читать полностью…

>>> telegram.Bot()

https://docs.python-telegram-bot.org/telegram.ext.application.html#telegram.ext.Application.run_polling.params.allowed_updates

Читать полностью…

>>> telegram.Bot()

from telegram import Update
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, CallbackContext

# Replace 'YOUR_BOT_TOKEN' with your actual bot token
TOKEN = 'YOUR_BOT_TOKEN'

def start(update: Update, context: CallbackContext) -> None:
user_name = update.message.from_user.first_name
update.message.reply_text(f"Hello {user_name}! Welcome to your bot.")

def main() -> None:
updater = Updater(token=TOKEN, use_context=True)

dp = updater.dispatcher

dp.add_handler(CommandHandler("start", start))

updater.start_polling()

updater.idle()

if name == 'main':
main()



Im getting 'cannot import update from telegram' how to fix this?

Читать полностью…

>>> telegram.Bot()

Isn't there a problem with ChatJoinRequestHandler?
It doesn't even detect the request
does nothing

Читать полностью…

>>> telegram.Bot()

Bot.send_dice
python-telegram-bot documentation for this method:
telegram.Bot.send_dice

Telegram's official Bot API documentation has more info about sendDice.

Читать полностью…

>>> telegram.Bot()

same lol, so many things have changed since then

Читать полностью…

>>> telegram.Bot()

The library you're using

Читать полностью…

>>> telegram.Bot()

pip install python-telegram-bot==13.7

Читать полностью…

>>> telegram.Bot()

Check the transition guide/changelog and update your code accordingly.

Читать полностью…
Subscribe to a channel