Replaced with: https://github.com/knackwurstking/tgs
A Golang Telegram bot with plugins support.
- Create a bot with the BotFather command:
/newbot
, name, username, and grep the API token from the message. - Invite the bot into a group.
- Run the BotFather command:
/setjoingroups
to disable the bot from joining groups.
Now, the bot will only answer group members.
-
Inside the group, type:
/hello
. -
Run
curl https://api.telegram.org/bot<token>/getUpdates | jq
to get and store the chat ID. -
export TGBWP_TOKEN=
Enable debug:
export debug. DEBUG=true`
Build with: go
build -buildmode=plugin -o ~/.local/share/tgbwp/plugins/ip.so ./plugins/ip
Example configuration, replace <number> with the current chat numbers:
{
“id”: {
“user”: {
“knackwurstking”: <number>
},
“chat”: {
“alice”: <number>
}
}
}