Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions commands/warden.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@

var (
wardenRoleScopes = []string{"internal", "external", "both"}
wardenSubcommands = []string{"add", "remove", "bulkadd", "purge"}
wardenSubcommands = []string{
"add",
"remove",
"bulkadd",
// "purge",
}

wardenTitleCaser = cases.Title(language.Und, cases.NoLower)
)
Expand Down Expand Up @@ -92,8 +97,8 @@
handleWardenRemove(session, interaction, guildID, query, roleScope)
case "bulkadd":
handleWardenBulkAdd(session, interaction, guildID, query, roleScope)
case "purge":
handleWardenPurge(session, interaction, guildID, roleScope)
// case "purge":
// handleWardenPurge(session, interaction, guildID, roleScope)
default:
utils.HandleError(session, interaction, "❌ Unknown subcommand")
}
Expand Down Expand Up @@ -201,7 +206,7 @@
editEphemeral(session, interaction, joinOrFallback(results, "⚠️ Nothing to do."))
}

func handleWardenPurge(session *discordgo.Session, interaction *discordgo.InteractionCreate, guildID, roleScope string) {

Check failure on line 209 in commands/warden.go

View workflow job for this annotation

GitHub Actions / Lint

func `handleWardenPurge` is unused (unused)
if err := deferEphemeral(session, interaction); err != nil {
utils.HandleError(session, interaction, fmt.Sprintf("❌ Failed to acknowledge purge: %v", err))
return
Expand Down Expand Up @@ -340,7 +345,7 @@
}
}

func memberHasRole(member *discordgo.Member, roleID string) bool {

Check failure on line 348 in commands/warden.go

View workflow job for this annotation

GitHub Actions / Lint

func `memberHasRole` is unused (unused)
return slices.Contains(member.Roles, roleID)
}

Expand Down
Loading