pythontelegrambotgroup | Unsorted

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

10206

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()

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.

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

>>> telegram.Bot()

Hello there, Feinstes Cali 🍁🍀 dry sift 🍫. You are writing your job offer in our technical focused groups, which is against our rules. To find a bot developer, please look at agencies dedicated towards freelancers. An example of those would be https://fiverr.com, which we are not associated with.

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

>>> telegram.Bot()

can anyone help me in this

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

>>> telegram.Bot()

Hey. Please post code or tracebacks using a pastebin rather than via plain text or a picture. https://pastebin.com/ is quite popular, but there are many alternatives out there. Of course, for very short snippets, text is fine. Please at least format it as monospace in that case.

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

>>> telegram.Bot()

Yeah then you would need to change your code accordingly

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

>>> telegram.Bot()

That won't give you this error

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

>>> 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()

I didnt understood in that thats why I ask for help

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

>>> telegram.Bot()

I just pointed you to a resource in the wiki, the docs or the examples and I have the strong feeling that you did not actually read it. Please do so. If you don't understand everything and have follow up questions, that's fine, but you can't expect me to repeat everything just for you because you didn't feel like reading on your own. 😉

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

>>> 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()

def main():
updater = Updater(TOKEN, use_context=True)
dp = updater.dispatcher

# Add your handlers here
dp.add_handler(CommandHandler('start', start))

conv_handler_login = ConversationHandler(
entry_points=[CommandHandler("login", login_message)],
states={
REGISTER_PHONE: [MessageHandler(filters.text & ~filters.command, referal_code)],
REFERAL_CODE: [MessageHandler(filters.text & ~filters.command, confirm_age)],
CONFIRM_AGE: [CallbackQueryHandler(confirm_age_callback)],
WAITING_FOR_OTP: [MessageHandler(filters.text & ~filters.command, waiting_for_otp)],
},
fallbacks=[CommandHandler("back", back)],
allow_reentry=True,
)

# Add the ConversationHandler to your dispatcher
dp.add_handler(conv_handler_login)
dp.add_handler(CallbackQueryHandler(resend_otp_callback, pattern='resend_otp'))

updater.start_polling()
updater.idle()

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

>>> telegram.Bot()

Traceback (most recent call last):
File "D:\PythonProjects\Telegram ChatBot\main.py", line 51, in <module>
main()
File "D:\PythonProjects\Telegram ChatBot\main.py", line 24, in main
updater = Updater(TOKEN, use_context=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Updater.init() got an unexpected keyword argument 'use_context'

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

>>> telegram.Bot()

I even tried by using latest version i.e 20.7

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