Compare commits

..
1 Commits
Author SHA1 Message Date
Dustin Pianalto 4895294969 fix role commands
CI / build (push) Has been cancelled
2021-01-25 23:09:21 -09:00
+6
View File
@@ -37,6 +37,9 @@ func addModeratorRoleCommandFunc(ctx disgoman.Context, args []string) {
if _, ok := added[id]; ok {
continue
}
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))
}
_, err := services.GuildService.CreateOrUpdateRole(geeksbot.Role{
ID: id,
RoleType: "moderator",
@@ -83,6 +86,9 @@ func addAdminRoleCommandFunc(ctx disgoman.Context, args []string) {
if _, ok := added[id]; ok {
continue
}
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))
}
_, err := services.GuildService.CreateOrUpdateRole(geeksbot.Role{
ID: id,
RoleType: "admin",