Jump to content
  • 0

Telegram bot script


zolotov123344

Question

6 answers to this question

Recommended Posts

Posted
4 hours ago, hoangninyb said:

I find it pretty cool!

I am almost done coding a full on telegram bot that is run from GG, here is what I have done so far.

 

Screenshot_20211230-225634_Telegram.jpg

Screenshot_20211230-225643_Telegram.jpg

Posted
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.

Posted
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

Posted
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

Posted
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 

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.