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

prefix switchable #88

Closed

Conversation

svanellewee
Copy link

@svanellewee svanellewee commented Oct 7, 2018

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

@svanellewee
Copy link
Author

Sorry wasnt sure if there was something in the works in this regard, so just trying my luck really..

@svanellewee svanellewee closed this Oct 7, 2018
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