11054
This group is for questions, answers and discussions around the python-telegram-bot library. Off-topic group: @pythontelegrambottalk | Website: https://python-telegram-bot.org
There are real programmers here — not vibe coders
Читать полностью…
# акмаль, it’s not possible to completely prevent users from deleting their own threads “softly” if they have basic permissions. However, you can limit topic management:
Go to Group Settings → Administrators.
For each admin (except the bot), disable the “Manage Topics” permission.
Also check the group permissions for regular members and make sure this is disabled there as well.
After that, only your bot (with admin rights) will be able to create and delete topics. If a user deletes something locally, that’s a feature of the Telegram client, and the bot cannot influence it through the API. Unfortunately, it’s also not possible to restore a thread deleted by a user via the Bot API.
i Guess the fastest thing you can do is deactivating manage threads permission for all the admins and enable it for only for your bot
Читать полностью…
ext.Defaults.protect_content
python-telegram-bot documentation for this property:
telegram.ext.Defaults.protect_content
Do you mean forward from a bot chat or forward into the bot chat? First one yes, second you have to program yourself with a filter, no way to stop users with a botfather setting or so
Читать полностью…
Who is an expert in PHP here? I’ve developed a complex bot that generates and securely stores strong passwords for social media, but it's being rejected by my hosting server (myxvest.ru). Any advice on how to fix this or what might be causing the issue?
Читать полностью…
Hey. In order for someone to be able to help you, you must ask a good technical question. Please read this short article and try again ;)
Читать полностью…
and set keyboard buttons with premium emojis and background colors
Читать полностью…
How can bots attach custom emojis to buttons and then send messages with those custom emojis?
Читать полностью…
Okay everyone enough now. Please go to the offtopic group and keep this one to PTB related queries
Читать полностью…
i do edit it too
and definitly it has bugs
but never messy
ai writes very clean
i dont make apps with ai
but i make telegram bots
and the security is telegram
writing a bot by yourself or by ai doesn't make difference
i am a real coder
i do use ai
i have coder friends
i have friends who has companies
in different countries
trust me
i know what i say
can you please show where is it? I only found "disallow create"
Читать полностью…
Hi! Question is related to new telegram feature: Bot Threads
Bot can create and delete threads, and user too.
If bot deletes thread, messages under that thread are also gone.
But if user deletes thread, it's kinda "soft" deleted, because messages are still there. And bot can even rename thread - system message will appear, but no thread visible.
Is it possible to restore thread deleted by user? I want my bot fully control threads, and I don't want user manage threads
Then just set protect_content, either in every method you want this or by default
Читать полностью…
I moved this discussion to the off-topic group.
Читать полностью…
is that possible to disable forwarding in bot chat
Читать полностью…
Pls help me "from telegram import Update, Bot, ChatInviteLink
from telegram.ext import ApplicationBuilder, CommandHandler, ContextTypes
async def start(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
await update.message.reply_text(f"Hello {update.effective_user.first_name}")
bot = Bot("I remove the token")
await update.message.reply_text(
f"Invite link: {ChatInviteLink('/channel/+a2KCsas-FaZDa5jYmU0', 'Undefine', name='Nice group', subscription_period=10000, subscription_price=3, creates_join_request=True, is_primary=True, is_revoked=False)}"
)
app = ApplicationBuilder().token("I remove the token").build()
app.add_handler(CommandHandler("start", start))
app.run_polling()
"
recently telegram allowed bots to send messages with premium emojis
Читать полностью…
How to make the bot send CustomEmoji reactions?
Читать полностью…
but is it scalable and organized and not messy or you have to manually edit it?
Читать полностью…
if u be a real coder and tell it how to do it
it makes it better and faster
but if youre a normal guy who dont know anything about coding it writes shit
anyway ai is a tool
not the whole thing
even using ai to make something need some skill
its not like:
make me an app, make no mistake im going to sleep u keep going