diff --git a/bolt.go b/bolt.go index 2a167c9..5a0a2b8 100644 --- a/bolt.go +++ b/bolt.go @@ -67,6 +67,7 @@ func New(opts ...Option) Bolt { //set default command indicator b.indicator = "." + //apply options to bolt for _, o := range opts { o(b) } @@ -85,6 +86,7 @@ func (b *bolt) Start() error { return err } + //safe shutdown handler sigChannel := make(chan os.Signal, 1) signal.Notify(sigChannel, syscall.SIGINT) <-sigChannel @@ -241,7 +243,8 @@ func (b *bolt) getRemainingTimeout(timeout time.Time) string { // checks if the author of msg has the correct role to run the requested command func (b *bolt) roleCheck(msg *dg.MessageCreate, s *dg.Session, run Command) (bool, error) { var found bool - //loop thru author roles + //loop thru author roles, there may be a better way to check for this UNION + //TODO: improve role search performance to support bigger lists for _, r := range msg.Member.Roles { //get role name from ID n, err := s.State.Role(msg.GuildID, r)