remove mod/admin role command
Some checks are pending
CI / build (push) Waiting to run

This commit is contained in:
Dustin Pianalto 2021-01-25 23:53:32 -09:00
parent 964be05c48
commit 132bf94332

View File

@ -138,8 +138,10 @@ func removeModRoleCommandFunc(ctx disgoman.Context, args []string) {
continue continue
} }
if _, err = ctx.Session.State.Role(ctx.Guild.ID, id); err != nil { if _, err = ctx.Session.State.Role(ctx.Guild.ID, id); err != nil {
_, _ = ctx.Send(fmt.Sprintf("%s does not reference a valid role for this guild.", id)) if _, err := services.GuildService.Role(id); err != nil {
continue _, _ = ctx.Send(fmt.Sprintf("%s does not reference a valid role for this guild.", id))
continue
}
} }
_, err := services.GuildService.CreateOrUpdateRole(geeksbot.Role{ _, err := services.GuildService.CreateOrUpdateRole(geeksbot.Role{
ID: id, ID: id,