Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

prefix mods #89

Closed
wants to merge 3 commits into from
Closed

Conversation

svanellewee
Copy link

Allow instances to specify the "BOT_CMD_PREFIX" before running.
This is to address
#42
#6
Example:

   export TELEGRAM_TOKEN=....
   export BOT_CMD_PREFIX='/'
   mkdir testtel ; cd testtel
   cat <<"EOF" > main.go
package main
import (
    "os"
    "github.com/go-chat-bot/bot/telegram"
    _ "github.com/go-chat-bot/plugins/catfacts"
    _ "github.com/go-chat-bot/plugins/catgif"
    _ "github.com/go-chat-bot/plugins/chucknorris"
    // Import all the commands you wish to use
)
func main() {
    telegram.Run(os.Getenv("TELEGRAM_TOKEN"), os.Getenv("DEBUG") != "")
}
EOF
go build -a
./testtel

@fabioxgn
Copy link
Member

The ideal to solve this is to allow commands to be executed using the bot name on networks that support it, like @gobot help in slack. So I'm closing this PR as this doesn't solve this problem.

@fabioxgn fabioxgn closed this Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants