I already use telegram bot APIs but it dosen't have any methods to get number of views.
Can I use telegram Client APIs for this?
with telegram api you cant get post view numbers.
you can use madelineproto library( https://docs.madelineproto.xyz ) for this
Related
Is there any way to vote in a telegram poll with a bot? I tried to use telepot and python-telegram-bot. I can get poll id, chat_id, options and all the relevant data, but can not find any way to implement messages.sendVote() method described in telegram api docs.
messages.sendVote is a method from the Telegram API, not the Bot API. All available methods of the Bot API can be found here, which does not include voting in polls.
I've created a telegram bot. He has one mission to inform in group about new orders. When the customer create new order, telegram bot sends message with information that new order was created.
I use this api: ( Chat id and token are provided as an example)
https://api.telegram.org/bot449123456:AAHSAnSGDm8PW2Z-1ZiwdVDmgv7sM3NMTxg/sendMessage?chat_id=311911234&text=Hi+Everyone
All works fine, but how can I send not a simple text( with + as a whitespace) but a big text with information about order, and order cart?
I think I should use another method instead of simple call api...
Now, I am using nest js for backend, and yes, I know about telegraf and other npm packages, but because I use this bot only for send information from site, could I avoid additional packages and create a simple api call with big text? Thanks in advance.
Thanks for you suggestion #micael-levi. I have found a method
To put my text into variable
To encode this variable with method encodeURIComponent
To Specify in API params that it is a HTML and it should be parsed as a HTML (parse_mode=HTML)
So i would like to make a bot that can access recent action from my supergroup. The flow is pretty simple, i want the bot to scrape all of the information inside of it and save it into database. I made it with python and telegram bot API
The bot is already admin and he can do anything that admin could do.
Is it possible to do that???
No. Bots can only do what's listed in the official API docs at https://core.telegram.org/bots/api. Instead, you can just keep track of what's happening in the chat.
Is there a possibility to get guildsize from a bot, other than mine? Like that:
I found in discord api a GET / users / # me / guilds, which allows me to get the total guilds I'm in, but I can't find a way to get someone's guildsize.
No, that is not possible. The way that website has the bots server count is that the bots directly communicate their server count to the site through an API.
I'm not sure which website is that but here's the API page for top.gg, the endpoint used for communicated is "Post Bot Stats".
You can get the guild size like so
<Client>.guilds.size
Here is the link of the discordjs docs
Is it possible to send a message from a node.js server to someone's mobile number or telegram Id directly?
is it possible without using a telegram bot?
I need an API like below:
function sendMessage(senderTelegramId, receiverTelegramId, messageText)
In short: No, without a bot no way for now.
Detailed explanation:
In order for you to send users messages on telegram you would need to create your own telegram bot. They have a well documented API which you can read and play around with.
There are 2 things you should know about sending messages to users using telegram bot:
You can't just send random people messages on telegram even if you know their phone number, to send them messages you need to have their chat_id. See how in the docs
To get the chat_id the user must first click the start button that comes up when they open your bot for the first time. Telegram will send you the chat id of that user and you save it for later when you would want to send messages to that user.
There are tons of libraries that makes working telegram bots very easy, it wouldn't take you more than an hour to get started.
I hope this answers the question, feel free to ask further questions, I have made some bots and you can also play around with them to see how it works.
Cheers )
There is actually one more easiest way to send a message to chat
just fetch the URL
https://api.telegram.org/bot[BOT_API_KEY]/sendMessage?chat_id=[MY_CHANNEL_NAME]&text=[MY_MESSAGE_TEXT]
you can find more details here
https://xabaras.medium.com/sending-a-message-to-a-telegram-channel-the-easy-way-eb0a0b32968