I was wondering how to open URL by pressing inlinekeyboard button with my telegram bot using python.
Based on documentation this is supposed to work
button = types.ReplyKeyboardMarkup(one_time_keyboard=False, resize_keyboard=True) button.row( telebot.types.InlineKeyboardButton(text='Binance', url="my url") )
but it is not and I can't figure out why?
any kind of help is appreciated
You're trying to build a ReplyKeyboardMarkup but add an InlineKeyboardButton instead of a ReplyKeyboardButton, which is not supported. ReplyKeyboardMarkups are just shortcuts for sending predefined text messages and don't support opening URLs. See https://core.telegram.org/bots#keyboards.
Related
I am trying to send a text message to telegram using python. Text message is basically a Windows command:
mstsc.exe /v:10.20.30.40
I want this text to act a one-click openable text from telegram. Is this possible?
I tried and it is appearing as a broken link. Example given below.
No, this is not possible, Telegram Bot API only support a small set of urls, like t.me and the normal http(s)://, any custom format can't be passed a clickable link.
Source: (Still) Can't find any source in the Telegram docs, however, I've asked this a few months ago to the Telegram Bot Support, I wanted to send a clickable tel: link, they replied with:
Hi, at the moment only http/https links will be supported.
The closest you can come to mimic this, is by using backticks to make it copy to your clipboard when you press it:
How to make that when you click on the text it was copied pytelegrambotapi
I am trying to send a message from my account to a discord channel through using a python program.
I tried pyautoGUI's typewrite, but it only works when the window is open. I am thinking of using selenium's find_element_by_class_name although I cannot find the class name of the text box.
Can you please guide me through what i can use instead, or another way of sending a message without having to keep the discord window open? I am a newbie so i do not understand complex codes!
I want to send mp3 file to the user from telethon bot, when I do that with bot.send_file(supports_streaming=True) it arrives with delay like this:
https://i.stack.imgur.com/69oau.png
I also tried bot.upload_file which should upload file on telegram server and return InputFile, but calling bot.send_file(file=input_file) gives the same result.
What I want is to provide instant link to file with download button like this:
https://i.stack.imgur.com/epRQs.png
I've seen this in one audio book bot, it gives this download button immediately even for 200MB files. Help me to implement this please.
Telethon's docs for send_file says you can pass supports_streaming=True.
It seems like telethon doesn't have functionality for this kind of problem yet, but I found super easy solution in aiogram library, it accepts links as well as files which was useful in my case.
https://aiogram.2038.io/api/methods/send_audio/
I'm looking for a way to make the bot screen share a website. And the link to be a parameter after the command. (To clarify: The website starting URL doesn't change. Only a token that's given after the starting URL. For example: "https://websitehere.com/branch/ 'token goes here'
Bots Can't Screenshare! Discord Bot API Do Not Support It Yet!
There is an alternative with selfbots using JavaScript, You can try this project:
https://www.youtube.com/watch?v=HA18QDE5GhQ
https://github.com/MainSilent/Discord-Screenshare
In order to show a website you need to capture it and show it on the html video element in stream_inject.js
I am trying to code a program for somebody, that is possible to send and delete messages at the same time in the browser Discord application.(I think he wants to use this to spam?) He told me to write the code in Python, so I used python with Selenium. At this point I got everything working so far, the login works, the channel select works if you just insert the channel link directly. It also managed to let it send some messages. But problem now is, that I don't know how to delete the message after it was send, beacuse you need to click a "More" button first. But this more Button
I would use Webbot for that:
from webbot import Browser
web = Browser()
web.click('More')
that module has quite a few useful simple functions so i encourage you to try it