mirror of https://github.com/velour/catbase.git
Compare commits
2 Commits
09cc6f75c3
...
1488033c52
Author | SHA1 | Date |
---|---|---|
Chris Sexton | 1488033c52 | |
Chris Sexton | ad3b264a89 |
|
@ -25,7 +25,6 @@ func New(b bot.Bot) *RolesPlugin {
|
|||
c: b.Config(),
|
||||
db: b.DB(),
|
||||
}
|
||||
p.RegisterWeb()
|
||||
p.Register()
|
||||
return p
|
||||
}
|
||||
|
@ -78,7 +77,7 @@ func (p *RolesPlugin) toggleRole(r bot.Request) bool {
|
|||
return true
|
||||
}
|
||||
for _, rr := range roles {
|
||||
if rr.Name == role {
|
||||
if strings.ToLower(rr.Name) == strings.ToLower(role) {
|
||||
if err = r.Conn.SetRole(r.Msg.User.ID, rr.ID); err != nil {
|
||||
log.Error().Err(err).Msg("setRole")
|
||||
p.b.Send(r.Conn, bot.Message, r.Msg.Channel, "I couldn't set that role.")
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
package roles
|
||||
|
||||
func (p *RolesPlugin) RegisterWeb() {
|
||||
}
|
Loading…
Reference in New Issue