Jump to content
  • 0

Telegram bot script


zolotov123344

Question

6 answers to this question

Recommended Posts

bot_token = "XXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXX" -- Replace with your telegram bot token
chat_id = "-XXXXXXXX" -- Replace with the chat id of your group

message_to_send = "Hello world!"

local send_bot = gg.makeRequest('https://api.telegram.org/bot' .. bot_token .. '/sendMessage', nil,
                             'chat_id=' .. chat_id .. '&text=' .. message_to_send).content

This will send to a group, if you want it sent as a direct message let me know and I will try.

Link to comment
Share on other sites

2 hours ago, BadCase said:
    
 

   
                                

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

bro this is incredible, until the last moment I thought it was impossible. I would like a message to be sent to me by a telegram bot directly in private messages

Link to comment
Share on other sites

6 hours ago, zolotov123344 said:

bro this is incredible, until the last moment I thought it was impossible. I would like a message to be sent to me by a telegram bot directly in private messages

Use the same code as above but for chat ID you will send a private message /start to @RawDataBot and copy the chat ID in its response

Link to comment
Share on other sites

11 hours ago, zolotov123344 said:

bro this is incredible, until the last moment I thought it was impossible. I would like a message to be sent to me by a telegram bot directly in private messages

Oh looks like you are able to use @telegram_name as chat_id as well so whatever user or group you want

 

Edit: after messing with this more it seems to be unreliable, might want to stick to integer ids 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.