mirror of https://github.com/velour/catbase.git
Compare commits
No commits in common. "1488033c5260bcac09b2d670875bd5110970b61a" and "09cc6f75c34648b197034399c4ec81ed7cc9edcf" have entirely different histories.
1488033c52
...
09cc6f75c3
|
@ -25,6 +25,7 @@ func New(b bot.Bot) *RolesPlugin {
|
||||||
c: b.Config(),
|
c: b.Config(),
|
||||||
db: b.DB(),
|
db: b.DB(),
|
||||||
}
|
}
|
||||||
|
p.RegisterWeb()
|
||||||
p.Register()
|
p.Register()
|
||||||
return p
|
return p
|
||||||
}
|
}
|
||||||
|
@ -77,7 +78,7 @@ func (p *RolesPlugin) toggleRole(r bot.Request) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
for _, rr := range roles {
|
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 {
|
if err = r.Conn.SetRole(r.Msg.User.ID, rr.ID); err != nil {
|
||||||
log.Error().Err(err).Msg("setRole")
|
log.Error().Err(err).Msg("setRole")
|
||||||
p.b.Send(r.Conn, bot.Message, r.Msg.Channel, "I couldn't set that role.")
|
p.b.Send(r.Conn, bot.Message, r.Msg.Channel, "I couldn't set that role.")
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
package roles
|
||||||
|
|
||||||
|
func (p *RolesPlugin) RegisterWeb() {
|
||||||
|
}
|
Loading…
Reference in New Issue