Categorygithub.com/knackwurstking/go-tgbwp
repository
0.0.0-20241120003747-c82c42e34559
Repository: https://github.com/knackwurstking/go-tgbwp.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# README

tgbwp (telegram-bot-with-plugins)

A Golang Telegram bot with plugins support.

Install Info

  • 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

Configuration

Example configuration, replace <number> with the current chat numbers:

{
  “id”: {
    “user”: {
      “knackwurstking”: <number>
    },
    “chat”: {
      “alice”: <number>
    }
  }
}