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

Thanks, I needed the ptb error handling to send me a DM on errors, which was tricky with running an asyncio.create_task

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

>>> telegram.Bot()

The callbacks you pass must be function names, not None :)

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

>>> telegram.Bot()

hello everyone. i would like to make a bot for the store on my own. and im looking for a tutor who would teach me, and with his help i would do it. i will be glad to receive feedback from russia or belarus, because i will be able to pay. thanks to the community!

всем привет. хотелось бы самостоятельно сделать бот для магазина. и я ищу репетитора, который бы научил меня, и с его помощью бы его сделала. буду рада отзывам из россии или белоруссии, потому что смогу платить. спасибо сообществу!

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

>>> telegram.Bot()

Nothing extra needed

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

>>> telegram.Bot()

How to install python telegram bot for concurrent updates

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

>>> telegram.Bot()

Wiki Category Code Snippets: Build a menu with Buttons

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

>>> telegram.Bot()

Anyone has Python telegram bot (new version) open source code?

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

>>> telegram.Bot()

No error handlers are registered, logging exception.
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.12/site-packages/telegram/ext/_application.py", line 1264, in process_update
await coroutine
File "/app/.heroku/python/lib/python3.12/site-packages/telegram/ext/_handlers/basehandler.py", line 157, in handle_update
return await self.callback(update, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: object NoneType can't be used in 'await' expression

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

>>> telegram.Bot()

Hey. Please show the full traceback via a pastebin. Make sure to include everything from the first Traceback (most recent call last): until the last error message. https://pastebin.com/ is a popular pastebin service, but there are many alternatives out there.

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

>>> telegram.Bot()

Remove and readd the bot if you change privacy setting while it is in the group

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

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

I'm not getting the showPopup() method to work. How am I supposed to chain it?

    function displayPopup() {
Telegram.WebApp.showPopup({
message: "Your message here",
buttons: [
{ text: "OK" },
{ text: "Cancel", type: 'negative' } // Optional 'negative' style
],
onClose: () => {
console.log('Popup closed');
}
});
}

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

>>> telegram.Bot()

https://core.telegram.org/bots/faq#what-messages-will-my-bot-get

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

>>> telegram.Bot()

Hi my bot sometimes doesn't respond if I don't tag it in the command.

But after I tag it, it wakes up and starts responding like normal.

Group privacy is disabled. Do you know what else can fix it

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

>>> telegram.Bot()

ChatMemberUpdated
python-telegram-bot documentation for this doc:
telegram.chatmemberupdated

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

>>> telegram.Bot()

Jup. Randomly stopping it would be a funny idea

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

>>> telegram.Bot()

Just confirming, job_queue.run_repeating runs it indefinitely?

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

>>> telegram.Bot()

using https://github.com/python-telegram-bot/python-telegram-bot/wiki/Extensions---JobQueue?

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

>>> telegram.Bot()

https://github.com/python-telegram-bot/python-telegram-bot/network/dependents?dependents

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

>>> telegram.Bot()

Ignore that its here https://github.com/python-telegram-bot/python-telegram-bot/wiki/Bots-built-with-PTB

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

>>> telegram.Bot()

+Bots built with PTB+ !search

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

>>> telegram.Bot()

Hello everyone!

can anyone please help, with this error TypeError: Updater.init() got an unexpected keyword argument 'use_context'
I tried remove (use_context=True) and I got another error TypeError: Updater.init() missing 1 required positional argument: 'update_queue'

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

>>> telegram.Bot()

I think thats comparable to the jupyter notebook issue where the "IDE" already launches a loop.

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

>>> telegram.Bot()

---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
File ~\anaconda3\lib\site-packages\telegram\ext\_application.py:1036, in Application.__run(self, updater_coroutine, stop_signals, close_loop)
1035 updater_coroutine.close()
-> 1036 raise exc
1037 finally:
1038 # We arrive here either by catching the exceptions above or if the loop gets stopped

File ~\anaconda3\lib\site-packages\telegram\ext\_application.py:1025, in Application.__run(self, updater_coroutine, stop_signals, close_loop)
1024 try:
-> 1025 loop.run_until_complete(self.initialize())
1026 if self.post_init:

File ~\anaconda3\lib\asyncio\base_events.py:623, in BaseEventLoop.run_until_complete(self, future)
622 self._check_closed()
--> 623 self._check_running()
625 new_task = not futures.isfuture(future)

File ~\anaconda3\lib\asyncio\base_events.py:583, in BaseEventLoop._check_running(self)
582 if self.is_running():
--> 583 raise RuntimeError('This event loop is already running')
584 if events._get_running_loop() is not None:

RuntimeError: This event loop is already running

During handling of the above exception, another exception occurred:

RuntimeError Traceback (most recent call last)
File ~\anaconda3\lib\site-packages\telegram\ext\_application.py:1047, in Application.__run(self, updater_coroutine, stop_signals, close_loop)
1046 loop.run_until_complete(self.post_stop(self))
-> 1047 loop.run_until_complete(self.shutdown())
1048 if self.post_shutdown:

File ~\anaconda3\lib\asyncio\base_events.py:623, in BaseEventLoop.run_until_complete(self, future)
622 self._check_closed()
--> 623 self._check_running()
625 new_task = not futures.isfuture(future)

File ~\anaconda3\lib\asyncio\base_events.py:583, in BaseEventLoop._check_running(self)
582 if self.is_running():
--> 583 raise RuntimeError('This event loop is already running')
584 if events._get_running_loop() is not None:

RuntimeError: This event loop is already running

During handling of the above exception, another exception occurred:

RuntimeError Traceback (most recent call last)
Input In [18], in <cell line: 733>()
731 application.run_polling(allowed_updates=Update.ALL_TYPES)
733 if name == '__main__':
--> 734 main()

Input In [18], in main()
728 application.add_handler(MessageHandler(filters.TEXT & (~filters.COMMAND), relay_message))
729 application.add_handler(CommandHandler('code', code))
--> 731 application.run_polling(allowed_updates=Update.ALL_TYPES)

File ~\anaconda3\lib\site-packages\telegram\ext\_application.py:836, in Application.run_polling(self, poll_interval, timeout, bootstrap_retries, read_timeout, write_timeout, connect_timeout, pool_timeout, allowed_updates, drop_pending_updates, close_loop, stop_signals)
833 def error_callback(exc: TelegramError) -> None:
834 self.create_task(self.process_error(error=exc, update=None))
--> 836 return self.__run(
837 updater_coroutine=self.updater.start_polling(
838 poll_interval=poll_interval,
839 timeout=timeout,
840 bootstrap_retries=bootstrap_retries,
841 read_timeout=read_timeout,
842 write_timeout=write_timeout,
843 connect_timeout=connect_timeout,
844 pool_timeout=pool_timeout,
845 allowed_updates=allowed_updates,
846 drop_pending_updates=drop_pending_updates,
847 error_callback=error_callback, # if there is an error in fetching updates
848 ),
849 close_loop=close_loop,
850 stop_signals=stop_signals,
851 )

File ~\anaconda3\lib\site-packages\telegram\ext\_application.py:1052, in Application.__run(self, updater_coroutine, stop_signals, close_loop)
1050 finally:
1051 if close_loop:
-> 1052 loop.close()

File

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

>>> telegram.Bot()

I moved this discussion to the off-topic group.

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

>>> telegram.Bot()

can anyone please help, getting errror with new version

Input In [5], in main()
710 application = builder.build()
712 # Add handlers to the Application
--> 713 application.add_handler(MessageHandler(filters.TEXT & filters.update.ChannelPost, forward_message))
714 application.add_handler(CommandHandler('start', start))
715 application.add_handler(CommandHandler('updates', update_command))

AttributeError: module 'telegram.ext.filters' has no attribute 'update'

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

>>> telegram.Bot()

Anyone know about this firsthand?

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

>>> telegram.Bot()

Maybe my bot also needs to be an admin

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

>>> telegram.Bot()

Copying is forwarding without showing that it's forwarded

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

>>> telegram.Bot()

But I don't need to copy it, especially if there are photo or video or documents.

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