fix colorreaction command [fix
@@ -60,10 +60,6 @@ func (c *CmdColorReaction) Exec(ctx shireikan.Context) (err error) {
}
enabled = !enabled
-
- if err = db.SetGuildColorReaction(ctx.GetGuild().ID, enabled); err != nil {
- return
- }
} else {
switch strings.ToLower(ctx.GetArgs().Get(0).AsString()) {
@@ -80,6 +76,10 @@ func (c *CmdColorReaction) Exec(ctx shireikan.Context) (err error) {
}
}
+ if err = db.SetGuildColorReaction(ctx.GetGuild().ID, enabled); err != nil {
+ return
+ }
+
if enabled {
return util.SendEmbed(ctx.GetSession(), ctx.GetChannel().ID,
"Color reactions are now **enabled**.",
