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

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

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

>>> telegram.Bot()

ReplyKeyboardMarkup.input_field_placeholder
python-telegram-bot documentation for this attribute:
telegram.ReplyKeyboardMarkup.input_field_placeholder

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

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

>>> telegram.Bot()

I aloso tried installling it

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

>>> telegram.Bot()

these are the requirements that I have installed

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

>>> telegram.Bot()

May i know why im getting this error

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

>>> telegram.Bot()

Only with a reply keyboard

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

>>> telegram.Bot()

Forgot to

sudo systemctl enable my-service

🙈

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

>>> telegram.Bot()

I have one more bot and Im using the same files and service in linux to booting the bot and this one start the other one no :(

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

>>> telegram.Bot()

The bot still doesnt start

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

>>> telegram.Bot()

Getting this error when rebooting my server and trying to boot the service for my python bot:

RuntimeError event loop is closed

I checked stackoverflow but nothing useful

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

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

but still same issue

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

>>> telegram.Bot()

yes how can i do it?

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

>>> telegram.Bot()

anyio 4.2.0
APScheduler 3.6.3
cachetools 4.2.2
certifi 2023.11.17
charset-normalizer 3.3.2
h11 0.14.0
httpcore 1.0.2
httpx 0.25.2
idna 3.6
pip 23.3.2
python-dotenv 1.0.0
python-telegram-bot 13.7
pytz 2023.3.post1
requests 2.31.0
setuptools 69.0.3
six 1.16.0
sniffio 1.3.0
tornado 6.4
tzdata 2023.4
tzlocal 5.2
urllib3 2.1.0

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

>>> telegram.Bot()

File "D:\PythonProjects\Telegram ChatBot\main.py", line 5, in <module>
from telegram.ext import (
File "D:\PythonProjects\Telegram ChatBot\env\Lib\site-packages\telegram\__init__.py", line 174, in <module>
from .bot import Bot
File "D:\PythonProjects\Telegram ChatBot\env\Lib\site-packages\telegram\bot.py", line 103, in <module>
from telegram.utils.request import Request
File "D:\PythonProjects\Telegram ChatBot\env\Lib\site-packages\telegram\utils\request.py", line 44, in <module>
import urllib3.contrib.appengine as appengine # type: ignore[no-redef]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'urllib3.contrib.appengine'

(env) D:\PythonProjects\Telegram ChatBot>

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

>>> telegram.Bot()

Hi guys, Can I add a placeholder to the message writing section?

If possible can you direct me to the correct document? Thank you.

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

>>> telegram.Bot()

Is the file called main.py?

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

>>> telegram.Bot()

modify main() to your tip

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

>>> telegram.Bot()

def main():
my_timezone = pytz.timezone('Europe/Rome')
application = Application.builder().token(variables.bot_token).defaults(Defaults(tzinfo=my_timezone)).build()

application.add_handler(CommandHandler("start", start))
application.add_handler(CallbackQueryHandler(execute))

application.run_polling()


if __name__ == "__main__":
check_files()
load_whitelist_from_file()
main()

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

>>> telegram.Bot()

Wiki Category Design Pattern: Running PTB alongside other asyncio frameworks

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