readme update
This commit is contained in:
parent
dc3ef04778
commit
4e44b972d8
12
README.md
12
README.md
@ -51,15 +51,9 @@ func main() {
|
||||
},
|
||||
)
|
||||
|
||||
_ = b.Start()
|
||||
|
||||
//set up safe CTRL-C
|
||||
sigChannel := make(chan os.Signal, 1)
|
||||
signal.Notify(sigChannel, syscall.SIGINT)
|
||||
log.Println("bot running")
|
||||
<-sigChannel
|
||||
|
||||
if err := b.Stop(); err != nil {
|
||||
//start is a blocking call that handles safe-shutdown, all configuration and setup should be done before calling Start()
|
||||
err := b.Start()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user