Skip to content

Robot manager for telegram(一款Telegram机器人管家)

License

Notifications You must be signed in to change notification settings

pefish/telegram-bot-manager

Repository files navigation

telegram-bot-manager

view examples

Read this in other languages: English, 简体中文

telegram-bot-manager is a robot manager for telegram.

Install

go get github.com/pefish/telegram-bot-manager/cmd/telegram-bot-manager

Quick start

telegram-bot-manager --config="/path/to/sample.yaml"

Robot manager will reply all updates automatically according to the rules in /path/to/sample.js.

/path/to/config.yaml

token: "***"
commandsJsFile: "/path/to/sample.js"

/path/to/sample.js

var commands = {
    "/test": {
        desc: "测试命令",
        func: function (args) {
            // console.log(args)
            return "test: " + JSON.stringify(args)
        }
    },
    "/haha": {
        desc: "有点意思",
        func: function (args) {
            return "xixi"
        }
    },
}

Document

doc

Contributing

  1. Fork it
  2. Download your fork to your PC
  3. Create your feature branch (git checkout -b my-new-feature)
  4. Make changes and add them (git add .)
  5. Commit your changes (git commit -m 'Add some feature')
  6. Push to the branch (git push origin my-new-feature)
  7. Create new pull request

Security Vulnerabilities

If you discover a security vulnerability, please send an e-mail to [email protected]. All security vulnerabilities will be promptly addressed.

License

This project is licensed under the Apache License.

About

Robot manager for telegram(一款Telegram机器人管家)

Resources

License

Stars

Watchers

Forks

Packages

No packages published