Compare commits

..

No commits in common. "1488033c5260bcac09b2d670875bd5110970b61a" and "09cc6f75c34648b197034399c4ec81ed7cc9edcf" have entirely different histories.

2 changed files with 6 additions and 1 deletions

View File

@ -25,6 +25,7 @@ func New(b bot.Bot) *RolesPlugin {
c: b.Config(),
db: b.DB(),
}
p.RegisterWeb()
p.Register()
return p
}
@ -77,7 +78,7 @@ func (p *RolesPlugin) toggleRole(r bot.Request) bool {
return true
}
for _, rr := range roles {
if strings.ToLower(rr.Name) == strings.ToLower(role) {
if rr.Name == 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.")

4
plugins/roles/web.go Normal file
View File

@ -0,0 +1,4 @@
package roles
func (p *RolesPlugin) RegisterWeb() {
}