Telegram Autopost Bot

Started by vbgamer45, April 11, 2020, 05:57:59 AM

Previous topic - Next topic

mpcgferreira

#80
Also may help

My second Solution for the error {"ok":true,"result":[]}

Go in your Telegram Group
Add new User (Invite)
Search for "getidsbot" => @getidsbot
Message: /start@getidsbot
Now you see the ID. looks like 1068773197, which is -1001068773197 for bots (with -100 prefix)!!!
Kick the bot from the Group.
Now go to the Webbrowser an send this line (Test Message):
https://api.telegram.org/botAPITOKENNUMBER:APITOKENKEYHERE/sendmessage?chat_id=-100GROUPNUMBER&text=test [nofollow]
Edit the API Token and the Group-ID!

mpcgferreira

These code work to check if data provided on the setup are good

https://api.telegram.org/botxxxxxxxxxxxxxxxxxx/sendmessage?chat_id=xxxxxxxxx&text=test [nofollow]

Only need replace xxx for your data.

----

So if code is good and work on the test. The MOD don´t work with the correct data. The problem ???????

mpcgferreira

Quote from: vbgamer45 on October 20, 2021, 02:15:48 PMIt might user bot id. I don't remember. I just remember it was not easy to find out. I had to talk to a bot on telegram to get the chat id.

Hello,
These code work to test if data provided on config are good. Any help please.

Code: https://api.telegram.org/botxxxxxxxxxxxxxxxxxx/sendmessage?chat_id=xxxxxxxxx&text=test [nofollow]
Result: "{"ok":true,"result":{"message_id":178,"from":{"id":2070000772,"is_bot":true,"first_name":"test_forum","username":"test_forum_bot"},"chat":{"id":-1001000012027,"title":"Test Forum News","username":"test_forum","type":"supergroup"},"date":1634009020,"text":"test"}}

wylekk

Hi! The mod works fine, but is it possible to make it so that not the link was to the last message but the message itself?

mpcgferreira

Quote from: wylekk on December 15, 2021, 09:27:12 AMHi! The mod works fine, but is it possible to make it so that not the link was to the last message but the message itself?

you make the mod work. i try all and nothing.

wylekk

How to get a Telegram API bot token

Create and configure a bot

You don't need to write code to do that. In fact, you don't need to use your computer! Just go to the Telegram app on your device and follow these 4 simple steps:

Step 1. Find a bot named "@botfarther" in the telegram, it will help you in creating and managing your bot.

You cannot view this attachment.

Step 2. Send him a "/help" and you'll see all the possible commands your bot can manage.

You cannot view this attachment.

Step 3. To create a new bot, send "/newbot".

Follow the instructions he gave and create a new name for your bot. If you are creating a bot only for experimentation, then the name must be unique, you can use the namespace of your bot by putting your name in front of it in the username. By the way, his pseudonym can be anything.

Step 4. You've just created your Telegram bot. You'll see the new API token generated for it.

Copy your API token (example - 7041085203:GAEo9l21OJdXlrOIDU2KdYHm9T0urAMPkh).

You cannot view this attachment.

Step 5. Telegram chat ID.

Write in the search @get_id_bot and choose this bot.

You cannot view this attachment.

Click Start.

You cannot view this attachment.

Copy the chat ID.

You cannot view this attachment.

mpcgferreira

Hello,
I made all that. I check for errors and when i publish something smf generate these error.

400:<html>
<head><title>400 Bad Request</title></head>
<body>
<center><h1>400 Bad Request</h1></center>
<hr><center>nginx/1.18.0</center>
</body>
</html>

and


JSON Syntax error

Will Garcia

Quote from: goldenstudios on April 17, 2020, 06:25:59 AMI noticed, however, that the bot sends messages only to me..how did I force it to send messages in a public group?
when i send message show this:
/getgroupid
This is not a group! Stop fooling me!



How do I make it send the message to the group and not to me?

Pyrhel

Hello, the addon is great! I'm planning to give a channel to my members and use the messages as a feed for new posts for those who want to be informed for everything.

I managed to make it post to this public channel, but I found one drawback. It posts info about every post, even those which are not approved yet.

Is it possible this addon be upgraded to skip unapproved posts and send a notification at the moment when they are approved?

Advertisement: