> For the complete documentation index, see [llms.txt](https://developers.clashperk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.clashperk.com/models.md). Agents can also search and read this documentation through its [MCP server](https://developers.clashperk.com/~gitbook/mcp).

# Models

## The ErrorCodes object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ErrorCodes":{"type":"string","enum":["FORBIDDEN","UNAUTHORIZED","NOT_FOUND","BAD_REQUEST","INTERNAL_SERVER_ERROR","SERVICE_UNAVAILABLE","HANDOFF_TOKEN_EXPIRED","USER_BLOCKED","INVALID_PASSKEY","GUILD_ACCESS_FORBIDDEN","BOT_NOT_IN_GUILD","GIVEAWAY_NOT_FOUND","GIVEAWAY_NOT_ACTIVE","GIVEAWAY_ALREADY_DRAWN","GIVEAWAY_ALREADY_ENTERED","GIVEAWAY_NO_LINKED_ACCOUNT","GIVEAWAY_NOT_IN_CLAN"]}}}}
```

## The ErrorResponseDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ErrorResponseDto":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/ErrorCodes"}]},"message":{"type":"string"},"statusCode":{"type":"number"},"method":{"type":"string"},"path":{"type":"string"}},"required":["code","message","statusCode","method","path"]},"ErrorCodes":{"type":"string","enum":["FORBIDDEN","UNAUTHORIZED","NOT_FOUND","BAD_REQUEST","INTERNAL_SERVER_ERROR","SERVICE_UNAVAILABLE","HANDOFF_TOKEN_EXPIRED","USER_BLOCKED","INVALID_PASSKEY","GUILD_ACCESS_FORBIDDEN","BOT_NOT_IN_GUILD","GIVEAWAY_NOT_FOUND","GIVEAWAY_NOT_ACTIVE","GIVEAWAY_ALREADY_DRAWN","GIVEAWAY_ALREADY_ENTERED","GIVEAWAY_NO_LINKED_ACCOUNT","GIVEAWAY_NOT_IN_CLAN"]}}}}
```

## The JwtUserInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"JwtUserInput":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"string"}},"jti":{"type":"string"},"userId":{"type":"string"},"username":{"type":"string"},"version":{"type":"string"},"guildIds":{"type":"array","items":{"type":"string"}},"applicationId":{"type":"string"},"remoteIp":{"type":"string"},"cacheMultiplier":{"type":"number"}},"required":["roles","jti","userId","username","version","guildIds"]}}}}
```

## The LoginInputDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LoginInputDto":{"type":"object","properties":{"passKey":{"type":"string"}},"required":["passKey"]}}}}
```

## The UserRoles object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"UserRoles":{"type":"string","enum":["user","admin","viewer","fetch:wars","fetch:clans","fetch:players","fetch:legends","fetch:links","manage:links","fetch:rosters","manage:rosters","manage:reminders"]}}}}
```

## The LoginOkDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LoginOkDto":{"type":"object","properties":{"roles":{"type":"array","items":{"$ref":"#/components/schemas/UserRoles"}},"userId":{"type":"string"},"accessToken":{"type":"string"}},"required":["roles","userId","accessToken"]},"UserRoles":{"type":"string","enum":["user","admin","viewer","fetch:wars","fetch:clans","fetch:players","fetch:legends","fetch:links","manage:links","fetch:rosters","manage:rosters","manage:reminders"]}}}}
```

## The AuthUserDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"AuthUserDto":{"type":"object","properties":{"roles":{"type":"array","items":{"$ref":"#/components/schemas/UserRoles"}},"userId":{"type":"string"},"displayName":{"type":"string"},"isBot":{"type":"boolean"}},"required":["roles","userId","displayName","isBot"]},"UserRoles":{"type":"string","enum":["user","admin","viewer","fetch:wars","fetch:clans","fetch:players","fetch:legends","fetch:links","manage:links","fetch:rosters","manage:rosters","manage:reminders"]}}}}
```

## The HandoffGuildDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"HandoffGuildDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"iconUrl":{"type":["string","null"]}},"required":["id","name","iconUrl"]}}}}
```

## The HandoffUserDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"HandoffUserDto":{"type":"object","properties":{"roles":{"type":"array","items":{"$ref":"#/components/schemas/UserRoles"}},"userId":{"type":"string"},"displayName":{"type":"string"},"username":{"type":"string"},"isBot":{"type":"boolean"},"guild":{"description":"Null when the user can't manage the server, so the dashboard opens without one.","anyOf":[{"$ref":"#/components/schemas/HandoffGuildDto"},{"type":"null"}]},"applicationId":{"type":["string","null"]},"avatarUrl":{"type":["string","null"]}},"required":["roles","userId","displayName","username","isBot","guild","applicationId","avatarUrl"]},"UserRoles":{"type":"string","enum":["user","admin","viewer","fetch:wars","fetch:clans","fetch:players","fetch:legends","fetch:links","manage:links","fetch:rosters","manage:rosters","manage:reminders"]},"HandoffGuildDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"iconUrl":{"type":["string","null"]}},"required":["id","name","iconUrl"]}}}}
```

## The HandoffTokenInputDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"HandoffTokenInputDto":{"type":"object","properties":{"userId":{"type":"string"},"guildId":{"type":"string"},"applicationId":{"type":["string","null"]}},"required":["userId","guildId","applicationId"]}}}}
```

## The HandoffTokenDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"HandoffTokenDto":{"type":"object","properties":{"token":{"type":"string"}},"required":["token"]}}}}
```

## The BotGuildsInputDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"BotGuildsInputDto":{"type":"object","properties":{"guildIds":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string"}}},"required":["guildIds"]}}}}
```

## The BotGuildDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"BotGuildDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"iconUrl":{"type":["string","null"]},"clanCount":{"type":"number"}},"required":["id","name","iconUrl","clanCount"]}}}}
```

## The BotGuildsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"BotGuildsDto":{"type":"object","properties":{"guilds":{"type":"array","items":{"$ref":"#/components/schemas/BotGuildDto"}}},"required":["guilds"]},"BotGuildDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"iconUrl":{"type":["string","null"]},"clanCount":{"type":"number"}},"required":["id","name","iconUrl","clanCount"]}}}}
```

## The ManagedGuildsInputDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ManagedGuildsInputDto":{"type":"object","properties":{"guildIds":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string"}},"userId":{"type":"string","pattern":"^\\d{17,20}$"}},"required":["guildIds","userId"]}}}}
```

## The ManagedGuildsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ManagedGuildsDto":{"type":"object","properties":{"guildIds":{"description":"Servers where the user holds one of the bot manager roles.","type":"array","items":{"type":"string"}}},"required":["guildIds"]}}}}
```

## The GuildAccessInputDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GuildAccessInputDto":{"type":"object","properties":{"userId":{"type":"string","pattern":"^\\d{17,20}$"},"guildId":{"type":"string","pattern":"^\\d{17,20}$"},"applicationId":{"type":["string","null"],"description":"The custom bot the session uses; without it, the API picks the server's bot.","pattern":"^\\d{17,20}$"}},"required":["userId","guildId"]}}}}
```

## The GuildAccessDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GuildAccessDto":{"type":"object","properties":{"hasBot":{"type":"boolean","description":"False when the bot was never added to the server or has been removed."},"canManage":{"type":"boolean","description":"Owner, Administrator, Manage Server or the bot manager role."},"applicationId":{"type":["string","null"],"description":"The bot to act through in the server: a custom bot's ID, or null for ClashPerk."}},"required":["hasBot","canManage","applicationId"]}}}}
```

## The CreateLinkInputDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"CreateLinkInputDto":{"type":"object","properties":{"playerTag":{"type":"string"},"userId":{"type":"string"},"apiToken":{"type":["string","null"]}},"required":["playerTag","userId","apiToken"]}}}}
```

## The ResultOkDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ResultOkDto":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}
```

## The SetHiddenInputDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"SetHiddenInputDto":{"type":"object","properties":{"hidden":{"type":"boolean"}},"required":["hidden"]}}}}
```

## The LinksDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LinksDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"userId":{"type":"string"},"username":{"type":"string"},"verified":{"type":"boolean"},"hidden":{"type":"boolean","description":"Left out of the owner's task lists."}},"required":["tag","name","userId","username","verified"]}}}}
```

## The GetLinksInputDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GetLinksInputDto":{"type":"object","properties":{"playerTags":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}},"userIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}}}}}}}
```

## The ClanActivityType object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanActivityType":{"type":"string","enum":["town_hall_upgrade","joined","left","clan_level_up","capital_hall_level_up","war_league_change","capital_league_change"],"description":"Only these event types; all of them when omitted."}}}}
```

## The ClanActivityInputDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanActivityInputDto":{"type":"object","properties":{"clanTags":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string"}},"days":{"type":"number","default":7,"minimum":1,"maximum":30},"limit":{"type":"number","default":50,"minimum":1,"maximum":100},"types":{"type":"array","description":"Only these event types; all of them when omitted.","default":["town_hall_upgrade","joined","left","clan_level_up","capital_hall_level_up","war_league_change","capital_league_change"],"minItems":1,"items":{"$ref":"#/components/schemas/ClanActivityType"}}},"required":["clanTags"]},"ClanActivityType":{"type":"string","enum":["town_hall_upgrade","joined","left","clan_level_up","capital_hall_level_up","war_league_change","capital_league_change"],"description":"Only these event types; all of them when omitted."}}}}
```

## The ClanActivityPlayerDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanActivityPlayerDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The ClanActivityClanDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanActivityClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The ClanActivityItemDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanActivityItemDto":{"type":"object","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/ClanActivityType"}]},"player":{"description":"Who it happened to; null for clan-wide events.","anyOf":[{"$ref":"#/components/schemas/ClanActivityPlayerDto"},{"type":"null"}]},"level":{"type":["number","null"],"description":"The new Town Hall, clan or Capital Hall level; null otherwise."},"league":{"type":["string","null"],"description":"The new war or capital league; null otherwise."},"createdAt":{"format":"date-time","type":"string"},"clan":{"$ref":"#/components/schemas/ClanActivityClanDto"}},"required":["type","player","level","league","createdAt","clan"]},"ClanActivityType":{"type":"string","enum":["town_hall_upgrade","joined","left","clan_level_up","capital_hall_level_up","war_league_change","capital_league_change"],"description":"Only these event types; all of them when omitted."},"ClanActivityPlayerDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]},"ClanActivityClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The ClanActivityDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanActivityDto":{"type":"object","properties":{"items":{"description":"Newest first.","type":"array","items":{"$ref":"#/components/schemas/ClanActivityItemDto"}}},"required":["items"]},"ClanActivityItemDto":{"type":"object","properties":{"type":{"allOf":[{"$ref":"#/components/schemas/ClanActivityType"}]},"player":{"description":"Who it happened to; null for clan-wide events.","anyOf":[{"$ref":"#/components/schemas/ClanActivityPlayerDto"},{"type":"null"}]},"level":{"type":["number","null"],"description":"The new Town Hall, clan or Capital Hall level; null otherwise."},"league":{"type":["string","null"],"description":"The new war or capital league; null otherwise."},"createdAt":{"format":"date-time","type":"string"},"clan":{"$ref":"#/components/schemas/ClanActivityClanDto"}},"required":["type","player","level","league","createdAt","clan"]},"ClanActivityType":{"type":"string","enum":["town_hall_upgrade","joined","left","clan_level_up","capital_hall_level_up","war_league_change","capital_league_change"],"description":"Only these event types; all of them when omitted."},"ClanActivityPlayerDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]},"ClanActivityClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The LocationDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LocationDto":{"type":"object","properties":{"localizedName":{"type":"string"},"id":{"type":"number"},"name":{"type":"string"},"isCountry":{"type":"boolean"},"countryCode":{"type":"string"}},"required":["id","name","isCountry"]}}}}
```

## The ChatLanguageDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ChatLanguageDto":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"number"},"languageCode":{"type":"string"}},"required":["name","id","languageCode"]}}}}
```

## The ClanBadge object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanBadge":{"type":"object","properties":{"large":{"type":"string"},"small":{"type":"string"},"medium":{"type":"string"}},"required":["large","small","medium"]}}}}
```

## The NamedLeagueDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"NamedLeagueDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"required":["id","name"]}}}}
```

## The IconUrlsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"IconUrlsDto":{"type":"object","properties":{"small":{"type":"string"},"tiny":{"type":"string"},"medium":{"type":"string"}},"required":["small"]}}}}
```

## The LabelDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LabelDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"iconUrls":{"$ref":"#/components/schemas/IconUrlsDto"}},"required":["id","name","iconUrls"]},"IconUrlsDto":{"type":"object","properties":{"small":{"type":"string"},"tiny":{"type":"string"},"medium":{"type":"string"}},"required":["small"]}}}}
```

## The LeagueTierIconUrlsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LeagueTierIconUrlsDto":{"type":"object","properties":{"small":{"type":"string"},"large":{"type":"string"}},"required":["small","large"]}}}}
```

## The LeagueTierDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LeagueTierDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"iconUrls":{"$ref":"#/components/schemas/LeagueTierIconUrlsDto"}},"required":["id","name","iconUrls"]},"LeagueTierIconUrlsDto":{"type":"object","properties":{"small":{"type":"string"},"large":{"type":"string"}},"required":["small","large"]}}}}
```

## The PlayerHouseElementDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"PlayerHouseElementDto":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"number"}},"required":["type","id"]}}}}
```

## The PlayerHouseDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"PlayerHouseDto":{"type":"object","properties":{"elements":{"type":"array","items":{"$ref":"#/components/schemas/PlayerHouseElementDto"}}},"required":["elements"]},"PlayerHouseElementDto":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"number"}},"required":["type","id"]}}}}
```

## The ClanMemberDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanMemberDto":{"type":"object","properties":{"role":{"enum":["member","admin","coLeader","leader"],"type":"string"},"name":{"type":"string"},"tag":{"type":"string"},"expLevel":{"type":"number"},"townHallLevel":{"type":"number"},"leagueTier":{"$ref":"#/components/schemas/LeagueTierDto"},"builderBaseLeague":{"$ref":"#/components/schemas/NamedLeagueDto"},"trophies":{"type":"number"},"builderBaseTrophies":{"type":"number"},"clanRank":{"type":"number"},"previousClanRank":{"type":"number"},"donations":{"type":"number"},"donationsReceived":{"type":"number"},"playerHouse":{"$ref":"#/components/schemas/PlayerHouseDto"}},"required":["role","name","tag","expLevel","townHallLevel","leagueTier","trophies","clanRank","previousClanRank","donations","donationsReceived"]},"LeagueTierDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"iconUrls":{"$ref":"#/components/schemas/LeagueTierIconUrlsDto"}},"required":["id","name","iconUrls"]},"LeagueTierIconUrlsDto":{"type":"object","properties":{"small":{"type":"string"},"large":{"type":"string"}},"required":["small","large"]},"NamedLeagueDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"required":["id","name"]},"PlayerHouseDto":{"type":"object","properties":{"elements":{"type":"array","items":{"$ref":"#/components/schemas/PlayerHouseElementDto"}}},"required":["elements"]},"PlayerHouseElementDto":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"number"}},"required":["type","id"]}}}}
```

## The ClanCapitalDistrictDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanCapitalDistrictDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"districtHallLevel":{"type":"number"}},"required":["id","name","districtHallLevel"]}}}}
```

## The ClanCapitalDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanCapitalDto":{"type":"object","properties":{"capitalHallLevel":{"type":"number"},"districts":{"type":"array","items":{"$ref":"#/components/schemas/ClanCapitalDistrictDto"}}}},"ClanCapitalDistrictDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"districtHallLevel":{"type":"number"}},"required":["id","name","districtHallLevel"]}}}}
```

## The ClanDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanDto":{"type":"object","properties":{"type":{"enum":["open","inviteOnly","closed"],"type":"string"},"warFrequency":{"enum":["always","moreThanOncePerWeek","oncePerWeek","lessThanOncePerWeek","never","unknown"],"type":"string"},"tag":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"location":{"$ref":"#/components/schemas/LocationDto"},"chatLanguage":{"$ref":"#/components/schemas/ChatLanguageDto"},"badgeUrls":{"$ref":"#/components/schemas/ClanBadge"},"clanLevel":{"type":"number"},"clanPoints":{"type":"number"},"clanBuilderBasePoints":{"type":"number"},"requiredTrophies":{"type":"number"},"requiredTownhallLevel":{"type":"number"},"requiredBuilderBaseTrophies":{"type":"number"},"warWinStreak":{"type":"number"},"warWins":{"type":"number"},"warTies":{"type":"number"},"warLosses":{"type":"number"},"isWarLogPublic":{"type":"boolean"},"warLeague":{"$ref":"#/components/schemas/NamedLeagueDto"},"members":{"type":"number"},"labels":{"type":"array","items":{"$ref":"#/components/schemas/LabelDto"}},"memberList":{"type":"array","items":{"$ref":"#/components/schemas/ClanMemberDto"}},"clanCapital":{"$ref":"#/components/schemas/ClanCapitalDto"},"isFamilyFriendly":{"type":"boolean"},"clanCapitalPoints":{"type":"number"},"capitalLeague":{"$ref":"#/components/schemas/NamedLeagueDto"}},"required":["type","tag","name","description","badgeUrls","clanLevel","clanPoints","clanBuilderBasePoints","requiredTrophies","warWinStreak","warWins","isWarLogPublic","members","labels","memberList","clanCapital","isFamilyFriendly","clanCapitalPoints"]},"LocationDto":{"type":"object","properties":{"localizedName":{"type":"string"},"id":{"type":"number"},"name":{"type":"string"},"isCountry":{"type":"boolean"},"countryCode":{"type":"string"}},"required":["id","name","isCountry"]},"ChatLanguageDto":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"number"},"languageCode":{"type":"string"}},"required":["name","id","languageCode"]},"ClanBadge":{"type":"object","properties":{"large":{"type":"string"},"small":{"type":"string"},"medium":{"type":"string"}},"required":["large","small","medium"]},"NamedLeagueDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"required":["id","name"]},"LabelDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"iconUrls":{"$ref":"#/components/schemas/IconUrlsDto"}},"required":["id","name","iconUrls"]},"IconUrlsDto":{"type":"object","properties":{"small":{"type":"string"},"tiny":{"type":"string"},"medium":{"type":"string"}},"required":["small"]},"ClanMemberDto":{"type":"object","properties":{"role":{"enum":["member","admin","coLeader","leader"],"type":"string"},"name":{"type":"string"},"tag":{"type":"string"},"expLevel":{"type":"number"},"townHallLevel":{"type":"number"},"leagueTier":{"$ref":"#/components/schemas/LeagueTierDto"},"builderBaseLeague":{"$ref":"#/components/schemas/NamedLeagueDto"},"trophies":{"type":"number"},"builderBaseTrophies":{"type":"number"},"clanRank":{"type":"number"},"previousClanRank":{"type":"number"},"donations":{"type":"number"},"donationsReceived":{"type":"number"},"playerHouse":{"$ref":"#/components/schemas/PlayerHouseDto"}},"required":["role","name","tag","expLevel","townHallLevel","leagueTier","trophies","clanRank","previousClanRank","donations","donationsReceived"]},"LeagueTierDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"iconUrls":{"$ref":"#/components/schemas/LeagueTierIconUrlsDto"}},"required":["id","name","iconUrls"]},"LeagueTierIconUrlsDto":{"type":"object","properties":{"small":{"type":"string"},"large":{"type":"string"}},"required":["small","large"]},"PlayerHouseDto":{"type":"object","properties":{"elements":{"type":"array","items":{"$ref":"#/components/schemas/PlayerHouseElementDto"}}},"required":["elements"]},"PlayerHouseElementDto":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"number"}},"required":["type","id"]},"ClanCapitalDto":{"type":"object","properties":{"capitalHallLevel":{"type":"number"},"districts":{"type":"array","items":{"$ref":"#/components/schemas/ClanCapitalDistrictDto"}}}},"ClanCapitalDistrictDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"districtHallLevel":{"type":"number"}},"required":["id","name","districtHallLevel"]}}}}
```

## The LastSeenMemberClan object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LastSeenMemberClan":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"}},"required":["name","tag"]}}}}
```

## The LastSeenMemberDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LastSeenMemberDto":{"type":"object","properties":{"clan":{"$ref":"#/components/schemas/LastSeenMemberClan"},"name":{"type":"string"},"tag":{"type":"string"},"lastSeen":{"format":"date-time","type":"string"},"leagueId":{"type":"number"},"townHallLevel":{"type":"number"},"scores":{"type":"object","properties":{"last24h":{"type":"number"},"last30d":{"type":"number"}},"required":["last24h","last30d"]}},"required":["name","tag","lastSeen","leagueId","townHallLevel","scores"]},"LastSeenMemberClan":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"}},"required":["name","tag"]}}}}
```

## The LastSeenDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LastSeenDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/LastSeenMemberDto"}}},"required":["items"]},"LastSeenMemberDto":{"type":"object","properties":{"clan":{"$ref":"#/components/schemas/LastSeenMemberClan"},"name":{"type":"string"},"tag":{"type":"string"},"lastSeen":{"format":"date-time","type":"string"},"leagueId":{"type":"number"},"townHallLevel":{"type":"number"},"scores":{"type":"object","properties":{"last24h":{"type":"number"},"last30d":{"type":"number"}},"required":["last24h","last30d"]}},"required":["name","tag","lastSeen","leagueId","townHallLevel","scores"]},"LastSeenMemberClan":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"}},"required":["name","tag"]}}}}
```

## The BattleLogDailyDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"BattleLogDailyDto":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"},"battleDate":{"type":"string"},"trophies":{"type":"number"},"offenseTrophies":{"type":"number"},"defenseTrophies":{"type":"number"},"gain":{"type":"number"},"attackCount":{"type":"number"},"defenseCount":{"type":"number"}},"required":["name","tag","battleDate","trophies","offenseTrophies","defenseTrophies","gain","attackCount","defenseCount"]}}}}
```

## The BattleLogAggregateItemsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"BattleLogAggregateItemsDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BattleLogDailyDto"}}},"required":["items"]},"BattleLogDailyDto":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"},"battleDate":{"type":"string"},"trophies":{"type":"number"},"offenseTrophies":{"type":"number"},"defenseTrophies":{"type":"number"},"gain":{"type":"number"},"attackCount":{"type":"number"},"defenseCount":{"type":"number"}},"required":["name","tag","battleDate","trophies","offenseTrophies","defenseTrophies","gain","attackCount","defenseCount"]}}}}
```

## The BattleLogLeaderboardItemDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"BattleLogLeaderboardItemDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"trophies":{"type":"number"}},"required":["tag","name","trophies"]}}}}
```

## The BattleLogLeaderboardDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"BattleLogLeaderboardDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BattleLogLeaderboardItemDto"}}},"required":["items"]},"BattleLogLeaderboardItemDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"trophies":{"type":"number"}},"required":["tag","name","trophies"]}}}}
```

## The CapitalContributionClanDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"CapitalContributionClanDto":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"}},"required":["name","tag"]}}}}
```

## The CapitalContributionItemDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"CapitalContributionItemDto":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"},"season":{"type":"string"},"initial":{"type":"number"},"current":{"type":"number"},"clan":{"$ref":"#/components/schemas/CapitalContributionClanDto"},"createdAt":{"format":"date-time","type":"string"}},"required":["name","tag","season","initial","current","clan","createdAt"]},"CapitalContributionClanDto":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"}},"required":["name","tag"]}}}}
```

## The CapitalContributionDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"CapitalContributionDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CapitalContributionItemDto"}}},"required":["items"]},"CapitalContributionItemDto":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"},"season":{"type":"string"},"initial":{"type":"number"},"current":{"type":"number"},"clan":{"$ref":"#/components/schemas/CapitalContributionClanDto"},"createdAt":{"format":"date-time","type":"string"}},"required":["name","tag","season","initial","current","clan","createdAt"]},"CapitalContributionClanDto":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"}},"required":["name","tag"]}}}}
```

## The CapitalRaidMemberDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"CapitalRaidMemberDto":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"},"attacks":{"type":"number"},"attackLimit":{"type":"number"},"bonusAttackLimit":{"type":"number"},"capitalResourcesLooted":{"type":"number"}},"required":["name","tag","attacks","attackLimit","bonusAttackLimit","capitalResourcesLooted"]}}}}
```

## The CapitalRaidSeasonDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"CapitalRaidSeasonDto":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"},"state":{"type":"string"},"members":{"type":"array","items":{"$ref":"#/components/schemas/CapitalRaidMemberDto"}},"startDate":{"format":"date-time","type":"string"},"endDate":{"format":"date-time","type":"string"},"offensiveReward":{"type":"number"},"defensiveReward":{"type":"number"},"capitalTotalLoot":{"type":"number"},"totalAttacks":{"type":"number"},"enemyDistrictsDestroyed":{"type":"number"},"raidsCompleted":{"type":"number"}},"required":["name","tag","state","members","startDate","endDate","offensiveReward","defensiveReward","capitalTotalLoot","totalAttacks","enemyDistrictsDestroyed","raidsCompleted"]},"CapitalRaidMemberDto":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"},"attacks":{"type":"number"},"attackLimit":{"type":"number"},"bonusAttackLimit":{"type":"number"},"capitalResourcesLooted":{"type":"number"}},"required":["name","tag","attacks","attackLimit","bonusAttackLimit","capitalResourcesLooted"]}}}}
```

## The CapitalRaidsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"CapitalRaidsDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CapitalRaidSeasonDto"}}},"required":["items"]},"CapitalRaidSeasonDto":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"},"state":{"type":"string"},"members":{"type":"array","items":{"$ref":"#/components/schemas/CapitalRaidMemberDto"}},"startDate":{"format":"date-time","type":"string"},"endDate":{"format":"date-time","type":"string"},"offensiveReward":{"type":"number"},"defensiveReward":{"type":"number"},"capitalTotalLoot":{"type":"number"},"totalAttacks":{"type":"number"},"enemyDistrictsDestroyed":{"type":"number"},"raidsCompleted":{"type":"number"}},"required":["name","tag","state","members","startDate","endDate","offensiveReward","defensiveReward","capitalTotalLoot","totalAttacks","enemyDistrictsDestroyed","raidsCompleted"]},"CapitalRaidMemberDto":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"},"attacks":{"type":"number"},"attackLimit":{"type":"number"},"bonusAttackLimit":{"type":"number"},"capitalResourcesLooted":{"type":"number"}},"required":["name","tag","attacks","attackLimit","bonusAttackLimit","capitalResourcesLooted"]}}}}
```

## The ClanGamesMemberDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanGamesMemberDto":{"type":"object","properties":{"completedAt":{"type":["string","null"],"format":"date-time"},"name":{"type":"string"},"tag":{"type":"string"},"points":{"type":"number"}},"required":["completedAt","name","tag","points"]}}}}
```

## The ClanGamesDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanGamesDto":{"type":"object","properties":{"season":{"type":"string"},"startTime":{"format":"date-time","type":"string"},"endTime":{"format":"date-time","type":"string"},"maxPoints":{"type":"number","description":"Most points one member can earn."},"totalPoints":{"type":"number","description":"Sum of each member's points, capped at `maxPoints`."},"members":{"type":"array","items":{"$ref":"#/components/schemas/ClanGamesMemberDto"}}},"required":["season","startTime","endTime","maxPoints","totalPoints","members"]},"ClanGamesMemberDto":{"type":"object","properties":{"completedAt":{"type":["string","null"],"format":"date-time"},"name":{"type":"string"},"tag":{"type":"string"},"points":{"type":"number"}},"required":["completedAt","name","tag","points"]}}}}
```

## The ClanLinkedMemberDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanLinkedMemberDto":{"type":"object","properties":{"userId":{"type":["string","null"]},"username":{"type":["string","null"]},"displayName":{"type":["string","null"]},"name":{"type":"string"},"tag":{"type":"string"},"role":{"type":"string"},"townHallLevel":{"type":"number"},"verified":{"type":"boolean"},"deletable":{"type":"boolean"}},"required":["name","tag","role","townHallLevel","verified","deletable"]}}}}
```

## The ClanLinksDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanLinksDto":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"},"members":{"type":"number"},"memberList":{"type":"array","items":{"$ref":"#/components/schemas/ClanLinkedMemberDto"}}},"required":["name","tag","members","memberList"]},"ClanLinkedMemberDto":{"type":"object","properties":{"userId":{"type":["string","null"]},"username":{"type":["string","null"]},"displayName":{"type":["string","null"]},"name":{"type":"string"},"tag":{"type":"string"},"role":{"type":"string"},"townHallLevel":{"type":"number"},"verified":{"type":"boolean"},"deletable":{"type":"boolean"}},"required":["name","tag","role","townHallLevel","verified","deletable"]}}}}
```

## The PlayerClanDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"PlayerClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"clanLevel":{"type":"number"},"badgeUrls":{"$ref":"#/components/schemas/ClanBadge"}},"required":["tag","name","clanLevel","badgeUrls"]},"ClanBadge":{"type":"object","properties":{"large":{"type":"string"},"small":{"type":"string"},"medium":{"type":"string"}},"required":["large","small","medium"]}}}}
```

## The PlayerSeasonDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"PlayerSeasonDto":{"type":"object","properties":{"id":{"type":"string"},"rank":{"type":"number"},"trophies":{"type":"number"}},"required":["id","rank","trophies"]}}}}
```

## The PlayerCurrentSeasonDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"PlayerCurrentSeasonDto":{"type":"object","properties":{"id":{"type":"string"},"rank":{"type":"number"},"trophies":{"type":"number"}},"required":["trophies"]}}}}
```

## The LegendStatisticsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendStatisticsDto":{"type":"object","properties":{"previousSeason":{"$ref":"#/components/schemas/PlayerSeasonDto"},"previousBuilderBaseSeason":{"$ref":"#/components/schemas/PlayerSeasonDto"},"bestBuilderBaseSeason":{"$ref":"#/components/schemas/PlayerSeasonDto"},"currentSeason":{"$ref":"#/components/schemas/PlayerCurrentSeasonDto"},"bestSeason":{"$ref":"#/components/schemas/PlayerSeasonDto"},"legendTrophies":{"type":"number"}},"required":["legendTrophies"]},"PlayerSeasonDto":{"type":"object","properties":{"id":{"type":"string"},"rank":{"type":"number"},"trophies":{"type":"number"}},"required":["id","rank","trophies"]},"PlayerCurrentSeasonDto":{"type":"object","properties":{"id":{"type":"string"},"rank":{"type":"number"},"trophies":{"type":"number"}},"required":["trophies"]}}}}
```

## The PlayerAchievementDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"PlayerAchievementDto":{"type":"object","properties":{"completionInfo":{"type":["string","null"]},"village":{"enum":["home","builderBase"],"type":"string"},"name":{"type":"string"},"stars":{"type":"number"},"value":{"type":"number"},"target":{"type":"number"},"info":{"type":"string"}},"required":["completionInfo","village","name","stars","value","target","info"]}}}}
```

## The PlayerItemDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"PlayerItemDto":{"type":"object","properties":{"equipment":{"type":"array","items":{"$ref":"#/components/schemas/PlayerItemDto"}},"village":{"enum":["home","builderBase"],"type":"string"},"name":{"type":"string"},"level":{"type":"number"},"maxLevel":{"type":"number"},"superTroopIsActive":{"type":"boolean"}},"required":["village","name","level","maxLevel"]}}}}
```

## The PlayerDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"PlayerDto":{"type":"object","properties":{"warPreference":{"enum":["in","out"],"type":"string"},"name":{"type":"string"},"tag":{"type":"string"},"townHallLevel":{"type":"number"},"townHallWeaponLevel":{"type":"number"},"expLevel":{"type":"number"},"trophies":{"type":"number"},"bestTrophies":{"type":"number"},"warStars":{"type":"number"},"attackWins":{"type":"number"},"defenseWins":{"type":"number"},"builderHallLevel":{"type":"number"},"builderBaseTrophies":{"type":"number"},"bestBuilderBaseTrophies":{"type":"number"},"donations":{"type":"number"},"donationsReceived":{"type":"number"},"clanCapitalContributions":{"type":"number"},"role":{"type":"string"},"clan":{"$ref":"#/components/schemas/PlayerClanDto"},"leagueTier":{"$ref":"#/components/schemas/LeagueTierDto"},"builderBaseLeague":{"$ref":"#/components/schemas/NamedLeagueDto"},"currentLeagueGroupTag":{"type":"string"},"currentLeagueSeasonId":{"type":"number"},"previousLeagueGroupTag":{"type":"string"},"previousLeagueSeasonId":{"type":"number"},"legendStatistics":{"$ref":"#/components/schemas/LegendStatisticsDto"},"achievements":{"type":"array","items":{"$ref":"#/components/schemas/PlayerAchievementDto"}},"troops":{"type":"array","items":{"$ref":"#/components/schemas/PlayerItemDto"}},"heroes":{"type":"array","items":{"$ref":"#/components/schemas/PlayerItemDto"}},"spells":{"type":"array","items":{"$ref":"#/components/schemas/PlayerItemDto"}},"heroEquipment":{"type":"array","items":{"$ref":"#/components/schemas/PlayerItemDto"}},"labels":{"type":"array","items":{"$ref":"#/components/schemas/LabelDto"}},"playerHouse":{"$ref":"#/components/schemas/PlayerHouseDto"}},"required":["name","tag","townHallLevel","expLevel","trophies","bestTrophies","warStars","attackWins","defenseWins","donations","donationsReceived","clanCapitalContributions","leagueTier","currentLeagueGroupTag","currentLeagueSeasonId","previousLeagueGroupTag","previousLeagueSeasonId","achievements","troops","heroes","spells","heroEquipment","labels"]},"PlayerClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"clanLevel":{"type":"number"},"badgeUrls":{"$ref":"#/components/schemas/ClanBadge"}},"required":["tag","name","clanLevel","badgeUrls"]},"ClanBadge":{"type":"object","properties":{"large":{"type":"string"},"small":{"type":"string"},"medium":{"type":"string"}},"required":["large","small","medium"]},"LeagueTierDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"iconUrls":{"$ref":"#/components/schemas/LeagueTierIconUrlsDto"}},"required":["id","name","iconUrls"]},"LeagueTierIconUrlsDto":{"type":"object","properties":{"small":{"type":"string"},"large":{"type":"string"}},"required":["small","large"]},"NamedLeagueDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"required":["id","name"]},"LegendStatisticsDto":{"type":"object","properties":{"previousSeason":{"$ref":"#/components/schemas/PlayerSeasonDto"},"previousBuilderBaseSeason":{"$ref":"#/components/schemas/PlayerSeasonDto"},"bestBuilderBaseSeason":{"$ref":"#/components/schemas/PlayerSeasonDto"},"currentSeason":{"$ref":"#/components/schemas/PlayerCurrentSeasonDto"},"bestSeason":{"$ref":"#/components/schemas/PlayerSeasonDto"},"legendTrophies":{"type":"number"}},"required":["legendTrophies"]},"PlayerSeasonDto":{"type":"object","properties":{"id":{"type":"string"},"rank":{"type":"number"},"trophies":{"type":"number"}},"required":["id","rank","trophies"]},"PlayerCurrentSeasonDto":{"type":"object","properties":{"id":{"type":"string"},"rank":{"type":"number"},"trophies":{"type":"number"}},"required":["trophies"]},"PlayerAchievementDto":{"type":"object","properties":{"completionInfo":{"type":["string","null"]},"village":{"enum":["home","builderBase"],"type":"string"},"name":{"type":"string"},"stars":{"type":"number"},"value":{"type":"number"},"target":{"type":"number"},"info":{"type":"string"}},"required":["completionInfo","village","name","stars","value","target","info"]},"PlayerItemDto":{"type":"object","properties":{"equipment":{"type":"array","items":{"$ref":"#/components/schemas/PlayerItemDto"}},"village":{"enum":["home","builderBase"],"type":"string"},"name":{"type":"string"},"level":{"type":"number"},"maxLevel":{"type":"number"},"superTroopIsActive":{"type":"boolean"}},"required":["village","name","level","maxLevel"]},"LabelDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"iconUrls":{"$ref":"#/components/schemas/IconUrlsDto"}},"required":["id","name","iconUrls"]},"IconUrlsDto":{"type":"object","properties":{"small":{"type":"string"},"tiny":{"type":"string"},"medium":{"type":"string"}},"required":["small"]},"PlayerHouseDto":{"type":"object","properties":{"elements":{"type":"array","items":{"$ref":"#/components/schemas/PlayerHouseElementDto"}}},"required":["elements"]},"PlayerHouseElementDto":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"number"}},"required":["type","id"]}}}}
```

## The PlayerSeasonClanStatsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"PlayerSeasonClanStatsDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"donations":{"type":"number"},"donationsReceived":{"type":"number"}},"required":["tag","name","donations","donationsReceived"]}}}}
```

## The PlayerSeasonStatsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"PlayerSeasonStatsDto":{"type":"object","properties":{"season":{"type":"string","description":"The league season's start date, `YYYY-MM-DD`."},"townHallLevel":{"type":"number"},"trophies":{"type":"number"},"attackWins":{"type":"number"},"defenseWins":{"type":"number"},"donations":{"type":"number"},"donationsReceived":{"type":"number"},"warStars":{"type":"number"},"cwlStars":{"type":"number"},"capitalGold":{"type":"number"},"clanGamesPoints":{"type":"number"},"goldLoot":{"type":"number"},"elixirLoot":{"type":"number"},"darkElixirLoot":{"type":"number"},"clans":{"type":"array","items":{"$ref":"#/components/schemas/PlayerSeasonClanStatsDto"}}},"required":["season","townHallLevel","trophies","attackWins","defenseWins","donations","donationsReceived","warStars","cwlStars","capitalGold","clanGamesPoints","goldLoot","elixirLoot","darkElixirLoot","clans"]},"PlayerSeasonClanStatsDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"donations":{"type":"number"},"donationsReceived":{"type":"number"}},"required":["tag","name","donations","donationsReceived"]}}}}
```

## The PlayerSeasonStatsItemsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"PlayerSeasonStatsItemsDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PlayerSeasonStatsDto"}}},"required":["items"]},"PlayerSeasonStatsDto":{"type":"object","properties":{"season":{"type":"string","description":"The league season's start date, `YYYY-MM-DD`."},"townHallLevel":{"type":"number"},"trophies":{"type":"number"},"attackWins":{"type":"number"},"defenseWins":{"type":"number"},"donations":{"type":"number"},"donationsReceived":{"type":"number"},"warStars":{"type":"number"},"cwlStars":{"type":"number"},"capitalGold":{"type":"number"},"clanGamesPoints":{"type":"number"},"goldLoot":{"type":"number"},"elixirLoot":{"type":"number"},"darkElixirLoot":{"type":"number"},"clans":{"type":"array","items":{"$ref":"#/components/schemas/PlayerSeasonClanStatsDto"}}},"required":["season","townHallLevel","trophies","attackWins","defenseWins","donations","donationsReceived","warStars","cwlStars","capitalGold","clanGamesPoints","goldLoot","elixirLoot","darkElixirLoot","clans"]},"PlayerSeasonClanStatsDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"donations":{"type":"number"},"donationsReceived":{"type":"number"}},"required":["tag","name","donations","donationsReceived"]}}}}
```

## The RankedLeagueDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RankedLeagueDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"iconUrl":{"type":["string","null"]}},"required":["id","name","iconUrl"]}}}}
```

## The RankedClanDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RankedClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The RankedGroupMemberDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RankedGroupMemberDto":{"type":"object","properties":{"clan":{"description":"Null when the player isn't in a clan.","anyOf":[{"$ref":"#/components/schemas/RankedClanDto"},{"type":"null"}]},"rank":{"type":"number"},"tag":{"type":"string"},"name":{"type":"string"},"trophies":{"type":"number"},"attackWins":{"type":"number"},"attackLosses":{"type":"number"},"defenseWins":{"type":"number"},"defenseLosses":{"type":"number"}},"required":["clan","rank","tag","name","trophies","attackWins","attackLosses","defenseWins","defenseLosses"]},"RankedClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The RankedOpponentDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RankedOpponentDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The RankedBattleDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RankedBattleDto":{"type":"object","properties":{"opponent":{"$ref":"#/components/schemas/RankedOpponentDto"},"stars":{"type":"number"},"destruction":{"type":"number"},"trophies":{"type":"number","description":"League trophies the player earned from this battle, on attack or on defense."},"createdAt":{"format":"date-time","type":"string"}},"required":["opponent","stars","destruction","trophies","createdAt"]},"RankedOpponentDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The RankedWeekDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RankedWeekDto":{"type":"object","properties":{"maxBattles":{"type":["number","null"],"description":"Attacks allowed this week, and the most defenses taken; null when the game data is unavailable."},"league":{"$ref":"#/components/schemas/RankedLeagueDto"},"startTime":{"format":"date-time","type":"string"},"endTime":{"format":"date-time","type":"string"},"rank":{"type":"number"},"total":{"type":"number","description":"Players in the group."},"promotionZone":{"type":"number","description":"The top this many move up a league at the end of the week; 0 when nobody does."},"demotionZone":{"type":"number","description":"The bottom this many move down; 0 when nobody does."},"trophies":{"type":"number"},"members":{"description":"Standings, best first.","type":"array","items":{"$ref":"#/components/schemas/RankedGroupMemberDto"}},"attacks":{"description":"The player's own attacks and defenses, newest first.","type":"array","items":{"$ref":"#/components/schemas/RankedBattleDto"}},"defenses":{"type":"array","items":{"$ref":"#/components/schemas/RankedBattleDto"}},"attackWins":{"type":"number"},"attackLosses":{"type":"number"},"defenseWins":{"type":"number"},"defenseLosses":{"type":"number"}},"required":["maxBattles","league","startTime","endTime","rank","total","promotionZone","demotionZone","trophies","members","attacks","defenses","attackWins","attackLosses","defenseWins","defenseLosses"]},"RankedLeagueDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"iconUrl":{"type":["string","null"]}},"required":["id","name","iconUrl"]},"RankedGroupMemberDto":{"type":"object","properties":{"clan":{"description":"Null when the player isn't in a clan.","anyOf":[{"$ref":"#/components/schemas/RankedClanDto"},{"type":"null"}]},"rank":{"type":"number"},"tag":{"type":"string"},"name":{"type":"string"},"trophies":{"type":"number"},"attackWins":{"type":"number"},"attackLosses":{"type":"number"},"defenseWins":{"type":"number"},"defenseLosses":{"type":"number"}},"required":["clan","rank","tag","name","trophies","attackWins","attackLosses","defenseWins","defenseLosses"]},"RankedClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]},"RankedBattleDto":{"type":"object","properties":{"opponent":{"$ref":"#/components/schemas/RankedOpponentDto"},"stars":{"type":"number"},"destruction":{"type":"number"},"trophies":{"type":"number","description":"League trophies the player earned from this battle, on attack or on defense."},"createdAt":{"format":"date-time","type":"string"}},"required":["opponent","stars","destruction","trophies","createdAt"]},"RankedOpponentDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The RankedHistoryItemDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RankedHistoryItemDto":{"type":"object","properties":{"league":{"$ref":"#/components/schemas/RankedLeagueDto"},"startTime":{"format":"date-time","type":"string"},"placement":{"type":"number"},"trophies":{"type":"number"},"defenseStars":{"type":"number"},"maxBattles":{"type":"number"},"attackWins":{"type":"number"},"attackLosses":{"type":"number"},"defenseWins":{"type":"number"},"defenseLosses":{"type":"number"}},"required":["league","startTime","placement","trophies","defenseStars","maxBattles","attackWins","attackLosses","defenseWins","defenseLosses"]},"RankedLeagueDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"iconUrl":{"type":["string","null"]}},"required":["id","name","iconUrl"]}}}}
```

## The RankedDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RankedDto":{"type":"object","properties":{"current":{"description":"This week's group; null when the player isn't in one (between weeks, or unranked).","anyOf":[{"$ref":"#/components/schemas/RankedWeekDto"},{"type":"null"}]},"lastWeek":{"description":"Last week's group, while this week's has no battles yet. Null otherwise.","anyOf":[{"$ref":"#/components/schemas/RankedWeekDto"},{"type":"null"}]},"history":{"description":"Past weeks, newest first.","type":"array","items":{"$ref":"#/components/schemas/RankedHistoryItemDto"}}},"required":["current","lastWeek","history"]},"RankedWeekDto":{"type":"object","properties":{"maxBattles":{"type":["number","null"],"description":"Attacks allowed this week, and the most defenses taken; null when the game data is unavailable."},"league":{"$ref":"#/components/schemas/RankedLeagueDto"},"startTime":{"format":"date-time","type":"string"},"endTime":{"format":"date-time","type":"string"},"rank":{"type":"number"},"total":{"type":"number","description":"Players in the group."},"promotionZone":{"type":"number","description":"The top this many move up a league at the end of the week; 0 when nobody does."},"demotionZone":{"type":"number","description":"The bottom this many move down; 0 when nobody does."},"trophies":{"type":"number"},"members":{"description":"Standings, best first.","type":"array","items":{"$ref":"#/components/schemas/RankedGroupMemberDto"}},"attacks":{"description":"The player's own attacks and defenses, newest first.","type":"array","items":{"$ref":"#/components/schemas/RankedBattleDto"}},"defenses":{"type":"array","items":{"$ref":"#/components/schemas/RankedBattleDto"}},"attackWins":{"type":"number"},"attackLosses":{"type":"number"},"defenseWins":{"type":"number"},"defenseLosses":{"type":"number"}},"required":["maxBattles","league","startTime","endTime","rank","total","promotionZone","demotionZone","trophies","members","attacks","defenses","attackWins","attackLosses","defenseWins","defenseLosses"]},"RankedLeagueDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"iconUrl":{"type":["string","null"]}},"required":["id","name","iconUrl"]},"RankedGroupMemberDto":{"type":"object","properties":{"clan":{"description":"Null when the player isn't in a clan.","anyOf":[{"$ref":"#/components/schemas/RankedClanDto"},{"type":"null"}]},"rank":{"type":"number"},"tag":{"type":"string"},"name":{"type":"string"},"trophies":{"type":"number"},"attackWins":{"type":"number"},"attackLosses":{"type":"number"},"defenseWins":{"type":"number"},"defenseLosses":{"type":"number"}},"required":["clan","rank","tag","name","trophies","attackWins","attackLosses","defenseWins","defenseLosses"]},"RankedClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]},"RankedBattleDto":{"type":"object","properties":{"opponent":{"$ref":"#/components/schemas/RankedOpponentDto"},"stars":{"type":"number"},"destruction":{"type":"number"},"trophies":{"type":"number","description":"League trophies the player earned from this battle, on attack or on defense."},"createdAt":{"format":"date-time","type":"string"}},"required":["opponent","stars","destruction","trophies","createdAt"]},"RankedOpponentDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]},"RankedHistoryItemDto":{"type":"object","properties":{"league":{"$ref":"#/components/schemas/RankedLeagueDto"},"startTime":{"format":"date-time","type":"string"},"placement":{"type":"number"},"trophies":{"type":"number"},"defenseStars":{"type":"number"},"maxBattles":{"type":"number"},"attackWins":{"type":"number"},"attackLosses":{"type":"number"},"defenseWins":{"type":"number"},"defenseLosses":{"type":"number"}},"required":["league","startTime","placement","trophies","defenseStars","maxBattles","attackWins","attackLosses","defenseWins","defenseLosses"]}}}}
```

## The LegendHeroSetupDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendHeroSetupDto":{"type":"object","properties":{"name":{"type":"string"},"pet":{"type":["string","null"]},"equipment":{"type":"array","items":{"type":"string"}},"share":{"type":"number","description":"Share of the attacks with this exact setup, in percent."}},"required":["name","pet","equipment","share"]}}}}
```

## The LegendArmyUnitDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendArmyUnitDto":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"number"}},"required":["name","count"]}}}}
```

## The LegendArmyDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendArmyDto":{"type":"object","properties":{"share":{"type":"number","description":"Share of the attacks with this exact army, in percent."},"troops":{"description":"Most first.","type":"array","items":{"$ref":"#/components/schemas/LegendArmyUnitDto"}},"spells":{"description":"Most first.","type":"array","items":{"$ref":"#/components/schemas/LegendArmyUnitDto"}},"siege":{"anyOf":[{"$ref":"#/components/schemas/LegendArmyUnitDto"},{"type":"null"}]}},"required":["share","troops","spells","siege"]},"LegendArmyUnitDto":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"number"}},"required":["name","count"]}}}}
```

## The RankedArmiesDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RankedArmiesDto":{"type":"object","properties":{"tag":{"type":"string"},"weekId":{"type":"string"},"attacks":{"type":"number","description":"Ranked attacks with an army code."},"heroes":{"description":"Each hero's most used pet and equipment, most used hero first.","type":"array","items":{"$ref":"#/components/schemas/LegendHeroSetupDto"}},"army":{"description":"The most used army, without the clan castle. Null with no attacks.","anyOf":[{"$ref":"#/components/schemas/LegendArmyDto"},{"type":"null"}]}},"required":["tag","weekId","attacks","heroes","army"]},"LegendHeroSetupDto":{"type":"object","properties":{"name":{"type":"string"},"pet":{"type":["string","null"]},"equipment":{"type":"array","items":{"type":"string"}},"share":{"type":"number","description":"Share of the attacks with this exact setup, in percent."}},"required":["name","pet","equipment","share"]},"LegendArmyDto":{"type":"object","properties":{"share":{"type":"number","description":"Share of the attacks with this exact army, in percent."},"troops":{"description":"Most first.","type":"array","items":{"$ref":"#/components/schemas/LegendArmyUnitDto"}},"spells":{"description":"Most first.","type":"array","items":{"$ref":"#/components/schemas/LegendArmyUnitDto"}},"siege":{"anyOf":[{"$ref":"#/components/schemas/LegendArmyUnitDto"},{"type":"null"}]}},"required":["share","troops","spells","siege"]},"LegendArmyUnitDto":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"number"}},"required":["name","count"]}}}}
```

## The BattleLogDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"BattleLogDto":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"},"opponentTag":{"type":"string"},"battleType":{"type":"string"},"isAttack":{"type":"boolean"},"stars":{"type":"number"},"destruction":{"type":"number"},"trophies":{"type":"number"},"startTrophies":{"type":"number","default":0},"endTrophies":{"type":"number","default":0},"trophyChange":{"type":"number"},"battleDate":{"type":"string"},"battleSeason":{"type":"string"},"battleWeek":{"type":"string"},"leagueId":{"type":"number"},"ingestedAt":{"format":"date-time","type":"string"}},"required":["name","tag","opponentTag","battleType","isAttack","stars","destruction","trophies","startTrophies","endTrophies","trophyChange","battleDate","battleSeason","battleWeek","leagueId","ingestedAt"]}}}}
```

## The BattleLogItemsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"BattleLogItemsDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BattleLogDto"}}},"required":["items"]},"BattleLogDto":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"},"opponentTag":{"type":"string"},"battleType":{"type":"string"},"isAttack":{"type":"boolean"},"stars":{"type":"number"},"destruction":{"type":"number"},"trophies":{"type":"number"},"startTrophies":{"type":"number","default":0},"endTrophies":{"type":"number","default":0},"trophyChange":{"type":"number"},"battleDate":{"type":"string"},"battleSeason":{"type":"string"},"battleWeek":{"type":"string"},"leagueId":{"type":"number"},"ingestedAt":{"format":"date-time","type":"string"}},"required":["name","tag","opponentTag","battleType","isAttack","stars","destruction","trophies","startTrophies","endTrophies","trophyChange","battleDate","battleSeason","battleWeek","leagueId","ingestedAt"]}}}}
```

## The BattleLogLeaderboardInputDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"BattleLogLeaderboardInputDto":{"type":"object","properties":{"seasonId":{"type":"string","description":"The league season's start date. A legacy `YYYY-MM` season id is still accepted.","pattern":"^\\d{4}-\\d{2}(-\\d{2})?$"},"playerTags":{"type":"array","items":{"type":"string"}}},"required":["seasonId","playerTags"]}}}}
```

## The GlobalClanEntity object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GlobalClanEntity":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The GlobalClanHistoryEntity object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GlobalClanHistoryEntity":{"type":"object","properties":{"clan":{"$ref":"#/components/schemas/GlobalClanEntity"},"playerTag":{"type":"string"},"firstSeen":{"format":"date-time","type":"string"},"lastSeen":{"format":"date-time","type":"string"}},"required":["clan","playerTag","firstSeen","lastSeen"]},"GlobalClanEntity":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The ClanHistoryItemsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanHistoryItemsDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/GlobalClanHistoryEntity"}}},"required":["items"]},"GlobalClanHistoryEntity":{"type":"object","properties":{"clan":{"$ref":"#/components/schemas/GlobalClanEntity"},"playerTag":{"type":"string"},"firstSeen":{"format":"date-time","type":"string"},"lastSeen":{"format":"date-time","type":"string"}},"required":["clan","playerTag","firstSeen","lastSeen"]},"GlobalClanEntity":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The WarTypes object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"WarTypes":{"type":"number","enum":[1,2,3]}}}}
```

## The AttackRecordDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"AttackRecordDto":{"type":"object","properties":{"defender":{"type":"object","properties":{"tag":{"type":"string"},"townHallLevel":{"type":"number"},"mapPosition":{"type":"number"}},"required":["tag","townHallLevel","mapPosition"]},"stars":{"type":"number"},"trueStars":{"type":"number"},"defenderTag":{"type":"string"},"destruction":{"type":"number"}},"required":["defender","stars","trueStars","defenderTag","destruction"]}}}}
```

## The AttackHistoryDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"AttackHistoryDto":{"type":"object","properties":{"warType":{"allOf":[{"$ref":"#/components/schemas/WarTypes"}]},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"attacks":{"type":"array","items":{"$ref":"#/components/schemas/AttackRecordDto"}},"season":{"type":"string"},"id":{"type":"number"},"clan":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"}},"required":["name","tag"]},"opponent":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"}},"required":["name","tag"]},"attacker":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"},"townHallLevel":{"type":"number"},"mapPosition":{"type":"number"}},"required":["name","tag","townHallLevel","mapPosition"]},"attacksPerMember":{"type":"number"},"teamSize":{"type":"number"}},"required":["warType","startTime","endTime","attacks","season","id","clan","opponent","attacker","attacksPerMember","teamSize"]},"WarTypes":{"type":"number","enum":[1,2,3]},"AttackRecordDto":{"type":"object","properties":{"defender":{"type":"object","properties":{"tag":{"type":"string"},"townHallLevel":{"type":"number"},"mapPosition":{"type":"number"}},"required":["tag","townHallLevel","mapPosition"]},"stars":{"type":"number"},"trueStars":{"type":"number"},"defenderTag":{"type":"string"},"destruction":{"type":"number"}},"required":["defender","stars","trueStars","defenderTag","destruction"]}}}}
```

## The AttackHistoryItemsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"AttackHistoryItemsDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AttackHistoryDto"}}},"required":["items"]},"AttackHistoryDto":{"type":"object","properties":{"warType":{"allOf":[{"$ref":"#/components/schemas/WarTypes"}]},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"attacks":{"type":"array","items":{"$ref":"#/components/schemas/AttackRecordDto"}},"season":{"type":"string"},"id":{"type":"number"},"clan":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"}},"required":["name","tag"]},"opponent":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"}},"required":["name","tag"]},"attacker":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"},"townHallLevel":{"type":"number"},"mapPosition":{"type":"number"}},"required":["name","tag","townHallLevel","mapPosition"]},"attacksPerMember":{"type":"number"},"teamSize":{"type":"number"}},"required":["warType","startTime","endTime","attacks","season","id","clan","opponent","attacker","attacksPerMember","teamSize"]},"WarTypes":{"type":"number","enum":[1,2,3]},"AttackRecordDto":{"type":"object","properties":{"defender":{"type":"object","properties":{"tag":{"type":"string"},"townHallLevel":{"type":"number"},"mapPosition":{"type":"number"}},"required":["tag","townHallLevel","mapPosition"]},"stars":{"type":"number"},"trueStars":{"type":"number"},"defenderTag":{"type":"string"},"destruction":{"type":"number"}},"required":["defender","stars","trueStars","defenderTag","destruction"]}}}}
```

## The AggregateAttackHistoryDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"AggregateAttackHistoryDto":{"type":"object","properties":{"season":{"type":"string"},"totalWars":{"type":"number"},"totalAttacks":{"type":"number"},"total3Stars":{"type":"number"},"totalMissed":{"type":"number"},"totalStars":{"type":"number"}},"required":["season","totalWars","totalAttacks","total3Stars","totalMissed","totalStars"]}}}}
```

## The AggregateAttackHistoryItemsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"AggregateAttackHistoryItemsDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AggregateAttackHistoryDto"}}},"required":["items"]},"AggregateAttackHistoryDto":{"type":"object","properties":{"season":{"type":"string"},"totalWars":{"type":"number"},"totalAttacks":{"type":"number"},"total3Stars":{"type":"number"},"totalMissed":{"type":"number"},"totalStars":{"type":"number"}},"required":["season","totalWars","totalAttacks","total3Stars","totalMissed","totalStars"]}}}}
```

## The AggregateClanWarLeagueHistoryDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"AggregateClanWarLeagueHistoryDto":{"type":"object","properties":{"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]},"leagueId":{"type":["number","null"],"description":"The clan's war league in that group; null when the group wasn't stored."},"season":{"type":"string"},"wars":{"type":"number","description":"Rounds the player was in the lineup for."},"attacks":{"type":"number"},"missed":{"type":"number","description":"Attacks left unused in ended rounds."},"stars":{"type":"number"},"threeStars":{"type":"number"},"destruction":{"type":"number","description":"Sum over attacks; divide by `attacks` for the average."}},"required":["clan","leagueId","season","wars","attacks","missed","stars","threeStars","destruction"]}}}}
```

## The AggregateClanWarLeagueHistoryItemsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"AggregateClanWarLeagueHistoryItemsDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AggregateClanWarLeagueHistoryDto"}}},"required":["items"]},"AggregateClanWarLeagueHistoryDto":{"type":"object","properties":{"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]},"leagueId":{"type":["number","null"],"description":"The clan's war league in that group; null when the group wasn't stored."},"season":{"type":"string"},"wars":{"type":"number","description":"Rounds the player was in the lineup for."},"attacks":{"type":"number"},"missed":{"type":"number","description":"Attacks left unused in ended rounds."},"stars":{"type":"number"},"threeStars":{"type":"number"},"destruction":{"type":"number","description":"Sum over attacks; divide by `attacks` for the average."}},"required":["clan","leagueId","season","wars","attacks","missed","stars","threeStars","destruction"]}}}}
```

## The ThresholdsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ThresholdsDto":{"type":"object","properties":{"rank":{"type":"number"},"minTrophies":{"type":"number"}},"required":["rank","minTrophies"]}}}}
```

## The LegendRankingThresholdsSnapShotDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendRankingThresholdsSnapShotDto":{"type":"object","properties":{"timestamp":{"type":"string"},"thresholds":{"type":"array","items":{"$ref":"#/components/schemas/ThresholdsDto"}}},"required":["timestamp","thresholds"]},"ThresholdsDto":{"type":"object","properties":{"rank":{"type":"number"},"minTrophies":{"type":"number"}},"required":["rank","minTrophies"]}}}}
```

## The LegendRankingThresholdsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendRankingThresholdsDto":{"type":"object","properties":{"live":{"$ref":"#/components/schemas/LegendRankingThresholdsSnapShotDto"},"eod":{"anyOf":[{"$ref":"#/components/schemas/LegendRankingThresholdsSnapShotDto"},{"type":"null"}]},"history":{"type":"array","items":{"$ref":"#/components/schemas/LegendRankingThresholdsSnapShotDto"}}},"required":["live","eod","history"]},"LegendRankingThresholdsSnapShotDto":{"type":"object","properties":{"timestamp":{"type":"string"},"thresholds":{"type":"array","items":{"$ref":"#/components/schemas/ThresholdsDto"}}},"required":["timestamp","thresholds"]},"ThresholdsDto":{"type":"object","properties":{"rank":{"type":"number"},"minTrophies":{"type":"number"}},"required":["rank","minTrophies"]}}}}
```

## The LegendTripleRateDayDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendTripleRateDayDto":{"type":"object","properties":{"date":{"type":"string","description":"The game day, which starts at 05:00 UTC."},"attacks":{"type":"number"},"triples":{"type":"number","description":"Attacks that won 3 stars."},"players":{"type":"number","description":"Players who attacked that day."}},"required":["date","attacks","triples","players"]}}}}
```

## The LegendTripleRateSeasonDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendTripleRateSeasonDto":{"type":"object","properties":{"seasonId":{"type":"string"},"days":{"description":"Oldest first. Days without tracked attacks are left out.","type":"array","items":{"$ref":"#/components/schemas/LegendTripleRateDayDto"}}},"required":["seasonId","days"]},"LegendTripleRateDayDto":{"type":"object","properties":{"date":{"type":"string","description":"The game day, which starts at 05:00 UTC."},"attacks":{"type":"number"},"triples":{"type":"number","description":"Attacks that won 3 stars."},"players":{"type":"number","description":"Players who attacked that day."}},"required":["date","attacks","triples","players"]}}}}
```

## The LegendTripleRatesDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendTripleRatesDto":{"type":"object","properties":{"season":{"$ref":"#/components/schemas/LegendTripleRateSeasonDto"},"lastSeason":{"$ref":"#/components/schemas/LegendTripleRateSeasonDto"}},"required":["season","lastSeason"]},"LegendTripleRateSeasonDto":{"type":"object","properties":{"seasonId":{"type":"string"},"days":{"description":"Oldest first. Days without tracked attacks are left out.","type":"array","items":{"$ref":"#/components/schemas/LegendTripleRateDayDto"}}},"required":["seasonId","days"]},"LegendTripleRateDayDto":{"type":"object","properties":{"date":{"type":"string","description":"The game day, which starts at 05:00 UTC."},"attacks":{"type":"number"},"triples":{"type":"number","description":"Attacks that won 3 stars."},"players":{"type":"number","description":"Players who attacked that day."}},"required":["date","attacks","triples","players"]}}}}
```

## The LegendResetDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendResetDto":{"type":"object","properties":{"from":{"type":"number","description":"Trophies before the reset."},"to":{"type":"number","description":"Trophies after the reset, always 5000."}},"required":["from","to"]}}}}
```

## The LegendDayChangeType object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendDayChangeType":{"type":"string","enum":["reset","missedDefenses","untracked"],"description":"`reset`: the Monday or season start reset to 5000. `missedDefenses`: what the game took at the\nstart of the day for defenses the player didn't get the day before. `untracked`: anything no tracked battle explains."}}}}
```

## The LegendDayChangeDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendDayChangeDto":{"type":"object","properties":{"type":{"description":"`reset`: the Monday or season start reset to 5000. `missedDefenses`: what the game took at the\nstart of the day for defenses the player didn't get the day before. `untracked`: anything no tracked battle explains.","allOf":[{"$ref":"#/components/schemas/LegendDayChangeType"}]},"trophies":{"type":"number"}},"required":["type","trophies"]},"LegendDayChangeType":{"type":"string","enum":["reset","missedDefenses","untracked"],"description":"`reset`: the Monday or season start reset to 5000. `missedDefenses`: what the game took at the\nstart of the day for defenses the player didn't get the day before. `untracked`: anything no tracked battle explains."}}}}
```

## The LegendDayBattleDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendDayBattleDto":{"type":"object","properties":{"isAttack":{"type":"boolean"},"stars":{"type":"number"},"destruction":{"type":"number"},"trophyChange":{"type":"number"},"opponentTag":{"type":"string"},"battleTime":{"format":"date-time","type":"string","description":"When the battle ended."}},"required":["isAttack","stars","destruction","trophyChange","opponentTag","battleTime"]}}}}
```

## The LegendDayDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendDayDto":{"type":"object","properties":{"date":{"type":"string","description":"The game day, which starts at 05:00 UTC."},"initialTrophies":{"type":["number","null"],"description":"Trophies at the end of the day before, or the first tracked trophies. Null when none were tracked."},"currentTrophies":{"type":["number","null"],"description":"Trophies after the day's last tracked change. Null when no trophy change was tracked."},"reset":{"description":"The Monday reset to 5000 (everyone's, at season start), when it moved this player.","allOf":[{"$ref":"#/components/schemas/LegendResetDto"}]},"attackCount":{"type":"number"},"defenseCount":{"type":"number"},"attackTrophies":{"type":"number","description":"Trophies gained from attacks."},"defenseTrophies":{"type":"number","description":"Trophies lost to defenses, as a negative number."},"missedDefenseTrophies":{"type":"number","description":"Trophies the game took at the start of the day for defenses the player didn't get the day\nbefore (fewer than 8), as a negative number. Absent when none were taken. Also in `changes`."},"changes":{"description":"Trophy changes no battle explains. Initial + attacks + defenses + changes = current.","type":"array","items":{"$ref":"#/components/schemas/LegendDayChangeDto"}},"battles":{"description":"Oldest first.","type":"array","items":{"$ref":"#/components/schemas/LegendDayBattleDto"}}},"required":["date","initialTrophies","currentTrophies","attackCount","defenseCount","attackTrophies","defenseTrophies","changes","battles"]},"LegendResetDto":{"type":"object","properties":{"from":{"type":"number","description":"Trophies before the reset."},"to":{"type":"number","description":"Trophies after the reset, always 5000."}},"required":["from","to"]},"LegendDayChangeDto":{"type":"object","properties":{"type":{"description":"`reset`: the Monday or season start reset to 5000. `missedDefenses`: what the game took at the\nstart of the day for defenses the player didn't get the day before. `untracked`: anything no tracked battle explains.","allOf":[{"$ref":"#/components/schemas/LegendDayChangeType"}]},"trophies":{"type":"number"}},"required":["type","trophies"]},"LegendDayChangeType":{"type":"string","enum":["reset","missedDefenses","untracked"],"description":"`reset`: the Monday or season start reset to 5000. `missedDefenses`: what the game took at the\nstart of the day for defenses the player didn't get the day before. `untracked`: anything no tracked battle explains."},"LegendDayBattleDto":{"type":"object","properties":{"isAttack":{"type":"boolean"},"stars":{"type":"number"},"destruction":{"type":"number"},"trophyChange":{"type":"number"},"opponentTag":{"type":"string"},"battleTime":{"format":"date-time","type":"string","description":"When the battle ended."}},"required":["isAttack","stars","destruction","trophyChange","opponentTag","battleTime"]}}}}
```

## The LegendDaysDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendDaysDto":{"type":"object","properties":{"tag":{"type":"string"},"seasonId":{"type":"string"},"items":{"description":"Days with a battle or a tracked trophy change, oldest first.","type":"array","items":{"$ref":"#/components/schemas/LegendDayDto"}}},"required":["tag","seasonId","items"]},"LegendDayDto":{"type":"object","properties":{"date":{"type":"string","description":"The game day, which starts at 05:00 UTC."},"initialTrophies":{"type":["number","null"],"description":"Trophies at the end of the day before, or the first tracked trophies. Null when none were tracked."},"currentTrophies":{"type":["number","null"],"description":"Trophies after the day's last tracked change. Null when no trophy change was tracked."},"reset":{"description":"The Monday reset to 5000 (everyone's, at season start), when it moved this player.","allOf":[{"$ref":"#/components/schemas/LegendResetDto"}]},"attackCount":{"type":"number"},"defenseCount":{"type":"number"},"attackTrophies":{"type":"number","description":"Trophies gained from attacks."},"defenseTrophies":{"type":"number","description":"Trophies lost to defenses, as a negative number."},"missedDefenseTrophies":{"type":"number","description":"Trophies the game took at the start of the day for defenses the player didn't get the day\nbefore (fewer than 8), as a negative number. Absent when none were taken. Also in `changes`."},"changes":{"description":"Trophy changes no battle explains. Initial + attacks + defenses + changes = current.","type":"array","items":{"$ref":"#/components/schemas/LegendDayChangeDto"}},"battles":{"description":"Oldest first.","type":"array","items":{"$ref":"#/components/schemas/LegendDayBattleDto"}}},"required":["date","initialTrophies","currentTrophies","attackCount","defenseCount","attackTrophies","defenseTrophies","changes","battles"]},"LegendResetDto":{"type":"object","properties":{"from":{"type":"number","description":"Trophies before the reset."},"to":{"type":"number","description":"Trophies after the reset, always 5000."}},"required":["from","to"]},"LegendDayChangeDto":{"type":"object","properties":{"type":{"description":"`reset`: the Monday or season start reset to 5000. `missedDefenses`: what the game took at the\nstart of the day for defenses the player didn't get the day before. `untracked`: anything no tracked battle explains.","allOf":[{"$ref":"#/components/schemas/LegendDayChangeType"}]},"trophies":{"type":"number"}},"required":["type","trophies"]},"LegendDayChangeType":{"type":"string","enum":["reset","missedDefenses","untracked"],"description":"`reset`: the Monday or season start reset to 5000. `missedDefenses`: what the game took at the\nstart of the day for defenses the player didn't get the day before. `untracked`: anything no tracked battle explains."},"LegendDayBattleDto":{"type":"object","properties":{"isAttack":{"type":"boolean"},"stars":{"type":"number"},"destruction":{"type":"number"},"trophyChange":{"type":"number"},"opponentTag":{"type":"string"},"battleTime":{"format":"date-time","type":"string","description":"When the battle ended."}},"required":["isAttack","stars","destruction","trophyChange","opponentTag","battleTime"]}}}}
```

## The LegendArmiesDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendArmiesDto":{"type":"object","properties":{"tag":{"type":"string"},"seasonId":{"type":"string"},"attacks":{"type":"number","description":"Legend attacks with an army code."},"heroes":{"description":"Each hero's most used pet and equipment, most used hero first.","type":"array","items":{"$ref":"#/components/schemas/LegendHeroSetupDto"}},"army":{"description":"The most used army, without the clan castle. Null with no attacks.","anyOf":[{"$ref":"#/components/schemas/LegendArmyDto"},{"type":"null"}]}},"required":["tag","seasonId","attacks","heroes","army"]},"LegendHeroSetupDto":{"type":"object","properties":{"name":{"type":"string"},"pet":{"type":["string","null"]},"equipment":{"type":"array","items":{"type":"string"}},"share":{"type":"number","description":"Share of the attacks with this exact setup, in percent."}},"required":["name","pet","equipment","share"]},"LegendArmyDto":{"type":"object","properties":{"share":{"type":"number","description":"Share of the attacks with this exact army, in percent."},"troops":{"description":"Most first.","type":"array","items":{"$ref":"#/components/schemas/LegendArmyUnitDto"}},"spells":{"description":"Most first.","type":"array","items":{"$ref":"#/components/schemas/LegendArmyUnitDto"}},"siege":{"anyOf":[{"$ref":"#/components/schemas/LegendArmyUnitDto"},{"type":"null"}]}},"required":["share","troops","spells","siege"]},"LegendArmyUnitDto":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"number"}},"required":["name","count"]}}}}
```

## The LegendSeasonDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendSeasonDto":{"type":"object","properties":{"seasonId":{"type":"string"},"initial":{"type":"number","description":"Trophies when the season's first attack or defense was tracked."},"trophies":{"type":"number","description":"Trophies after the season's last tracked attack or defense."},"attackTrophies":{"type":"number","description":"Trophies gained from attacks. Several attacks between two checks land as one log entry, so\nattacks are only totalled, not counted."},"defenseTrophies":{"type":"number","description":"Trophies lost to defenses, as a negative number."}},"required":["seasonId","initial","trophies","attackTrophies","defenseTrophies"]}}}}
```

## The LegendSeasonsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendSeasonsDto":{"type":"object","properties":{"items":{"description":"Newest first, at most 6.","type":"array","items":{"$ref":"#/components/schemas/LegendSeasonDto"}}},"required":["items"]},"LegendSeasonDto":{"type":"object","properties":{"seasonId":{"type":"string"},"initial":{"type":"number","description":"Trophies when the season's first attack or defense was tracked."},"trophies":{"type":"number","description":"Trophies after the season's last tracked attack or defense."},"attackTrophies":{"type":"number","description":"Trophies gained from attacks. Several attacks between two checks land as one log entry, so\nattacks are only totalled, not counted."},"defenseTrophies":{"type":"number","description":"Trophies lost to defenses, as a negative number."}},"required":["seasonId","initial","trophies","attackTrophies","defenseTrophies"]}}}}
```

## The LegendRankDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendRankDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"rank":{"type":"number"},"trophies":{"type":"number"}},"required":["tag","name","rank","trophies"]}}}}
```

## The RankingLocationDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RankingLocationDto":{"type":"object","properties":{"countryCode":{"type":"string","description":"A country code such as `IN`, or `global` for worldwide."},"name":{"type":"string"}},"required":["countryCode","name"]}}}}
```

## The RankingLocationsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RankingLocationsDto":{"type":"object","properties":{"items":{"description":"Global first, then countries by name.","type":"array","items":{"$ref":"#/components/schemas/RankingLocationDto"}}},"required":["items"]},"RankingLocationDto":{"type":"object","properties":{"countryCode":{"type":"string","description":"A country code such as `IN`, or `global` for worldwide."},"name":{"type":"string"}},"required":["countryCode","name"]}}}}
```

## The RankingSeasonsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RankingSeasonsDto":{"type":"object","properties":{"items":{"description":"Saved league seasons before the current one, newest first.","type":"array","items":{"type":"string"}}},"required":["items"]}}}}
```

## The RankingStandingsInputDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RankingStandingsInputDto":{"type":"object","properties":{"playerTags":{"maxItems":50,"type":"array","items":{"type":"string"}},"clanTags":{"maxItems":50,"type":"array","items":{"type":"string"}}}}}}}
```

## The RankingStandingDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RankingStandingDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"board":{"type":"string","enum":["players","clans","capital","builder-base-players","builder-base-clans"]},"location":{"$ref":"#/components/schemas/RankingLocationDto"},"rank":{"type":"number"},"previousRank":{"type":["number","null"]},"score":{"type":"number"}},"required":["tag","name","board","location","rank","previousRank","score"]},"RankingLocationDto":{"type":"object","properties":{"countryCode":{"type":"string","description":"A country code such as `IN`, or `global` for worldwide."},"name":{"type":"string"}},"required":["countryCode","name"]}}}}
```

## The RankingStandingsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RankingStandingsDto":{"type":"object","properties":{"items":{"description":"Where the tags stand this season, on every saved board they're on.","type":"array","items":{"$ref":"#/components/schemas/RankingStandingDto"}}},"required":["items"]},"RankingStandingDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"board":{"type":"string","enum":["players","clans","capital","builder-base-players","builder-base-clans"]},"location":{"$ref":"#/components/schemas/RankingLocationDto"},"rank":{"type":"number"},"previousRank":{"type":["number","null"]},"score":{"type":"number"}},"required":["tag","name","board","location","rank","previousRank","score"]},"RankingLocationDto":{"type":"object","properties":{"countryCode":{"type":"string","description":"A country code such as `IN`, or `global` for worldwide."},"name":{"type":"string"}},"required":["countryCode","name"]}}}}
```

## The ClanBoardStandingDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanBoardStandingDto":{"type":"object","properties":{"board":{"type":"string","enum":["players","clans","capital","builder-base-players","builder-base-clans"]},"location":{"$ref":"#/components/schemas/RankingLocationDto"},"rank":{"type":["number","null"],"description":"Null when the clan isn't in this board's top 200."},"previousRank":{"type":["number","null"]},"cutoff":{"type":["number","null"],"description":"Points of the board's last place: what it takes to get on it."}},"required":["board","location","rank","previousRank","cutoff"]},"RankingLocationDto":{"type":"object","properties":{"countryCode":{"type":"string","description":"A country code such as `IN`, or `global` for worldwide."},"name":{"type":"string"}},"required":["countryCode","name"]}}}}
```

## The ClanRankingSeasonDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanRankingSeasonDto":{"type":"object","properties":{"season":{"type":"string"},"clans":{"type":["number","null"],"description":"Season-end rank in the clan's country; null when outside the top 200."},"capital":{"type":["number","null"]}},"required":["season","clans","capital"]}}}}
```

## The ClanRankingsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanRankingsDto":{"type":"object","properties":{"location":{"description":"The clan's country; null when it hasn't set one.","anyOf":[{"$ref":"#/components/schemas/RankingLocationDto"},{"type":"null"}]},"boards":{"description":"Clans and capital boards, in its country (when set) and worldwide, this season.","type":"array","items":{"$ref":"#/components/schemas/ClanBoardStandingDto"}},"history":{"description":"Past seasons in its country, newest first, at most 6.","type":"array","items":{"$ref":"#/components/schemas/ClanRankingSeasonDto"}}},"required":["location","boards","history"]},"RankingLocationDto":{"type":"object","properties":{"countryCode":{"type":"string","description":"A country code such as `IN`, or `global` for worldwide."},"name":{"type":"string"}},"required":["countryCode","name"]},"ClanBoardStandingDto":{"type":"object","properties":{"board":{"type":"string","enum":["players","clans","capital","builder-base-players","builder-base-clans"]},"location":{"$ref":"#/components/schemas/RankingLocationDto"},"rank":{"type":["number","null"],"description":"Null when the clan isn't in this board's top 200."},"previousRank":{"type":["number","null"]},"cutoff":{"type":["number","null"],"description":"Points of the board's last place: what it takes to get on it."}},"required":["board","location","rank","previousRank","cutoff"]},"ClanRankingSeasonDto":{"type":"object","properties":{"season":{"type":"string"},"clans":{"type":["number","null"],"description":"Season-end rank in the clan's country; null when outside the top 200."},"capital":{"type":["number","null"]}},"required":["season","clans","capital"]}}}}
```

## The PlayerRankingSeasonDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"PlayerRankingSeasonDto":{"type":"object","properties":{"season":{"type":"string"},"location":{"$ref":"#/components/schemas/RankingLocationDto"},"rank":{"type":"number"},"trophies":{"type":"number"}},"required":["season","location","rank","trophies"]},"RankingLocationDto":{"type":"object","properties":{"countryCode":{"type":"string","description":"A country code such as `IN`, or `global` for worldwide."},"name":{"type":"string"}},"required":["countryCode","name"]}}}}
```

## The PlayerRankingsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"PlayerRankingsDto":{"type":"object","properties":{"items":{"description":"Every saved season and board the player finished on, newest first.","type":"array","items":{"$ref":"#/components/schemas/PlayerRankingSeasonDto"}}},"required":["items"]},"PlayerRankingSeasonDto":{"type":"object","properties":{"season":{"type":"string"},"location":{"$ref":"#/components/schemas/RankingLocationDto"},"rank":{"type":"number"},"trophies":{"type":"number"}},"required":["season","location","rank","trophies"]},"RankingLocationDto":{"type":"object","properties":{"countryCode":{"type":"string","description":"A country code such as `IN`, or `global` for worldwide."},"name":{"type":"string"}},"required":["countryCode","name"]}}}}
```

## The RankingEntryDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RankingEntryDto":{"type":"object","properties":{"rank":{"type":"number"},"previousRank":{"type":["number","null"],"description":"Rank at the end of the season before; null when it wasn't ranked then or isn't known."},"tag":{"type":"string"},"name":{"type":"string"},"score":{"type":"number","description":"Trophies for player boards, points for clan boards."},"badgeUrl":{"type":["string","null"],"description":"Live boards only."},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}},"required":["rank","previousRank","tag","name","score","badgeUrl","clan"]}}}}
```

## The RankingBoardDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RankingBoardDto":{"type":"object","properties":{"location":{"$ref":"#/components/schemas/RankingLocationDto"},"board":{"type":"string","enum":["players","clans","capital","builder-base-players","builder-base-clans"]},"season":{"type":["string","null"],"description":"The saved season, or null for the live board."},"items":{"type":"array","items":{"$ref":"#/components/schemas/RankingEntryDto"}}},"required":["location","board","season","items"]},"RankingLocationDto":{"type":"object","properties":{"countryCode":{"type":"string","description":"A country code such as `IN`, or `global` for worldwide."},"name":{"type":"string"}},"required":["countryCode","name"]},"RankingEntryDto":{"type":"object","properties":{"rank":{"type":"number"},"previousRank":{"type":["number","null"],"description":"Rank at the end of the season before; null when it wasn't ranked then or isn't known."},"tag":{"type":"string"},"name":{"type":"string"},"score":{"type":"number","description":"Trophies for player boards, points for clan boards."},"badgeUrl":{"type":["string","null"],"description":"Live boards only."},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}},"required":["rank","previousRank","tag","name","score","badgeUrl","clan"]}}}}
```

## The ClanWarLeagueRound object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanWarLeagueRound":{"type":"object","properties":{"warTags":{"type":"array","items":{"type":"string"}}},"required":["warTags"]}}}}
```

## The LeagueGroupClanDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LeagueGroupClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"leagueId":{"type":"number"}},"required":["tag","name","leagueId"]}}}}
```

## The ClanWarAttackDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanWarAttackDto":{"type":"object","properties":{"attackerTag":{"type":"string"},"defenderTag":{"type":"string"},"stars":{"type":"number"},"destructionPercentage":{"type":"number"},"order":{"type":"number"},"duration":{"type":"number"}},"required":["attackerTag","defenderTag","stars","destructionPercentage","order","duration"]}}}}
```

## The ClanWarMemberDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanWarMemberDto":{"type":"object","properties":{"attacks":{"type":"array","items":{"$ref":"#/components/schemas/ClanWarAttackDto"}},"bestOpponentAttack":{"$ref":"#/components/schemas/ClanWarAttackDto"},"mapPosition":{"type":"number"},"name":{"type":"string"},"opponentAttacks":{"type":"number"},"tag":{"type":"string"},"townhallLevel":{"type":"number"}},"required":["mapPosition","name","opponentAttacks","tag","townhallLevel"]},"ClanWarAttackDto":{"type":"object","properties":{"attackerTag":{"type":"string"},"defenderTag":{"type":"string"},"stars":{"type":"number"},"destructionPercentage":{"type":"number"},"order":{"type":"number"},"duration":{"type":"number"}},"required":["attackerTag","defenderTag","stars","destructionPercentage","order","duration"]}}}}
```

## The WarClanDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"WarClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrls":{"$ref":"#/components/schemas/ClanBadge"},"clanLevel":{"type":"number"},"attacks":{"type":"number"},"stars":{"type":"number"},"destructionPercentage":{"type":"number"},"members":{"type":"array","items":{"$ref":"#/components/schemas/ClanWarMemberDto"}}},"required":["tag","name","badgeUrls","clanLevel","attacks","stars","destructionPercentage","members"]},"ClanBadge":{"type":"object","properties":{"large":{"type":"string"},"small":{"type":"string"},"medium":{"type":"string"}},"required":["large","small","medium"]},"ClanWarMemberDto":{"type":"object","properties":{"attacks":{"type":"array","items":{"$ref":"#/components/schemas/ClanWarAttackDto"}},"bestOpponentAttack":{"$ref":"#/components/schemas/ClanWarAttackDto"},"mapPosition":{"type":"number"},"name":{"type":"string"},"opponentAttacks":{"type":"number"},"tag":{"type":"string"},"townhallLevel":{"type":"number"}},"required":["mapPosition","name","opponentAttacks","tag","townhallLevel"]},"ClanWarAttackDto":{"type":"object","properties":{"attackerTag":{"type":"string"},"defenderTag":{"type":"string"},"stars":{"type":"number"},"destructionPercentage":{"type":"number"},"order":{"type":"number"},"duration":{"type":"number"}},"required":["attackerTag","defenderTag","stars","destructionPercentage","order","duration"]}}}}
```

## The ClanWarDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanWarDto":{"type":"object","properties":{"state":{"enum":["notInWar","preparation","inWar","warEnded"],"type":"string"},"startTime":{"type":"string"},"preparationStartTime":{"type":"string"},"endTime":{"type":"string"},"battleModifier":{"enum":["none","hardMode",null],"type":["string","null"]},"attacksPerMember":{"type":["number","null"]},"round":{"type":["number","null"]},"warTag":{"type":["string","null"]},"teamSize":{"type":"number"},"clan":{"$ref":"#/components/schemas/WarClanDto"},"opponent":{"$ref":"#/components/schemas/WarClanDto"},"result":{"type":"string"}},"required":["state","startTime","preparationStartTime","endTime","teamSize","clan","opponent","result"]},"WarClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrls":{"$ref":"#/components/schemas/ClanBadge"},"clanLevel":{"type":"number"},"attacks":{"type":"number"},"stars":{"type":"number"},"destructionPercentage":{"type":"number"},"members":{"type":"array","items":{"$ref":"#/components/schemas/ClanWarMemberDto"}}},"required":["tag","name","badgeUrls","clanLevel","attacks","stars","destructionPercentage","members"]},"ClanBadge":{"type":"object","properties":{"large":{"type":"string"},"small":{"type":"string"},"medium":{"type":"string"}},"required":["large","small","medium"]},"ClanWarMemberDto":{"type":"object","properties":{"attacks":{"type":"array","items":{"$ref":"#/components/schemas/ClanWarAttackDto"}},"bestOpponentAttack":{"$ref":"#/components/schemas/ClanWarAttackDto"},"mapPosition":{"type":"number"},"name":{"type":"string"},"opponentAttacks":{"type":"number"},"tag":{"type":"string"},"townhallLevel":{"type":"number"}},"required":["mapPosition","name","opponentAttacks","tag","townhallLevel"]},"ClanWarAttackDto":{"type":"object","properties":{"attackerTag":{"type":"string"},"defenderTag":{"type":"string"},"stars":{"type":"number"},"destructionPercentage":{"type":"number"},"order":{"type":"number"},"duration":{"type":"number"}},"required":["attackerTag","defenderTag","stars","destructionPercentage","order","duration"]}}}}
```

## The ClanWarLeaguesDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanWarLeaguesDto":{"type":"object","properties":{"season":{"type":"string"},"rounds":{"type":"array","items":{"$ref":"#/components/schemas/ClanWarLeagueRound"}},"clans":{"type":"array","items":{"$ref":"#/components/schemas/LeagueGroupClanDto"}},"wars":{"type":"array","items":{"$ref":"#/components/schemas/ClanWarDto"}}},"required":["season","rounds","clans","wars"]},"ClanWarLeagueRound":{"type":"object","properties":{"warTags":{"type":"array","items":{"type":"string"}}},"required":["warTags"]},"LeagueGroupClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"leagueId":{"type":"number"}},"required":["tag","name","leagueId"]},"ClanWarDto":{"type":"object","properties":{"state":{"enum":["notInWar","preparation","inWar","warEnded"],"type":"string"},"startTime":{"type":"string"},"preparationStartTime":{"type":"string"},"endTime":{"type":"string"},"battleModifier":{"enum":["none","hardMode",null],"type":["string","null"]},"attacksPerMember":{"type":["number","null"]},"round":{"type":["number","null"]},"warTag":{"type":["string","null"]},"teamSize":{"type":"number"},"clan":{"$ref":"#/components/schemas/WarClanDto"},"opponent":{"$ref":"#/components/schemas/WarClanDto"},"result":{"type":"string"}},"required":["state","startTime","preparationStartTime","endTime","teamSize","clan","opponent","result"]},"WarClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrls":{"$ref":"#/components/schemas/ClanBadge"},"clanLevel":{"type":"number"},"attacks":{"type":"number"},"stars":{"type":"number"},"destructionPercentage":{"type":"number"},"members":{"type":"array","items":{"$ref":"#/components/schemas/ClanWarMemberDto"}}},"required":["tag","name","badgeUrls","clanLevel","attacks","stars","destructionPercentage","members"]},"ClanBadge":{"type":"object","properties":{"large":{"type":"string"},"small":{"type":"string"},"medium":{"type":"string"}},"required":["large","small","medium"]},"ClanWarMemberDto":{"type":"object","properties":{"attacks":{"type":"array","items":{"$ref":"#/components/schemas/ClanWarAttackDto"}},"bestOpponentAttack":{"$ref":"#/components/schemas/ClanWarAttackDto"},"mapPosition":{"type":"number"},"name":{"type":"string"},"opponentAttacks":{"type":"number"},"tag":{"type":"string"},"townhallLevel":{"type":"number"}},"required":["mapPosition","name","opponentAttacks","tag","townhallLevel"]},"ClanWarAttackDto":{"type":"object","properties":{"attackerTag":{"type":"string"},"defenderTag":{"type":"string"},"stars":{"type":"number"},"destructionPercentage":{"type":"number"},"order":{"type":"number"},"duration":{"type":"number"}},"required":["attackerTag","defenderTag","stars","destructionPercentage","order","duration"]}}}}
```

## The ClanWarSideDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanWarSideDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrls":{"$ref":"#/components/schemas/ClanBadge"},"clanLevel":{"type":"number"},"attacks":{"type":"number"},"stars":{"type":"number"},"destructionPercentage":{"type":"number"}},"required":["tag","name","badgeUrls","clanLevel","attacks","stars","destructionPercentage"]},"ClanBadge":{"type":"object","properties":{"large":{"type":"string"},"small":{"type":"string"},"medium":{"type":"string"}},"required":["large","small","medium"]}}}}
```

## The ClanWarLeagueRoundDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanWarLeagueRoundDto":{"type":"object","properties":{"round":{"type":["number","null"],"description":"Position in the group's schedule; null when the group wasn't stored."},"state":{"enum":["preparation","inWar","warEnded"],"type":"string"},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"result":{"enum":["win","lose","tie"],"type":"string"},"id":{"type":"number"},"teamSize":{"type":"number"},"clan":{"$ref":"#/components/schemas/ClanWarSideDto"},"opponent":{"$ref":"#/components/schemas/ClanWarSideDto"}},"required":["round","state","startTime","endTime","result","id","teamSize","clan","opponent"]},"ClanWarSideDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrls":{"$ref":"#/components/schemas/ClanBadge"},"clanLevel":{"type":"number"},"attacks":{"type":"number"},"stars":{"type":"number"},"destructionPercentage":{"type":"number"}},"required":["tag","name","badgeUrls","clanLevel","attacks","stars","destructionPercentage"]},"ClanBadge":{"type":"object","properties":{"large":{"type":"string"},"small":{"type":"string"},"medium":{"type":"string"}},"required":["large","small","medium"]}}}}
```

## The ClanWarMemberTotalsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanWarMemberTotalsDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"townHallLevel":{"type":"number","description":"From the member's latest war in the set."},"wars":{"type":"number","description":"Wars the member was in the lineup for."},"attacks":{"type":"number"},"stars":{"type":"number"},"threeStars":{"type":"number"},"destruction":{"type":"number","description":"Sum over attacks; divide by `attacks` for the average."},"missed":{"type":"number","description":"Attacks left unused in ended wars."},"sameThAttacks":{"type":"number","description":"Attacks on a base of the same or a higher Town Hall."},"sameThThreeStars":{"type":"number"}},"required":["tag","name","townHallLevel","wars","attacks","stars","threeStars","destruction","missed","sameThAttacks","sameThThreeStars"]}}}}
```

## The ClanWarLeagueSeasonDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanWarLeagueSeasonDto":{"type":"object","properties":{"groupId":{"type":["number","null"],"description":"The stored group (for standings); null when it wasn't stored."},"groupSeason":{"type":["string","null"],"description":"The game's season id for the group, e.g. \"2026-10-02\"; null when the group wasn't stored."},"leagueId":{"type":["number","null"],"description":"The clan's war league that season; null when the group wasn't stored."},"groupSize":{"type":["number","null"],"description":"Clans in the group; null when the group wasn't stored."},"season":{"type":"string"},"rounds":{"type":"array","items":{"$ref":"#/components/schemas/ClanWarLeagueRoundDto"}},"members":{"description":"Most stars first.","type":"array","items":{"$ref":"#/components/schemas/ClanWarMemberTotalsDto"}}},"required":["groupId","groupSeason","leagueId","groupSize","season","rounds","members"]},"ClanWarLeagueRoundDto":{"type":"object","properties":{"round":{"type":["number","null"],"description":"Position in the group's schedule; null when the group wasn't stored."},"state":{"enum":["preparation","inWar","warEnded"],"type":"string"},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"result":{"enum":["win","lose","tie"],"type":"string"},"id":{"type":"number"},"teamSize":{"type":"number"},"clan":{"$ref":"#/components/schemas/ClanWarSideDto"},"opponent":{"$ref":"#/components/schemas/ClanWarSideDto"}},"required":["round","state","startTime","endTime","result","id","teamSize","clan","opponent"]},"ClanWarSideDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrls":{"$ref":"#/components/schemas/ClanBadge"},"clanLevel":{"type":"number"},"attacks":{"type":"number"},"stars":{"type":"number"},"destructionPercentage":{"type":"number"}},"required":["tag","name","badgeUrls","clanLevel","attacks","stars","destructionPercentage"]},"ClanBadge":{"type":"object","properties":{"large":{"type":"string"},"small":{"type":"string"},"medium":{"type":"string"}},"required":["large","small","medium"]},"ClanWarMemberTotalsDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"townHallLevel":{"type":"number","description":"From the member's latest war in the set."},"wars":{"type":"number","description":"Wars the member was in the lineup for."},"attacks":{"type":"number"},"stars":{"type":"number"},"threeStars":{"type":"number"},"destruction":{"type":"number","description":"Sum over attacks; divide by `attacks` for the average."},"missed":{"type":"number","description":"Attacks left unused in ended wars."},"sameThAttacks":{"type":"number","description":"Attacks on a base of the same or a higher Town Hall."},"sameThThreeStars":{"type":"number"}},"required":["tag","name","townHallLevel","wars","attacks","stars","threeStars","destruction","missed","sameThAttacks","sameThThreeStars"]}}}}
```

## The ClanWarLeagueSeasonsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanWarLeagueSeasonsDto":{"type":"object","properties":{"items":{"description":"Newest season first.","type":"array","items":{"$ref":"#/components/schemas/ClanWarLeagueSeasonDto"}}},"required":["items"]},"ClanWarLeagueSeasonDto":{"type":"object","properties":{"groupId":{"type":["number","null"],"description":"The stored group (for standings); null when it wasn't stored."},"groupSeason":{"type":["string","null"],"description":"The game's season id for the group, e.g. \"2026-10-02\"; null when the group wasn't stored."},"leagueId":{"type":["number","null"],"description":"The clan's war league that season; null when the group wasn't stored."},"groupSize":{"type":["number","null"],"description":"Clans in the group; null when the group wasn't stored."},"season":{"type":"string"},"rounds":{"type":"array","items":{"$ref":"#/components/schemas/ClanWarLeagueRoundDto"}},"members":{"description":"Most stars first.","type":"array","items":{"$ref":"#/components/schemas/ClanWarMemberTotalsDto"}}},"required":["groupId","groupSeason","leagueId","groupSize","season","rounds","members"]},"ClanWarLeagueRoundDto":{"type":"object","properties":{"round":{"type":["number","null"],"description":"Position in the group's schedule; null when the group wasn't stored."},"state":{"enum":["preparation","inWar","warEnded"],"type":"string"},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"result":{"enum":["win","lose","tie"],"type":"string"},"id":{"type":"number"},"teamSize":{"type":"number"},"clan":{"$ref":"#/components/schemas/ClanWarSideDto"},"opponent":{"$ref":"#/components/schemas/ClanWarSideDto"}},"required":["round","state","startTime","endTime","result","id","teamSize","clan","opponent"]},"ClanWarSideDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrls":{"$ref":"#/components/schemas/ClanBadge"},"clanLevel":{"type":"number"},"attacks":{"type":"number"},"stars":{"type":"number"},"destructionPercentage":{"type":"number"}},"required":["tag","name","badgeUrls","clanLevel","attacks","stars","destructionPercentage"]},"ClanBadge":{"type":"object","properties":{"large":{"type":"string"},"small":{"type":"string"},"medium":{"type":"string"}},"required":["large","small","medium"]},"ClanWarMemberTotalsDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"townHallLevel":{"type":"number","description":"From the member's latest war in the set."},"wars":{"type":"number","description":"Wars the member was in the lineup for."},"attacks":{"type":"number"},"stars":{"type":"number"},"threeStars":{"type":"number"},"destruction":{"type":"number","description":"Sum over attacks; divide by `attacks` for the average."},"missed":{"type":"number","description":"Attacks left unused in ended wars."},"sameThAttacks":{"type":"number","description":"Attacks on a base of the same or a higher Town Hall."},"sameThThreeStars":{"type":"number"}},"required":["tag","name","townHallLevel","wars","attacks","stars","threeStars","destruction","missed","sameThAttacks","sameThThreeStars"]}}}}
```

## The ClanWarStatsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanWarStatsDto":{"type":"object","properties":{"wars":{"type":"number","description":"Ended wars counted; fewer than asked when the clan has fewer stored."},"seasons":{"description":"CWL seasons among those wars, newest first.","type":"array","items":{"type":"string"}},"members":{"type":"array","items":{"$ref":"#/components/schemas/ClanWarMemberTotalsDto"}}},"required":["wars","seasons","members"]},"ClanWarMemberTotalsDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"townHallLevel":{"type":"number","description":"From the member's latest war in the set."},"wars":{"type":"number","description":"Wars the member was in the lineup for."},"attacks":{"type":"number"},"stars":{"type":"number"},"threeStars":{"type":"number"},"destruction":{"type":"number","description":"Sum over attacks; divide by `attacks` for the average."},"missed":{"type":"number","description":"Attacks left unused in ended wars."},"sameThAttacks":{"type":"number","description":"Attacks on a base of the same or a higher Town Hall."},"sameThThreeStars":{"type":"number"}},"required":["tag","name","townHallLevel","wars","attacks","stars","threeStars","destruction","missed","sameThAttacks","sameThThreeStars"]}}}}
```

## The ClanWarLeagueStandingDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanWarLeagueStandingDto":{"type":"object","properties":{"badgeUrls":{"anyOf":[{"$ref":"#/components/schemas/ClanBadge"},{"type":"null"}]},"tag":{"type":"string"},"name":{"type":"string"},"stars":{"type":"number","description":"Stars plus 10 per war won, as the game ranks them."},"destruction":{"type":"number","description":"Total destruction over all wars: each war's percentage times its size."},"wins":{"type":"number"},"leagueId":{"type":"number","description":"League at the start of the season."}},"required":["badgeUrls","tag","name","stars","destruction","wins","leagueId"]},"ClanBadge":{"type":"object","properties":{"large":{"type":"string"},"small":{"type":"string"},"medium":{"type":"string"}},"required":["large","small","medium"]}}}}
```

## The ClanWarLeagueStandingsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanWarLeagueStandingsDto":{"type":"object","properties":{"groupId":{"type":"number"},"season":{"type":"string"},"roundsPlayed":{"type":"number","description":"Rounds with at least one war started."},"totalRounds":{"type":"number"},"complete":{"type":"boolean","description":"False when some wars no longer load from the game, so the table is partial."},"rows":{"description":"Best first.","type":"array","items":{"$ref":"#/components/schemas/ClanWarLeagueStandingDto"}}},"required":["groupId","season","roundsPlayed","totalRounds","complete","rows"]},"ClanWarLeagueStandingDto":{"type":"object","properties":{"badgeUrls":{"anyOf":[{"$ref":"#/components/schemas/ClanBadge"},{"type":"null"}]},"tag":{"type":"string"},"name":{"type":"string"},"stars":{"type":"number","description":"Stars plus 10 per war won, as the game ranks them."},"destruction":{"type":"number","description":"Total destruction over all wars: each war's percentage times its size."},"wins":{"type":"number"},"leagueId":{"type":"number","description":"League at the start of the season."}},"required":["badgeUrls","tag","name","stars","destruction","wins","leagueId"]},"ClanBadge":{"type":"object","properties":{"large":{"type":"string"},"small":{"type":"string"},"medium":{"type":"string"}},"required":["large","small","medium"]}}}}
```

## The ClanWarSummaryDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanWarSummaryDto":{"type":"object","properties":{"warType":{"allOf":[{"$ref":"#/components/schemas/WarTypes"}]},"state":{"enum":["preparation","inWar","warEnded"],"type":"string"},"preparationStartTime":{"type":"string","format":"date-time"},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"warTag":{"type":["string","null"],"description":"Set for CWL rounds only."},"result":{"description":"From the requested clan's side; \"tie\" while a war is still running and level.","enum":["win","lose","tie"],"type":"string"},"id":{"type":"number"},"teamSize":{"type":"number"},"attacksPerMember":{"type":"number"},"clan":{"$ref":"#/components/schemas/ClanWarSideDto"},"opponent":{"$ref":"#/components/schemas/ClanWarSideDto"}},"required":["warType","state","preparationStartTime","startTime","endTime","warTag","result","id","teamSize","attacksPerMember","clan","opponent"]},"WarTypes":{"type":"number","enum":[1,2,3]},"ClanWarSideDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrls":{"$ref":"#/components/schemas/ClanBadge"},"clanLevel":{"type":"number"},"attacks":{"type":"number"},"stars":{"type":"number"},"destructionPercentage":{"type":"number"}},"required":["tag","name","badgeUrls","clanLevel","attacks","stars","destructionPercentage"]},"ClanBadge":{"type":"object","properties":{"large":{"type":"string"},"small":{"type":"string"},"medium":{"type":"string"}},"required":["large","small","medium"]}}}}
```

## The ClanWarListDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanWarListDto":{"type":"object","properties":{"next":{"type":["number","null"],"description":"Pass as `before` for the next page; null on the last page."},"items":{"type":"array","items":{"$ref":"#/components/schemas/ClanWarSummaryDto"}}},"required":["next","items"]},"ClanWarSummaryDto":{"type":"object","properties":{"warType":{"allOf":[{"$ref":"#/components/schemas/WarTypes"}]},"state":{"enum":["preparation","inWar","warEnded"],"type":"string"},"preparationStartTime":{"type":"string","format":"date-time"},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"warTag":{"type":["string","null"],"description":"Set for CWL rounds only."},"result":{"description":"From the requested clan's side; \"tie\" while a war is still running and level.","enum":["win","lose","tie"],"type":"string"},"id":{"type":"number"},"teamSize":{"type":"number"},"attacksPerMember":{"type":"number"},"clan":{"$ref":"#/components/schemas/ClanWarSideDto"},"opponent":{"$ref":"#/components/schemas/ClanWarSideDto"}},"required":["warType","state","preparationStartTime","startTime","endTime","warTag","result","id","teamSize","attacksPerMember","clan","opponent"]},"WarTypes":{"type":"number","enum":[1,2,3]},"ClanWarSideDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrls":{"$ref":"#/components/schemas/ClanBadge"},"clanLevel":{"type":"number"},"attacks":{"type":"number"},"stars":{"type":"number"},"destructionPercentage":{"type":"number"}},"required":["tag","name","badgeUrls","clanLevel","attacks","stars","destructionPercentage"]},"ClanBadge":{"type":"object","properties":{"large":{"type":"string"},"small":{"type":"string"},"medium":{"type":"string"}},"required":["large","small","medium"]}}}}
```

## The CurrentWarDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"CurrentWarDto":{"type":"object","properties":{"war":{"description":"The regular war, or the CWL round in war (else in preparation, else the last ended one).","anyOf":[{"$ref":"#/components/schemas/ClanWarDto"},{"type":"null"}]},"isWarLogPublic":{"type":"boolean","description":"False when the war log is private: regular wars are hidden then, CWL wars are not."}},"required":["war","isWarLogPublic"]},"ClanWarDto":{"type":"object","properties":{"state":{"enum":["notInWar","preparation","inWar","warEnded"],"type":"string"},"startTime":{"type":"string"},"preparationStartTime":{"type":"string"},"endTime":{"type":"string"},"battleModifier":{"enum":["none","hardMode",null],"type":["string","null"]},"attacksPerMember":{"type":["number","null"]},"round":{"type":["number","null"]},"warTag":{"type":["string","null"]},"teamSize":{"type":"number"},"clan":{"$ref":"#/components/schemas/WarClanDto"},"opponent":{"$ref":"#/components/schemas/WarClanDto"},"result":{"type":"string"}},"required":["state","startTime","preparationStartTime","endTime","teamSize","clan","opponent","result"]},"WarClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrls":{"$ref":"#/components/schemas/ClanBadge"},"clanLevel":{"type":"number"},"attacks":{"type":"number"},"stars":{"type":"number"},"destructionPercentage":{"type":"number"},"members":{"type":"array","items":{"$ref":"#/components/schemas/ClanWarMemberDto"}}},"required":["tag","name","badgeUrls","clanLevel","attacks","stars","destructionPercentage","members"]},"ClanBadge":{"type":"object","properties":{"large":{"type":"string"},"small":{"type":"string"},"medium":{"type":"string"}},"required":["large","small","medium"]},"ClanWarMemberDto":{"type":"object","properties":{"attacks":{"type":"array","items":{"$ref":"#/components/schemas/ClanWarAttackDto"}},"bestOpponentAttack":{"$ref":"#/components/schemas/ClanWarAttackDto"},"mapPosition":{"type":"number"},"name":{"type":"string"},"opponentAttacks":{"type":"number"},"tag":{"type":"string"},"townhallLevel":{"type":"number"}},"required":["mapPosition","name","opponentAttacks","tag","townhallLevel"]},"ClanWarAttackDto":{"type":"object","properties":{"attackerTag":{"type":"string"},"defenderTag":{"type":"string"},"stars":{"type":"number"},"destructionPercentage":{"type":"number"},"order":{"type":"number"},"duration":{"type":"number"}},"required":["attackerTag","defenderTag","stars","destructionPercentage","order","duration"]}}}}
```

## The GameEventDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GameEventDto":{"type":"object","properties":{"type":{"enum":["season","raid_weekend","clan_games","cwl"],"type":"string"},"state":{"enum":["ended","active","upcoming"],"type":"string"},"startTime":{"format":"date-time","type":"string"},"endTime":{"format":"date-time","type":"string"},"signupEndTime":{"format":"date-time","type":"string","description":"CWL only: when signup closes."}},"required":["type","state","startTime","endTime"]}}}}
```

## The GameEventsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GameEventsDto":{"type":"object","properties":{"items":{"description":"Every occurrence overlapping the range, by start time.","type":"array","items":{"$ref":"#/components/schemas/GameEventDto"}}},"required":["items"]},"GameEventDto":{"type":"object","properties":{"type":{"enum":["season","raid_weekend","clan_games","cwl"],"type":"string"},"state":{"enum":["ended","active","upcoming"],"type":"string"},"startTime":{"format":"date-time","type":"string"},"endTime":{"format":"date-time","type":"string"},"signupEndTime":{"format":"date-time","type":"string","description":"CWL only: when signup closes."}},"required":["type","state","startTime","endTime"]}}}}
```

## The UpcomingEventsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"UpcomingEventsDto":{"type":"object","properties":{"items":{"description":"Running or next occurrence of each event, soonest change first.","type":"array","items":{"$ref":"#/components/schemas/GameEventDto"}}},"required":["items"]},"GameEventDto":{"type":"object","properties":{"type":{"enum":["season","raid_weekend","clan_games","cwl"],"type":"string"},"state":{"enum":["ended","active","upcoming"],"type":"string"},"startTime":{"format":"date-time","type":"string"},"endTime":{"format":"date-time","type":"string"},"signupEndTime":{"format":"date-time","type":"string","description":"CWL only: when signup closes."}},"required":["type","state","startTime","endTime"]}}}}
```

## The RosterMemberOfRostersEntity object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RosterMemberOfRostersEntity":{"type":"object","properties":{"warPreference":{"enum":["in","out",null],"type":["string","null"]},"categoryId":{"type":["string","null"]},"name":{"type":"string"},"tag":{"type":"string"},"userId":{"type":["string","null"]},"username":{"type":["string","null"]},"displayName":{"type":["string","null"]},"role":{"type":["string","null"]},"townHallLevel":{"type":"number"},"heroes":{"type":"object","additionalProperties":{"type":"number"}},"trophies":{"type":"number"},"leagueId":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"alias":{"type":["string","null"]}},"required":["tag","name"]},"createdAt":{"format":"date-time","type":"string"}},"required":["warPreference","name","tag","userId","username","role","townHallLevel","heroes","trophies","createdAt"]}}}}
```

## The RostersEntity object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RostersEntity":{"type":"object","properties":{"_id":{"type":"string"},"category":{"enum":["GENERAL","CWL","WAR","TROPHY","NO_CLAN"],"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"maxMembers":{"type":"number"},"minTownHall":{"type":"number"},"maxTownHall":{"type":"number"},"minHeroLevels":{"type":"number"},"roleId":{"type":["string","null"]},"colorCode":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrl":{"type":"string"},"league":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"selfRequired":false}},"required":["tag","name","badgeUrl","league"]},"members":{"type":"array","items":{"$ref":"#/components/schemas/RosterMemberOfRostersEntity"}},"layout":{"type":"string"},"sheetId":{"type":"string"},"closed":{"type":"boolean"},"startTime":{"format":"date-time","type":["string","null"]},"endTime":{"format":"date-time","type":["string","null"]},"sortBy":{"type":"string"},"useClanAlias":{"type":"boolean"},"allowUnlinked":{"type":"boolean"},"allowMultiSignup":{"type":"boolean"},"maxAccountsPerUser":{"type":["number","null"]},"rosterImage":{"type":["string","null"]},"allowCategorySelection":{"type":"boolean"},"requireCategorySelection":{"type":"boolean"},"categorySelectionCustomText":{"type":["string","null"]},"logChannelId":{"type":["string","null"]},"lastUpdated":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","category","name","guildId","clan","members","closed","lastUpdated","createdAt"]},"RosterMemberOfRostersEntity":{"type":"object","properties":{"warPreference":{"enum":["in","out",null],"type":["string","null"]},"categoryId":{"type":["string","null"]},"name":{"type":"string"},"tag":{"type":"string"},"userId":{"type":["string","null"]},"username":{"type":["string","null"]},"displayName":{"type":["string","null"]},"role":{"type":["string","null"]},"townHallLevel":{"type":"number"},"heroes":{"type":"object","additionalProperties":{"type":"number"}},"trophies":{"type":"number"},"leagueId":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"alias":{"type":["string","null"]}},"required":["tag","name"]},"createdAt":{"format":"date-time","type":"string"}},"required":["warPreference","name","tag","userId","username","role","townHallLevel","heroes","trophies","createdAt"]}}}}
```

## The RosterGroupsEntity object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RosterGroupsEntity":{"type":"object","properties":{"_id":{"type":"string"},"displayName":{"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"order":{"type":"number"},"selectable":{"type":"boolean"},"roleId":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","displayName","name","guildId","order","selectable","createdAt"]}}}}
```

## The GetRostersDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GetRostersDto":{"type":"object","properties":{"rosters":{"type":"array","items":{"$ref":"#/components/schemas/RostersEntity"}},"categories":{"type":"array","items":{"$ref":"#/components/schemas/RosterGroupsEntity"}}},"required":["rosters","categories"]},"RostersEntity":{"type":"object","properties":{"_id":{"type":"string"},"category":{"enum":["GENERAL","CWL","WAR","TROPHY","NO_CLAN"],"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"maxMembers":{"type":"number"},"minTownHall":{"type":"number"},"maxTownHall":{"type":"number"},"minHeroLevels":{"type":"number"},"roleId":{"type":["string","null"]},"colorCode":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrl":{"type":"string"},"league":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"selfRequired":false}},"required":["tag","name","badgeUrl","league"]},"members":{"type":"array","items":{"$ref":"#/components/schemas/RosterMemberOfRostersEntity"}},"layout":{"type":"string"},"sheetId":{"type":"string"},"closed":{"type":"boolean"},"startTime":{"format":"date-time","type":["string","null"]},"endTime":{"format":"date-time","type":["string","null"]},"sortBy":{"type":"string"},"useClanAlias":{"type":"boolean"},"allowUnlinked":{"type":"boolean"},"allowMultiSignup":{"type":"boolean"},"maxAccountsPerUser":{"type":["number","null"]},"rosterImage":{"type":["string","null"]},"allowCategorySelection":{"type":"boolean"},"requireCategorySelection":{"type":"boolean"},"categorySelectionCustomText":{"type":["string","null"]},"logChannelId":{"type":["string","null"]},"lastUpdated":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","category","name","guildId","clan","members","closed","lastUpdated","createdAt"]},"RosterMemberOfRostersEntity":{"type":"object","properties":{"warPreference":{"enum":["in","out",null],"type":["string","null"]},"categoryId":{"type":["string","null"]},"name":{"type":"string"},"tag":{"type":"string"},"userId":{"type":["string","null"]},"username":{"type":["string","null"]},"displayName":{"type":["string","null"]},"role":{"type":["string","null"]},"townHallLevel":{"type":"number"},"heroes":{"type":"object","additionalProperties":{"type":"number"}},"trophies":{"type":"number"},"leagueId":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"alias":{"type":["string","null"]}},"required":["tag","name"]},"createdAt":{"format":"date-time","type":"string"}},"required":["warPreference","name","tag","userId","username","role","townHallLevel","heroes","trophies","createdAt"]},"RosterGroupsEntity":{"type":"object","properties":{"_id":{"type":"string"},"displayName":{"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"order":{"type":"number"},"selectable":{"type":"boolean"},"roleId":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","displayName","name","guildId","order","selectable","createdAt"]}}}}
```

## The RosterCategory object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RosterCategory":{"type":"string","enum":["GENERAL","CWL","WAR","TROPHY"]}}}}
```

## The RosterSortBy object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RosterSortBy":{"type":"string","enum":["PLAYER_NAME","DISCORD_NAME","DISCORD_USERNAME","TOWN_HALL_LEVEL","HERO_LEVEL","TH_HERO_LEVEL","CLAN_NAME","SIGNUP_TIME","TROPHIES","LEAGUES"]}}}}
```

## The RosterInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RosterInput":{"type":"object","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/RosterCategory"}]},"sortBy":{"allOf":[{"$ref":"#/components/schemas/RosterSortBy"}]},"name":{"type":"string","minLength":1,"maxLength":30},"clanTag":{"type":["string","null"],"description":"Leave out for a roster open to all clans."},"importMembers":{"type":"boolean","description":"Sign up the clan's current members when the roster is created."},"allowUnlinked":{"type":"boolean"},"allowMultiSignup":{"type":"boolean"},"allowCategorySelection":{"type":"boolean"},"requireCategorySelection":{"type":"boolean"},"categorySelectionCustomText":{"type":["string","null"],"minLength":1,"maxLength":100},"maxMembers":{"type":"number","minimum":5,"maximum":500},"maxAccountsPerUser":{"type":["number","null"],"minimum":1,"maximum":75},"minTownHall":{"type":["number","null"],"minimum":2,"maximum":19},"maxTownHall":{"type":["number","null"],"minimum":2,"maximum":19},"minHeroLevels":{"type":["number","null"],"minimum":0},"roleId":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"layout":{"type":"string","description":"3 to 5 column keys joined by \"/\", e.g. \"#/TH_ICON/DISCORD/NAME/CLAN\"."},"useClanAlias":{"type":"boolean"},"colorCode":{"type":["number","null"],"minimum":0,"maximum":16777215},"rosterImage":{"type":["string","null"],"format":"uri"},"startTime":{"type":["string","null"],"description":"ISO time; null opens sign-ups right away."},"endTime":{"type":["string","null"],"description":"ISO time; null keeps sign-ups open until closed by hand."}},"required":["name"]},"RosterCategory":{"type":"string","enum":["GENERAL","CWL","WAR","TROPHY"]},"RosterSortBy":{"type":"string","enum":["PLAYER_NAME","DISCORD_NAME","DISCORD_USERNAME","TOWN_HALL_LEVEL","HERO_LEVEL","TH_HERO_LEVEL","CLAN_NAME","SIGNUP_TIME","TROPHIES","LEAGUES"]}}}}
```

## The RosterGroupInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RosterGroupInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":30},"roleId":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"selectable":{"type":"boolean","description":"Players can pick it when they sign up."}},"required":["name"]}}}}
```

## The RosterGroupUpdateInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RosterGroupUpdateInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":30},"roleId":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"selectable":{"type":"boolean","description":"Players can pick it when they sign up."},"order":{"type":"number","minimum":1,"maximum":1000}}}}}}
```

## The RosterUpdateInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RosterUpdateInput":{"type":"object","properties":{"category":{"allOf":[{"$ref":"#/components/schemas/RosterCategory"}]},"sortBy":{"allOf":[{"$ref":"#/components/schemas/RosterSortBy"}]},"name":{"type":"string","minLength":1,"maxLength":30},"clanTag":{"type":["string","null"],"description":"Leave out for a roster open to all clans."},"importMembers":{"type":"boolean","description":"Sign up the clan's current members when the roster is created."},"allowUnlinked":{"type":"boolean"},"allowMultiSignup":{"type":"boolean"},"allowCategorySelection":{"type":"boolean"},"requireCategorySelection":{"type":"boolean"},"categorySelectionCustomText":{"type":["string","null"],"minLength":1,"maxLength":100},"maxMembers":{"type":"number","minimum":5,"maximum":500},"maxAccountsPerUser":{"type":["number","null"],"minimum":1,"maximum":75},"minTownHall":{"type":["number","null"],"minimum":2,"maximum":19},"maxTownHall":{"type":["number","null"],"minimum":2,"maximum":19},"minHeroLevels":{"type":["number","null"],"minimum":0},"roleId":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"layout":{"type":"string","description":"3 to 5 column keys joined by \"/\", e.g. \"#/TH_ICON/DISCORD/NAME/CLAN\"."},"useClanAlias":{"type":"boolean"},"colorCode":{"type":["number","null"],"minimum":0,"maximum":16777215},"rosterImage":{"type":["string","null"],"format":"uri"},"startTime":{"type":["string","null"],"description":"ISO time; null opens sign-ups right away."},"endTime":{"type":["string","null"],"description":"ISO time; null keeps sign-ups open until closed by hand."},"closed":{"type":"boolean"}}},"RosterCategory":{"type":"string","enum":["GENERAL","CWL","WAR","TROPHY"]},"RosterSortBy":{"type":"string","enum":["PLAYER_NAME","DISCORD_NAME","DISCORD_USERNAME","TOWN_HALL_LEVEL","HERO_LEVEL","TH_HERO_LEVEL","CLAN_NAME","SIGNUP_TIME","TROPHIES","LEAGUES"]}}}}
```

## The CloneRosterInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"CloneRosterInput":{"type":"object","properties":{"name":{"type":"string","description":"Defaults to \"<name> [CLONE]\".","minLength":1,"maxLength":30}}}}}}
```

## The RosterTagsInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RosterTagsInput":{"type":"object","properties":{"playerTags":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}}},"required":["playerTags"]}}}}
```

## The RosterCheckUserDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RosterCheckUserDto":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"}},"required":["id","username","displayName"]}}}}
```

## The RosterPlayerCheckDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RosterPlayerCheckDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":["string","null"],"description":"Null when no player has this tag."},"townHallLevel":{"type":["number","null"]},"heroLevels":{"type":["number","null"]},"clanRole":{"type":["string","null"]},"user":{"description":"The linked Discord member, if any.","anyOf":[{"$ref":"#/components/schemas/RosterCheckUserDto"},{"type":"null"}]},"canJoin":{"type":"boolean"},"reason":{"type":["string","null"],"description":"Why the player can't join, in the bot's words."}},"required":["tag","name","townHallLevel","heroLevels","clanRole","user","canJoin","reason"]},"RosterCheckUserDto":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"}},"required":["id","username","displayName"]}}}}
```

## The AddRosterMembersInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"AddRosterMembersInput":{"type":"object","properties":{"playerTags":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}},"groupId":{"type":["string","null"]}},"required":["playerTags"]}}}}
```

## The AddRosterMembersDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"AddRosterMembersDto":{"type":"object","properties":{"roster":{"$ref":"#/components/schemas/RostersEntity"},"result":{"type":"array","items":{"$ref":"#/components/schemas/RosterPlayerCheckDto"}}},"required":["roster","result"]},"RostersEntity":{"type":"object","properties":{"_id":{"type":"string"},"category":{"enum":["GENERAL","CWL","WAR","TROPHY","NO_CLAN"],"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"maxMembers":{"type":"number"},"minTownHall":{"type":"number"},"maxTownHall":{"type":"number"},"minHeroLevels":{"type":"number"},"roleId":{"type":["string","null"]},"colorCode":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrl":{"type":"string"},"league":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"selfRequired":false}},"required":["tag","name","badgeUrl","league"]},"members":{"type":"array","items":{"$ref":"#/components/schemas/RosterMemberOfRostersEntity"}},"layout":{"type":"string"},"sheetId":{"type":"string"},"closed":{"type":"boolean"},"startTime":{"format":"date-time","type":["string","null"]},"endTime":{"format":"date-time","type":["string","null"]},"sortBy":{"type":"string"},"useClanAlias":{"type":"boolean"},"allowUnlinked":{"type":"boolean"},"allowMultiSignup":{"type":"boolean"},"maxAccountsPerUser":{"type":["number","null"]},"rosterImage":{"type":["string","null"]},"allowCategorySelection":{"type":"boolean"},"requireCategorySelection":{"type":"boolean"},"categorySelectionCustomText":{"type":["string","null"]},"logChannelId":{"type":["string","null"]},"lastUpdated":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","category","name","guildId","clan","members","closed","lastUpdated","createdAt"]},"RosterMemberOfRostersEntity":{"type":"object","properties":{"warPreference":{"enum":["in","out",null],"type":["string","null"]},"categoryId":{"type":["string","null"]},"name":{"type":"string"},"tag":{"type":"string"},"userId":{"type":["string","null"]},"username":{"type":["string","null"]},"displayName":{"type":["string","null"]},"role":{"type":["string","null"]},"townHallLevel":{"type":"number"},"heroes":{"type":"object","additionalProperties":{"type":"number"}},"trophies":{"type":"number"},"leagueId":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"alias":{"type":["string","null"]}},"required":["tag","name"]},"createdAt":{"format":"date-time","type":"string"}},"required":["warPreference","name","tag","userId","username","role","townHallLevel","heroes","trophies","createdAt"]},"RosterPlayerCheckDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":["string","null"],"description":"Null when no player has this tag."},"townHallLevel":{"type":["number","null"]},"heroLevels":{"type":["number","null"]},"clanRole":{"type":["string","null"]},"user":{"description":"The linked Discord member, if any.","anyOf":[{"$ref":"#/components/schemas/RosterCheckUserDto"},{"type":"null"}]},"canJoin":{"type":"boolean"},"reason":{"type":["string","null"],"description":"Why the player can't join, in the bot's words."}},"required":["tag","name","townHallLevel","heroLevels","clanRole","user","canJoin","reason"]},"RosterCheckUserDto":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"}},"required":["id","username","displayName"]}}}}
```

## The RemoveMembersBulkInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RemoveMembersBulkInput":{"type":"object","properties":{"playerTags":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["playerTags"]}}}}
```

## The TransferRosterMembersInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TransferRosterMembersInput":{"type":"object","properties":{"newRosterId":{"type":"string","description":"Required unless newGroupId is set."},"newGroupId":{"type":"string","description":"Required unless newRosterId is set."},"playerTags":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["playerTags"]}}}}
```

## The TransferRosterMembersDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TransferRosterMembersDto":{"type":"object","properties":{"roster":{"$ref":"#/components/schemas/RostersEntity"},"result":{"type":"array","items":{"type":"object","properties":{"player":{"type":"object","properties":{"name":{"type":"string"},"tag":{"type":"string"}},"selfRequired":true},"success":{"type":"boolean"},"message":{"type":"string"}},"required":["player","success","message"]}}},"required":["roster","result"]},"RostersEntity":{"type":"object","properties":{"_id":{"type":"string"},"category":{"enum":["GENERAL","CWL","WAR","TROPHY","NO_CLAN"],"type":"string"},"name":{"type":"string"},"guildId":{"type":"string"},"maxMembers":{"type":"number"},"minTownHall":{"type":"number"},"maxTownHall":{"type":"number"},"minHeroLevels":{"type":"number"},"roleId":{"type":["string","null"]},"colorCode":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"badgeUrl":{"type":"string"},"league":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"selfRequired":false}},"required":["tag","name","badgeUrl","league"]},"members":{"type":"array","items":{"$ref":"#/components/schemas/RosterMemberOfRostersEntity"}},"layout":{"type":"string"},"sheetId":{"type":"string"},"closed":{"type":"boolean"},"startTime":{"format":"date-time","type":["string","null"]},"endTime":{"format":"date-time","type":["string","null"]},"sortBy":{"type":"string"},"useClanAlias":{"type":"boolean"},"allowUnlinked":{"type":"boolean"},"allowMultiSignup":{"type":"boolean"},"maxAccountsPerUser":{"type":["number","null"]},"rosterImage":{"type":["string","null"]},"allowCategorySelection":{"type":"boolean"},"requireCategorySelection":{"type":"boolean"},"categorySelectionCustomText":{"type":["string","null"]},"logChannelId":{"type":["string","null"]},"lastUpdated":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["_id","category","name","guildId","clan","members","closed","lastUpdated","createdAt"]},"RosterMemberOfRostersEntity":{"type":"object","properties":{"warPreference":{"enum":["in","out",null],"type":["string","null"]},"categoryId":{"type":["string","null"]},"name":{"type":"string"},"tag":{"type":"string"},"userId":{"type":["string","null"]},"username":{"type":["string","null"]},"displayName":{"type":["string","null"]},"role":{"type":["string","null"]},"townHallLevel":{"type":"number"},"heroes":{"type":"object","additionalProperties":{"type":"number"}},"trophies":{"type":"number"},"leagueId":{"type":"number"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"alias":{"type":["string","null"]}},"required":["tag","name"]},"createdAt":{"format":"date-time","type":"string"}},"required":["warPreference","name","tag","userId","username","role","townHallLevel","heroes","trophies","createdAt"]}}}}
```

## The GiveawayMode object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GiveawayMode":{"type":"string","enum":["open","boosted","restricted"]}}}}
```

## The GiveawayEligibilityDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GiveawayEligibilityDto":{"type":"object","properties":{"mode":{"allOf":[{"$ref":"#/components/schemas/GiveawayMode"}]},"allGuildClans":{"type":"boolean"},"clanTags":{"type":"array","items":{"type":"string"}},"boostFactor":{"type":["number","null"]}},"required":["mode","allGuildClans","clanTags","boostFactor"]},"GiveawayMode":{"type":"string","enum":["open","boosted","restricted"]}}}}
```

## The GiveawayDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GiveawayDto":{"type":"object","properties":{"id":{"type":"string"},"guildId":{"type":"string"},"channelId":{"type":"string"},"messageId":{"type":["string","null"]},"hostUserId":{"type":"string"},"hostName":{"type":["string","null"]},"prize":{"type":"string"},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"winnerCount":{"type":"number"},"eligibility":{"$ref":"#/components/schemas/GiveawayEligibilityDto"},"status":{"type":"string"},"entryCount":{"type":"number"},"winners":{"type":"array","items":{"type":"string"}},"endsAt":{"type":"number"},"endedAt":{"type":["number","null"]},"createdAt":{"type":"number"}},"required":["id","guildId","channelId","messageId","hostUserId","hostName","prize","title","description","imageUrl","winnerCount","eligibility","status","entryCount","winners","endsAt","endedAt","createdAt"]},"GiveawayEligibilityDto":{"type":"object","properties":{"mode":{"allOf":[{"$ref":"#/components/schemas/GiveawayMode"}]},"allGuildClans":{"type":"boolean"},"clanTags":{"type":"array","items":{"type":"string"}},"boostFactor":{"type":["number","null"]}},"required":["mode","allGuildClans","clanTags","boostFactor"]},"GiveawayMode":{"type":"string","enum":["open","boosted","restricted"]}}}}
```

## The GiveawaysDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GiveawaysDto":{"type":"object","properties":{"giveaways":{"type":"array","items":{"$ref":"#/components/schemas/GiveawayDto"}}},"required":["giveaways"]},"GiveawayDto":{"type":"object","properties":{"id":{"type":"string"},"guildId":{"type":"string"},"channelId":{"type":"string"},"messageId":{"type":["string","null"]},"hostUserId":{"type":"string"},"hostName":{"type":["string","null"]},"prize":{"type":"string"},"title":{"type":["string","null"]},"description":{"type":["string","null"]},"imageUrl":{"type":["string","null"]},"winnerCount":{"type":"number"},"eligibility":{"$ref":"#/components/schemas/GiveawayEligibilityDto"},"status":{"type":"string"},"entryCount":{"type":"number"},"winners":{"type":"array","items":{"type":"string"}},"endsAt":{"type":"number"},"endedAt":{"type":["number","null"]},"createdAt":{"type":"number"}},"required":["id","guildId","channelId","messageId","hostUserId","hostName","prize","title","description","imageUrl","winnerCount","eligibility","status","entryCount","winners","endsAt","endedAt","createdAt"]},"GiveawayEligibilityDto":{"type":"object","properties":{"mode":{"allOf":[{"$ref":"#/components/schemas/GiveawayMode"}]},"allGuildClans":{"type":"boolean"},"clanTags":{"type":"array","items":{"type":"string"}},"boostFactor":{"type":["number","null"]}},"required":["mode","allGuildClans","clanTags","boostFactor"]},"GiveawayMode":{"type":"string","enum":["open","boosted","restricted"]}}}}
```

## The GiveawayEntryPlayerDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GiveawayEntryPlayerDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":["string","null"]}},"required":["tag","name"]}}}}
```

## The GiveawayEntryClanDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GiveawayEntryClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The GiveawayEntryDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GiveawayEntryDto":{"type":"object","properties":{"userId":{"type":"string"},"displayName":{"type":["string","null"],"description":"The Discord name saved with the user's linked accounts, when they have one."},"player":{"description":"The linked account that counts the entrant in a chosen clan.","anyOf":[{"$ref":"#/components/schemas/GiveawayEntryPlayerDto"},{"type":"null"}]},"clan":{"anyOf":[{"$ref":"#/components/schemas/GiveawayEntryClanDto"},{"type":"null"}]},"tickets":{"type":"number","description":"0 for a restricted entrant outside the chosen clans, who can't win."},"enteredAt":{"type":"number"}},"required":["userId","displayName","player","clan","tickets","enteredAt"]},"GiveawayEntryPlayerDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":["string","null"]}},"required":["tag","name"]},"GiveawayEntryClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The GiveawayEntriesDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GiveawayEntriesDto":{"type":"object","properties":{"total":{"type":"number"},"winners":{"type":"array","items":{"$ref":"#/components/schemas/GiveawayEntryDto"}},"entries":{"description":"Everyone else, in entry order.","type":"array","items":{"$ref":"#/components/schemas/GiveawayEntryDto"}}},"required":["total","winners","entries"]},"GiveawayEntryDto":{"type":"object","properties":{"userId":{"type":"string"},"displayName":{"type":["string","null"],"description":"The Discord name saved with the user's linked accounts, when they have one."},"player":{"description":"The linked account that counts the entrant in a chosen clan.","anyOf":[{"$ref":"#/components/schemas/GiveawayEntryPlayerDto"},{"type":"null"}]},"clan":{"anyOf":[{"$ref":"#/components/schemas/GiveawayEntryClanDto"},{"type":"null"}]},"tickets":{"type":"number","description":"0 for a restricted entrant outside the chosen clans, who can't win."},"enteredAt":{"type":"number"}},"required":["userId","displayName","player","clan","tickets","enteredAt"]},"GiveawayEntryPlayerDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":["string","null"]}},"required":["tag","name"]},"GiveawayEntryClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The GiveawayEligibilityInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GiveawayEligibilityInput":{"type":"object","properties":{"mode":{"allOf":[{"$ref":"#/components/schemas/GiveawayMode"}]},"allGuildClans":{"type":"boolean"},"clanTags":{"uniqueItems":true,"maxItems":100,"type":"array","items":{"type":"string"}},"boostFactor":{"type":"number","minimum":2,"maximum":100}},"required":["mode"]},"GiveawayMode":{"type":"string","enum":["open","boosted","restricted"]}}}}
```

## The CreateGiveawayInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"CreateGiveawayInput":{"type":"object","properties":{"endsAt":{"type":"string","description":"Date string or timestamp in milliseconds","format":"date-time"},"channelId":{"type":"string"},"hostUserId":{"type":"string"},"applicationId":{"type":"string","description":"The bot that posts and runs it. Only an API-key caller (a bot) can set it."},"hostName":{"type":"string","description":"The host's Discord name, shown on the dashboard.","maxLength":100},"prize":{"type":"string","minLength":1,"maxLength":256},"title":{"type":"string","description":"Replaces the \"🎉 Giveaway · prize\" heading on the posted message.","maxLength":100},"description":{"type":"string","description":"Replaces the line under the heading. Markdown.","maxLength":1000},"imageUrl":{"type":"string","maxLength":2048,"format":"uri"},"winnerCount":{"type":"number","minimum":1,"maximum":50},"eligibility":{"$ref":"#/components/schemas/GiveawayEligibilityInput"}},"required":["endsAt","channelId","hostUserId","prize","winnerCount","eligibility"]},"GiveawayEligibilityInput":{"type":"object","properties":{"mode":{"allOf":[{"$ref":"#/components/schemas/GiveawayMode"}]},"allGuildClans":{"type":"boolean"},"clanTags":{"uniqueItems":true,"maxItems":100,"type":"array","items":{"type":"string"}},"boostFactor":{"type":"number","minimum":2,"maximum":100}},"required":["mode"]},"GiveawayMode":{"type":"string","enum":["open","boosted","restricted"]}}}}
```

## The UpdateGiveawayInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"UpdateGiveawayInput":{"type":"object","properties":{"title":{"type":["string","null"],"description":"Null puts the default heading back.","maxLength":100},"description":{"type":["string","null"],"description":"Null puts the default line back.","maxLength":1000},"endsAt":{"type":"string","description":"Date string or timestamp in milliseconds","format":"date-time"},"messageId":{"type":"string"},"prize":{"type":"string","minLength":1,"maxLength":256},"winnerCount":{"type":"number","minimum":1,"maximum":50},"eligibility":{"description":"New clans or boost for an active giveaway. The mode can't change.","allOf":[{"$ref":"#/components/schemas/GiveawayEligibilityInput"}]}}},"GiveawayEligibilityInput":{"type":"object","properties":{"mode":{"allOf":[{"$ref":"#/components/schemas/GiveawayMode"}]},"allGuildClans":{"type":"boolean"},"clanTags":{"uniqueItems":true,"maxItems":100,"type":"array","items":{"type":"string"}},"boostFactor":{"type":"number","minimum":2,"maximum":100}},"required":["mode"]},"GiveawayMode":{"type":"string","enum":["open","boosted","restricted"]}}}}
```

## The EnterGiveawayInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"EnterGiveawayInput":{"type":"object","properties":{"userId":{"type":"string"},"displayName":{"type":"string","description":"The user's Discord name, shown in the entrant list.","maxLength":100}},"required":["userId"]}}}}
```

## The GiveawayEntryResultDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GiveawayEntryResultDto":{"type":"object","properties":{"entryCount":{"type":"number"},"tickets":{"type":"number","description":"More than 1 when a boosted giveaway counts the user in a chosen clan."},"player":{"anyOf":[{"$ref":"#/components/schemas/GiveawayEntryPlayerDto"},{"type":"null"}]},"clan":{"anyOf":[{"$ref":"#/components/schemas/GiveawayEntryClanDto"},{"type":"null"}]}},"required":["entryCount","tickets","player","clan"]},"GiveawayEntryPlayerDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":["string","null"]}},"required":["tag","name"]},"GiveawayEntryClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The GiveawayDrawResultDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GiveawayDrawResultDto":{"type":"object","properties":{"winners":{"type":"array","items":{"type":"string"}},"entryCount":{"type":"number"}},"required":["winners","entryCount"]}}}}
```

## The ClanRefDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanRefDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":["string","null"]}},"required":["tag","name"]}}}}
```

## The TimezoneDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TimezoneDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"location":{"type":"string"}},"required":["id","name","location"]}}}}
```

## The UserSettingsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"UserSettingsDto":{"type":"object","properties":{"clan":{"description":"Used by bot commands run without a clan tag.","anyOf":[{"$ref":"#/components/schemas/ClanRefDto"},{"type":"null"}]},"bookmarks":{"description":"Clans the user bookmarked on the dashboard, on every device.","type":"array","items":{"$ref":"#/components/schemas/ClanRefDto"}},"timezone":{"description":"Used by /activity charts; null means UTC.","anyOf":[{"$ref":"#/components/schemas/TimezoneDto"},{"type":"null"}]}},"required":["clan","bookmarks","timezone"]},"ClanRefDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":["string","null"]}},"required":["tag","name"]},"TimezoneDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"location":{"type":"string"}},"required":["id","name","location"]}}}}
```

## The TaskAccountDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TaskAccountDto":{"type":"object","properties":{"townHallLevel":{"type":["number","null"],"description":"Null when the game didn't return the player."},"tag":{"type":"string"},"name":{"type":"string"}},"required":["townHallLevel","tag","name"]}}}}
```

## The TaskClanDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TaskClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The WarTaskDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"WarTaskDto":{"type":"object","properties":{"warType":{"allOf":[{"$ref":"#/components/schemas/WarTypes"}]},"state":{"description":"From the war's times rather than the stored state, which can lag behind.","enum":["preparation","inWar"],"type":"string"},"warTag":{"type":["string","null"],"description":"Set for CWL rounds only."},"round":{"type":["number","null"],"description":"The CWL round number; null for other wars."},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"account":{"$ref":"#/components/schemas/TaskAccountDto"},"clan":{"description":"The account's side.","allOf":[{"$ref":"#/components/schemas/TaskClanDto"}]},"opponent":{"$ref":"#/components/schemas/TaskClanDto"},"attacks":{"type":"number"},"attackLimit":{"type":"number"}},"required":["warType","state","warTag","round","startTime","endTime","account","clan","opponent","attacks","attackLimit"]},"WarTypes":{"type":"number","enum":[1,2,3]},"TaskAccountDto":{"type":"object","properties":{"townHallLevel":{"type":["number","null"],"description":"Null when the game didn't return the player."},"tag":{"type":"string"},"name":{"type":"string"}},"required":["townHallLevel","tag","name"]},"TaskClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The WarTasksDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"WarTasksDto":{"type":"object","properties":{"items":{"description":"One per account and war that hasn't ended, including CWL rounds in clans the account left.","type":"array","items":{"$ref":"#/components/schemas/WarTaskDto"}}},"required":["items"]},"WarTaskDto":{"type":"object","properties":{"warType":{"allOf":[{"$ref":"#/components/schemas/WarTypes"}]},"state":{"description":"From the war's times rather than the stored state, which can lag behind.","enum":["preparation","inWar"],"type":"string"},"warTag":{"type":["string","null"],"description":"Set for CWL rounds only."},"round":{"type":["number","null"],"description":"The CWL round number; null for other wars."},"startTime":{"type":"string","format":"date-time"},"endTime":{"type":"string","format":"date-time"},"account":{"$ref":"#/components/schemas/TaskAccountDto"},"clan":{"description":"The account's side.","allOf":[{"$ref":"#/components/schemas/TaskClanDto"}]},"opponent":{"$ref":"#/components/schemas/TaskClanDto"},"attacks":{"type":"number"},"attackLimit":{"type":"number"}},"required":["warType","state","warTag","round","startTime","endTime","account","clan","opponent","attacks","attackLimit"]},"WarTypes":{"type":"number","enum":[1,2,3]},"TaskAccountDto":{"type":"object","properties":{"townHallLevel":{"type":["number","null"],"description":"Null when the game didn't return the player."},"tag":{"type":"string"},"name":{"type":"string"}},"required":["townHallLevel","tag","name"]},"TaskClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The CapitalRaidTaskDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"CapitalRaidTaskDto":{"type":"object","properties":{"attackLimit":{"type":["number","null"],"description":"Attacks allowed, bonus included; null until the account's first attack this weekend."},"endTime":{"type":"string","format":"date-time"},"account":{"$ref":"#/components/schemas/TaskAccountDto"},"clan":{"$ref":"#/components/schemas/TaskClanDto"},"attacks":{"type":"number"}},"required":["attackLimit","endTime","account","clan","attacks"]},"TaskAccountDto":{"type":"object","properties":{"townHallLevel":{"type":["number","null"],"description":"Null when the game didn't return the player."},"tag":{"type":"string"},"name":{"type":"string"}},"required":["townHallLevel","tag","name"]},"TaskClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The CapitalRaidTasksDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"CapitalRaidTasksDto":{"type":"object","properties":{"items":{"description":"One per account whose current clan is raiding; empty outside a raid weekend.","type":"array","items":{"$ref":"#/components/schemas/CapitalRaidTaskDto"}}},"required":["items"]},"CapitalRaidTaskDto":{"type":"object","properties":{"attackLimit":{"type":["number","null"],"description":"Attacks allowed, bonus included; null until the account's first attack this weekend."},"endTime":{"type":"string","format":"date-time"},"account":{"$ref":"#/components/schemas/TaskAccountDto"},"clan":{"$ref":"#/components/schemas/TaskClanDto"},"attacks":{"type":"number"}},"required":["attackLimit","endTime","account","clan","attacks"]},"TaskAccountDto":{"type":"object","properties":{"townHallLevel":{"type":["number","null"],"description":"Null when the game didn't return the player."},"tag":{"type":"string"},"name":{"type":"string"}},"required":["townHallLevel","tag","name"]},"TaskClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The ClanGamesTaskDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanGamesTaskDto":{"type":"object","properties":{"clan":{"description":"The clan the account is earning points in; null when unknown.","anyOf":[{"$ref":"#/components/schemas/TaskClanDto"},{"type":"null"}]},"endTime":{"type":"string","format":"date-time"},"account":{"$ref":"#/components/schemas/TaskAccountDto"},"points":{"type":"number"},"maxPoints":{"type":"number"}},"required":["clan","endTime","account","points","maxPoints"]},"TaskClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]},"TaskAccountDto":{"type":"object","properties":{"townHallLevel":{"type":["number","null"],"description":"Null when the game didn't return the player."},"tag":{"type":"string"},"name":{"type":"string"}},"required":["townHallLevel","tag","name"]}}}}
```

## The ClanGamesTasksDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanGamesTasksDto":{"type":"object","properties":{"items":{"description":"One per tracked account; empty outside Clan Games.","type":"array","items":{"$ref":"#/components/schemas/ClanGamesTaskDto"}}},"required":["items"]},"ClanGamesTaskDto":{"type":"object","properties":{"clan":{"description":"The clan the account is earning points in; null when unknown.","anyOf":[{"$ref":"#/components/schemas/TaskClanDto"},{"type":"null"}]},"endTime":{"type":"string","format":"date-time"},"account":{"$ref":"#/components/schemas/TaskAccountDto"},"points":{"type":"number"},"maxPoints":{"type":"number"}},"required":["clan","endTime","account","points","maxPoints"]},"TaskClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]},"TaskAccountDto":{"type":"object","properties":{"townHallLevel":{"type":["number","null"],"description":"Null when the game didn't return the player."},"tag":{"type":"string"},"name":{"type":"string"}},"required":["townHallLevel","tag","name"]}}}}
```

## The TaskLeagueDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TaskLeagueDto":{"type":"object","properties":{"iconUrl":{"type":["string","null"]},"id":{"type":"number"},"name":{"type":"string"}},"required":["iconUrl","id","name"]}}}}
```

## The LegendTaskDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendTaskDto":{"type":"object","properties":{"endTime":{"type":"string","description":"When the legend day ends.","format":"date-time"},"account":{"$ref":"#/components/schemas/TaskAccountDto"},"league":{"$ref":"#/components/schemas/TaskLeagueDto"},"attacks":{"type":"number","description":"Attacks on the current legend day."},"attackLimit":{"type":"number"}},"required":["endTime","account","league","attacks","attackLimit"]},"TaskAccountDto":{"type":"object","properties":{"townHallLevel":{"type":["number","null"],"description":"Null when the game didn't return the player."},"tag":{"type":"string"},"name":{"type":"string"}},"required":["townHallLevel","tag","name"]},"TaskLeagueDto":{"type":"object","properties":{"iconUrl":{"type":["string","null"]},"id":{"type":"number"},"name":{"type":"string"}},"required":["iconUrl","id","name"]}}}}
```

## The LegendTasksDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LegendTasksDto":{"type":"object","properties":{"items":{"description":"One per account in Legend League.","type":"array","items":{"$ref":"#/components/schemas/LegendTaskDto"}}},"required":["items"]},"LegendTaskDto":{"type":"object","properties":{"endTime":{"type":"string","description":"When the legend day ends.","format":"date-time"},"account":{"$ref":"#/components/schemas/TaskAccountDto"},"league":{"$ref":"#/components/schemas/TaskLeagueDto"},"attacks":{"type":"number","description":"Attacks on the current legend day."},"attackLimit":{"type":"number"}},"required":["endTime","account","league","attacks","attackLimit"]},"TaskAccountDto":{"type":"object","properties":{"townHallLevel":{"type":["number","null"],"description":"Null when the game didn't return the player."},"tag":{"type":"string"},"name":{"type":"string"}},"required":["townHallLevel","tag","name"]},"TaskLeagueDto":{"type":"object","properties":{"iconUrl":{"type":["string","null"]},"id":{"type":"number"},"name":{"type":"string"}},"required":["iconUrl","id","name"]}}}}
```

## The RankedTaskDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RankedTaskDto":{"type":"object","properties":{"attackLimit":{"type":["number","null"],"description":"Null when the game data is unavailable."},"endTime":{"type":"string","description":"When the ranked week ends.","format":"date-time"},"account":{"$ref":"#/components/schemas/TaskAccountDto"},"league":{"$ref":"#/components/schemas/TaskLeagueDto"},"attacks":{"type":"number","description":"Attacks this ranked week."}},"required":["attackLimit","endTime","account","league","attacks"]},"TaskAccountDto":{"type":"object","properties":{"townHallLevel":{"type":["number","null"],"description":"Null when the game didn't return the player."},"tag":{"type":"string"},"name":{"type":"string"}},"required":["townHallLevel","tag","name"]},"TaskLeagueDto":{"type":"object","properties":{"iconUrl":{"type":["string","null"]},"id":{"type":"number"},"name":{"type":"string"}},"required":["iconUrl","id","name"]}}}}
```

## The RankedTasksDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RankedTasksDto":{"type":"object","properties":{"items":{"description":"One per account in a ranked group this week.","type":"array","items":{"$ref":"#/components/schemas/RankedTaskDto"}}},"required":["items"]},"RankedTaskDto":{"type":"object","properties":{"attackLimit":{"type":["number","null"],"description":"Null when the game data is unavailable."},"endTime":{"type":"string","description":"When the ranked week ends.","format":"date-time"},"account":{"$ref":"#/components/schemas/TaskAccountDto"},"league":{"$ref":"#/components/schemas/TaskLeagueDto"},"attacks":{"type":"number","description":"Attacks this ranked week."}},"required":["attackLimit","endTime","account","league","attacks"]},"TaskAccountDto":{"type":"object","properties":{"townHallLevel":{"type":["number","null"],"description":"Null when the game didn't return the player."},"tag":{"type":"string"},"name":{"type":"string"}},"required":["townHallLevel","tag","name"]},"TaskLeagueDto":{"type":"object","properties":{"iconUrl":{"type":["string","null"]},"id":{"type":"number"},"name":{"type":"string"}},"required":["iconUrl","id","name"]}}}}
```

## The ClanTagInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanTagInput":{"type":"object","properties":{"clanTag":{"type":"string","pattern":"^#?[0-9A-Za-z]{3,12}$"}},"required":["clanTag"]}}}}
```

## The TimezoneInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TimezoneInput":{"type":"object","properties":{"id":{"type":"string","description":"IANA ID, e.g. `Asia/Kolkata`.","minLength":1,"maxLength":64}},"required":["id"]}}}}
```

## The GameExportDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GameExportDto":{"type":"object","properties":{"data":{"type":"object","additionalProperties":true},"tag":{"type":"string"},"exportedAt":{"format":"date-time","type":"string","description":"When the game made the export."},"updatedAt":{"format":"date-time","type":"string"}},"required":["data","tag","exportedAt","updatedAt"]}}}}
```

## The GameExportsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GameExportsDto":{"type":"object","properties":{"items":{"description":"One per account this user saved an export for.","type":"array","items":{"$ref":"#/components/schemas/GameExportDto"}}},"required":["items"]},"GameExportDto":{"type":"object","properties":{"data":{"type":"object","additionalProperties":true},"tag":{"type":"string"},"exportedAt":{"format":"date-time","type":"string","description":"When the game made the export."},"updatedAt":{"format":"date-time","type":"string"}},"required":["data","tag","exportedAt","updatedAt"]}}}}
```

## The GameExportInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GameExportInput":{"type":"object","properties":{"data":{"type":"object","additionalProperties":true,"description":"The game's data export for this account, as copied from the game."}},"required":["data"]}}}}
```

## The GuildClanDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GuildClanDto":{"type":"object","properties":{"_id":{"type":"string"},"categoryId":{"type":"string"},"name":{"type":"string"},"tag":{"type":"string"},"order":{"type":"number"},"league":{"type":"string"},"level":{"type":"number"},"members":{"type":"number"},"alias":{"type":["string","null"],"description":"Finds the clan in commands; `{ALIAS}` in nicknames."},"nickname":{"type":["string","null"],"description":"Shown instead of the clan name in reminders and lists."},"channels":{"description":"Commands run in these channels use this clan when no tag is given.","type":"array","items":{"type":"string"}}},"required":["_id","categoryId","name","tag","order","league","level","members","alias","nickname","channels"]}}}}
```

## The CategoryDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"CategoryDto":{"type":"object","properties":{"_id":{"type":"string"},"displayName":{"type":"string"},"order":{"type":"number"},"clans":{"type":"array","items":{"$ref":"#/components/schemas/GuildClanDto"}}},"required":["_id","displayName","order","clans"]},"GuildClanDto":{"type":"object","properties":{"_id":{"type":"string"},"categoryId":{"type":"string"},"name":{"type":"string"},"tag":{"type":"string"},"order":{"type":"number"},"league":{"type":"string"},"level":{"type":"number"},"members":{"type":"number"},"alias":{"type":["string","null"],"description":"Finds the clan in commands; `{ALIAS}` in nicknames."},"nickname":{"type":["string","null"],"description":"Shown instead of the clan name in reminders and lists."},"channels":{"description":"Commands run in these channels use this clan when no tag is given.","type":"array","items":{"type":"string"}}},"required":["_id","categoryId","name","tag","order","league","level","members","alias","nickname","channels"]}}}}
```

## The GuildClansDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GuildClansDto":{"type":"object","properties":{"guildId":{"type":"string"},"name":{"type":"string"},"categories":{"type":"array","items":{"$ref":"#/components/schemas/CategoryDto"}}},"required":["guildId","name","categories"]},"CategoryDto":{"type":"object","properties":{"_id":{"type":"string"},"displayName":{"type":"string"},"order":{"type":"number"},"clans":{"type":"array","items":{"$ref":"#/components/schemas/GuildClanDto"}}},"required":["_id","displayName","order","clans"]},"GuildClanDto":{"type":"object","properties":{"_id":{"type":"string"},"categoryId":{"type":"string"},"name":{"type":"string"},"tag":{"type":"string"},"order":{"type":"number"},"league":{"type":"string"},"level":{"type":"number"},"members":{"type":"number"},"alias":{"type":["string","null"],"description":"Finds the clan in commands; `{ALIAS}` in nicknames."},"nickname":{"type":["string","null"],"description":"Shown instead of the clan name in reminders and lists."},"channels":{"description":"Commands run in these channels use this clan when no tag is given.","type":"array","items":{"type":"string"}}},"required":["_id","categoryId","name","tag","order","league","level","members","alias","nickname","channels"]}}}}
```

## The ReorderClansInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ReorderClansInput":{"type":"object","properties":{"_id":{"type":"string"},"order":{"type":"number"}},"required":["_id","order"]}}}}
```

## The ReorderCategoriesInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ReorderCategoriesInput":{"type":"object","properties":{"_id":{"type":"string"},"order":{"type":"number"},"clans":{"type":"array","items":{"$ref":"#/components/schemas/ReorderClansInput"}}},"required":["_id","order","clans"]},"ReorderClansInput":{"type":"object","properties":{"_id":{"type":"string"},"order":{"type":"number"}},"required":["_id","order"]}}}}
```

## The ReorderClanCategoriesInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ReorderClanCategoriesInput":{"type":"object","properties":{"categories":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/ReorderCategoriesInput"}}},"required":["categories"]},"ReorderCategoriesInput":{"type":"object","properties":{"_id":{"type":"string"},"order":{"type":"number"},"clans":{"type":"array","items":{"$ref":"#/components/schemas/ReorderClansInput"}}},"required":["_id","order","clans"]},"ReorderClansInput":{"type":"object","properties":{"_id":{"type":"string"},"order":{"type":"number"}},"required":["_id","order"]}}}}
```

## The AddGuildClanInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"AddGuildClanInput":{"type":"object","properties":{"tag":{"type":"string","description":"With or without `#`; the letter O is read as zero, as in the game.","pattern":"^#?[0-9A-Za-z]{3,15}$"},"categoryId":{"type":["string","null"]}},"required":["tag"]}}}}
```

## The ClanSettingsInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanSettingsInput":{"type":"object","properties":{"alias":{"type":["string","null"],"description":"Up to 15 characters, no spaces or leading #.","pattern":"^[^#\\s]\\S{0,14}$"},"nickname":{"type":["string","null"],"minLength":1,"maxLength":15},"channels":{"maxItems":25,"type":"array","items":{"type":"string","pattern":"^\\d{17,20}$"}}}}}}}
```

## The ClanCategoryInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanCategoryInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":36}},"required":["name"]}}}}
```

## The GuildChannelDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GuildChannelDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"number","description":"Discord channel type: 0 text, 5 announcement, 15 forum, 16 media; 10, 11, 12 threads."},"parentId":{"type":["string","null"],"description":"A channel's category, or a thread's channel."},"selectable":{"type":"boolean","description":"False for a forum or media channel, which is listed only as the heading of its posts."},"hasWebhook":{"type":"boolean","description":"ClashPerk already has a webhook here (a thread's is its channel's), so no Discord sign-in is needed."},"missingPermissions":{"description":"Permissions `/debug` checks that ClashPerk lacks here (a thread's are its channel's), e.g. `Send Messages`.","type":"array","items":{"type":"string"}}},"required":["id","name","type","parentId","selectable","hasWebhook","missingPermissions"]}}}}
```

## The GuildCategoryDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GuildCategoryDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}}}
```

## The MentionChannelDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"MentionChannelDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"number","description":"Discord channel type: 0 text, 2 voice, 5 announcement, 13 stage, 15 forum, 16 media; 10, 11, 12 threads."},"parentId":{"type":["string","null"],"description":"A thread's channel; null for a channel."}},"required":["id","name","type","parentId"]}}}}
```

## The RoleProblem object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RoleProblem":{"type":"string","enum":["above_bot","managed","no_manage_roles"],"description":"Why ClashPerk can't give this role out, or null when it can."}}}}
```

## The GuildRoleDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GuildRoleDto":{"type":"object","properties":{"problem":{"description":"Why ClashPerk can't give this role out, or null when it can.","anyOf":[{"$ref":"#/components/schemas/RoleProblem"},{"type":"null"}]},"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"number"},"position":{"type":"number"}},"required":["problem","id","name","color","position"]},"RoleProblem":{"type":"string","enum":["above_bot","managed","no_manage_roles"],"description":"Why ClashPerk can't give this role out, or null when it can."}}}}
```

## The BotPermissionsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"BotPermissionsDto":{"type":"object","properties":{"missingPermissions":{"description":"`Manage Roles` (auto-roles) and `Manage Nicknames` (auto-nickname) when the bot lacks them.","type":"array","items":{"type":"string"}}},"required":["missingPermissions"]}}}}
```

## The GuildEmojiDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GuildEmojiDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"animated":{"type":"boolean"}},"required":["id","name","animated"]}}}}
```

## The GuildEmojisDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GuildEmojisDto":{"type":"object","properties":{"server":{"description":"This server's, without the ones it lost with its boost level.","type":"array","items":{"$ref":"#/components/schemas/GuildEmojiDto"}},"bot":{"description":"The bot's own, which it can use in any server.","type":"array","items":{"$ref":"#/components/schemas/GuildEmojiDto"}}},"required":["server","bot"]},"GuildEmojiDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"animated":{"type":"boolean"}},"required":["id","name","animated"]}}}}
```

## The ClanLogType object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanLogType":{"type":"string","enum":["clan_achievements_log","continuous_donation_log","daily_donation_log","weekly_donation_log","monthly_donation_log","clan_games_embed_log","last_seen_embed_log","legend_attacks_daily_summary_log","clan_capital_weekly_summary_log","clan_capital_contribution_log","clan_capital_raid_log","war_attack_log","cwl_attack_log","war_embed_log","war_missed_attacks_log","cwl_embed_log","cwl_missed_attacks_log","cwl_lineup_change_log","cwl_monthly_summary_log","member_join_leave_log","role_change_log","name_change_log","town_hall_upgrade_log","war_preference_log","ranked_battle_league_change_log"]}}}}
```

## The ChannelStatus object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ChannelStatus":{"type":"string","enum":["ok","archived","locked","deleted","noAccess","unknown"]}}}}
```

## The GuildClanLogDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GuildClanLogDto":{"type":"object","properties":{"logType":{"allOf":[{"$ref":"#/components/schemas/ClanLogType"}]},"channelStatus":{"allOf":[{"$ref":"#/components/schemas/ChannelStatus"}]},"clanTag":{"type":"string"},"id":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":["string","null"]},"parentChannelName":{"type":["string","null"],"description":"The channel a thread is in; null for channels."},"missingPermissions":{"description":"Permissions `/debug` checks that ClashPerk lacks in the channel, e.g. `Send Messages`.","type":"array","items":{"type":"string"}},"lastPostedAt":{"format":"date-time","type":["string","null"],"description":"When the bot last posted this log. Null before its first post."},"isEnabled":{"type":"boolean"},"roleId":{"type":["string","null"]},"color":{"type":["number","null"]},"updatedAt":{"format":"date-time","type":"string"}},"required":["logType","channelStatus","clanTag","id","channelId","channelName","parentChannelName","missingPermissions","lastPostedAt","isEnabled","roleId","color","updatedAt"]},"ClanLogType":{"type":"string","enum":["clan_achievements_log","continuous_donation_log","daily_donation_log","weekly_donation_log","monthly_donation_log","clan_games_embed_log","last_seen_embed_log","legend_attacks_daily_summary_log","clan_capital_weekly_summary_log","clan_capital_contribution_log","clan_capital_raid_log","war_attack_log","cwl_attack_log","war_embed_log","war_missed_attacks_log","cwl_embed_log","cwl_missed_attacks_log","cwl_lineup_change_log","cwl_monthly_summary_log","member_join_leave_log","role_change_log","name_change_log","town_hall_upgrade_log","war_preference_log","ranked_battle_league_change_log"]},"ChannelStatus":{"type":"string","enum":["ok","archived","locked","deleted","noAccess","unknown"]}}}}
```

## The ClanLogLimitDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanLogLimitDto":{"type":"object","properties":{"limit":{"type":"number","description":"How many clans can have logs in this server."},"clanTags":{"description":"Clans that already have logs; adding logs to these never hits the limit.","type":"array","items":{"type":"string"}},"patron":{"type":"boolean"}},"required":["limit","clanTags","patron"]}}}}
```

## The ClanEmbedField object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanEmbedField":{"type":"string","enum":["clanLeader","requirements","trophiesRequired","location","warPerformance","warFrequency","clanWarLeague","clanCapitalLeague","townHalls"]}}}}
```

## The ClanEmbedDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanEmbedDto":{"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/ClanEmbedField"}},"channelId":{"type":"string"},"channelName":{"type":["string","null"]},"color":{"type":["number","null"]},"description":{"type":["string","null"],"description":"Null when it shows the in-game clan description."},"requirements":{"type":["string","null"],"description":"Null when it shows the in-game Town Hall requirement."},"bannerImage":{"type":["string","null"]},"messageId":{"type":["string","null"],"description":"The posted message, once the bot has sent it."},"updatedAt":{"format":"date-time","type":"string"}},"required":["fields","channelId","channelName","color","description","requirements","bannerImage","messageId","updatedAt"]},"ClanEmbedField":{"type":"string","enum":["clanLeader","requirements","trophiesRequired","location","warPerformance","warFrequency","clanWarLeague","clanCapitalLeague","townHalls"]}}}}
```

## The ClanEmbedStateDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanEmbedStateDto":{"type":"object","properties":{"embed":{"description":"Null when the clan has no embed.","anyOf":[{"$ref":"#/components/schemas/ClanEmbedDto"},{"type":"null"}]}},"required":["embed"]},"ClanEmbedDto":{"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/ClanEmbedField"}},"channelId":{"type":"string"},"channelName":{"type":["string","null"]},"color":{"type":["number","null"]},"description":{"type":["string","null"],"description":"Null when it shows the in-game clan description."},"requirements":{"type":["string","null"],"description":"Null when it shows the in-game Town Hall requirement."},"bannerImage":{"type":["string","null"]},"messageId":{"type":["string","null"],"description":"The posted message, once the bot has sent it."},"updatedAt":{"format":"date-time","type":"string"}},"required":["fields","channelId","channelName","color","description","requirements","bannerImage","messageId","updatedAt"]},"ClanEmbedField":{"type":"string","enum":["clanLeader","requirements","trophiesRequired","location","warPerformance","warFrequency","clanWarLeague","clanCapitalLeague","townHalls"]}}}}
```

## The ReminderWebhookInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ReminderWebhookInput":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{17,20}$"},"token":{"type":"string","minLength":1}},"required":["id","token"]}}}}
```

## The ClanEmbedInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanEmbedInput":{"type":"object","properties":{"fields":{"maxItems":9,"type":"array","items":{"$ref":"#/components/schemas/ClanEmbedField"}},"channelId":{"type":"string","pattern":"^\\d{17,20}$"},"webhook":{"description":"From Discord's `webhook.incoming` sign-in; without one, a known webhook in the channel is reused.","allOf":[{"$ref":"#/components/schemas/ReminderWebhookInput"}]},"color":{"type":["number","null"],"description":"Embed color as an RGB integer; null uses the server's default.","minimum":0,"maximum":16777215},"description":{"type":["string","null"],"description":"Null shows the in-game clan description.","minLength":1,"maxLength":1200},"requirements":{"type":["string","null"],"description":"Null shows the in-game Town Hall requirement.","minLength":1,"maxLength":600},"bannerImage":{"type":["string","null"],"maxLength":256,"format":"uri"}},"required":["fields","channelId"]},"ClanEmbedField":{"type":"string","enum":["clanLeader","requirements","trophiesRequired","location","warPerformance","warFrequency","clanWarLeague","clanCapitalLeague","townHalls"]},"ReminderWebhookInput":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{17,20}$"},"token":{"type":"string","minLength":1}},"required":["id","token"]}}}}
```

## The ClanLogDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanLogDto":{"type":"object","properties":{"logType":{"allOf":[{"$ref":"#/components/schemas/ClanLogType"}]},"channelStatus":{"allOf":[{"$ref":"#/components/schemas/ChannelStatus"}]},"id":{"type":"string"},"channelId":{"type":"string"},"channelName":{"type":["string","null"]},"parentChannelName":{"type":["string","null"],"description":"The channel a thread is in; null for channels."},"missingPermissions":{"description":"Permissions `/debug` checks that ClashPerk lacks in the channel, e.g. `Send Messages`.","type":"array","items":{"type":"string"}},"lastPostedAt":{"format":"date-time","type":["string","null"],"description":"When the bot last posted this log. Null before its first post."},"isEnabled":{"type":"boolean"},"roleId":{"type":["string","null"]},"color":{"type":["number","null"]},"updatedAt":{"format":"date-time","type":"string"}},"required":["logType","channelStatus","id","channelId","channelName","parentChannelName","missingPermissions","lastPostedAt","isEnabled","roleId","color","updatedAt"]},"ClanLogType":{"type":"string","enum":["clan_achievements_log","continuous_donation_log","daily_donation_log","weekly_donation_log","monthly_donation_log","clan_games_embed_log","last_seen_embed_log","legend_attacks_daily_summary_log","clan_capital_weekly_summary_log","clan_capital_contribution_log","clan_capital_raid_log","war_attack_log","cwl_attack_log","war_embed_log","war_missed_attacks_log","cwl_embed_log","cwl_missed_attacks_log","cwl_lineup_change_log","cwl_monthly_summary_log","member_join_leave_log","role_change_log","name_change_log","town_hall_upgrade_log","war_preference_log","ranked_battle_league_change_log"]},"ChannelStatus":{"type":"string","enum":["ok","archived","locked","deleted","noAccess","unknown"]}}}}
```

## The ClanLogInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanLogInput":{"type":"object","properties":{"channelId":{"type":"string","pattern":"^\\d{17,20}$"},"webhook":{"description":"From Discord's `webhook.incoming` sign-in; without one, a known webhook in the channel is reused.","allOf":[{"$ref":"#/components/schemas/ReminderWebhookInput"}]},"isEnabled":{"type":"boolean"},"roleId":{"type":["string","null"],"description":"Pinged with each post; null for none.","pattern":"^\\d{17,20}$"},"color":{"type":["number","null"],"description":"Embed color as an RGB integer; null uses the server's default.","minimum":0,"maximum":16777215}},"required":["channelId","isEnabled","roleId","color"]},"ReminderWebhookInput":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{17,20}$"},"token":{"type":"string","minLength":1}},"required":["id","token"]}}}}
```

## The DelayExclusion object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"DelayExclusion":{"type":"string","enum":["townHallRoles","builderHallRoles","leagueRoles","builderLeagueRoles","guestRole"]}}}}
```

## The NicknameAccount object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"NicknameAccount":{"type":"string","enum":["default-account","best-account","default-or-best-account"]}}}}
```

## The AutoRoleClanDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"AutoRoleClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"leader":{"type":["string","null"]},"coLeader":{"type":["string","null"]},"elder":{"type":["string","null"]},"member":{"type":["string","null"]},"everyone":{"type":["string","null"]},"warRole":{"type":["string","null"]}},"required":["tag","name","leader","coLeader","elder","member","everyone","warRole"]}}}}
```

## The NicknameRoleLabels object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"NicknameRoleLabels":{"type":"object","properties":{"leader":{"type":"string","maxLength":10},"coLeader":{"type":"string","maxLength":10},"elder":{"type":"string","maxLength":10},"member":{"type":"string","maxLength":10}},"required":["leader","coLeader","elder","member"]}}}}
```

## The AutoRolesDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"AutoRolesDto":{"type":"object","properties":{"townHall":{"type":"object","additionalProperties":{"type":"string"}},"builderHall":{"type":"object","additionalProperties":{"type":"string"}},"leagues":{"type":"object","additionalProperties":{"type":"string"}},"builderLeagues":{"type":"object","additionalProperties":{"type":"string"}},"trophies":{"type":"object","additionalProperties":{"type":"string"}},"delayExclusions":{"type":"array","items":{"$ref":"#/components/schemas/DelayExclusion"}},"nicknameAccount":{"allOf":[{"$ref":"#/components/schemas/NicknameAccount"}]},"familyRole":{"type":["string","null"]},"exclusiveFamilyRole":{"type":["string","null"]},"familyLeadersRoles":{"type":"array","items":{"type":"string"}},"guestRole":{"type":["string","null"]},"verifiedRole":{"type":["string","null"]},"linkedRole":{"type":["string","null"]},"eosPushRole":{"type":["string","null"]},"eosPushClans":{"type":"array","items":{"type":"string"}},"allowNonFamilyTownHall":{"type":"boolean","description":"Town Hall and Builder Hall roles also go to accounts outside the server's clans."},"allowNonFamilyLeagues":{"type":"boolean","description":"League and builder league roles also go to accounts outside the server's clans."},"verifiedOnlyClanRoles":{"type":"boolean"},"autoUpdate":{"type":"boolean"},"forceRefresh":{"type":"boolean"},"allowNotLinked":{"type":"boolean","description":"Members with no linked account still get roles like the guest role."},"removalDelay":{"type":"number","description":"Milliseconds; one of the bot's choices."},"additionDelay":{"type":"number"},"clans":{"type":"array","items":{"$ref":"#/components/schemas/AutoRoleClanDto"}},"familyNicknameFormat":{"type":"string","description":"Nickname format for members in your clans; \"\" means none."},"nonFamilyNicknameFormat":{"type":"string","description":"Nickname format for everyone else; \"\" means none."},"autoNickname":{"type":"boolean","description":"Nicknames change on the bot's checks, not only on a refresh."},"nicknameRoleLabels":{"$ref":"#/components/schemas/NicknameRoleLabels"}},"required":["townHall","builderHall","leagues","builderLeagues","trophies","delayExclusions","nicknameAccount","familyRole","exclusiveFamilyRole","familyLeadersRoles","guestRole","verifiedRole","linkedRole","eosPushRole","eosPushClans","allowNonFamilyTownHall","allowNonFamilyLeagues","verifiedOnlyClanRoles","autoUpdate","forceRefresh","allowNotLinked","removalDelay","additionDelay","clans","familyNicknameFormat","nonFamilyNicknameFormat","autoNickname","nicknameRoleLabels"]},"DelayExclusion":{"type":"string","enum":["townHallRoles","builderHallRoles","leagueRoles","builderLeagueRoles","guestRole"]},"NicknameAccount":{"type":"string","enum":["default-account","best-account","default-or-best-account"]},"AutoRoleClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"leader":{"type":["string","null"]},"coLeader":{"type":["string","null"]},"elder":{"type":["string","null"]},"member":{"type":["string","null"]},"everyone":{"type":["string","null"]},"warRole":{"type":["string","null"]}},"required":["tag","name","leader","coLeader","elder","member","everyone","warRole"]},"NicknameRoleLabels":{"type":"object","properties":{"leader":{"type":"string","maxLength":10},"coLeader":{"type":"string","maxLength":10},"elder":{"type":"string","maxLength":10},"member":{"type":"string","maxLength":10}},"required":["leader","coLeader","elder","member"]}}}}
```

## The AutoRolesInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"AutoRolesInput":{"type":"object","properties":{"townHall":{"type":"object","additionalProperties":{"type":"string"}},"builderHall":{"type":"object","additionalProperties":{"type":"string"}},"leagues":{"type":"object","additionalProperties":{"type":"string"}},"builderLeagues":{"type":"object","additionalProperties":{"type":"string"}},"trophies":{"type":"object","additionalProperties":{"type":"string"}},"delayExclusions":{"type":"array","items":{"$ref":"#/components/schemas/DelayExclusion"}},"nicknameAccount":{"allOf":[{"$ref":"#/components/schemas/NicknameAccount"}]},"familyRole":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"exclusiveFamilyRole":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"familyLeadersRoles":{"maxItems":25,"type":"array","items":{"type":"string","pattern":"^\\d{17,20}$"}},"guestRole":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"verifiedRole":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"linkedRole":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"eosPushRole":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"eosPushClans":{"type":"array","items":{"type":"string"}},"allowNonFamilyTownHall":{"type":"boolean"},"allowNonFamilyLeagues":{"type":"boolean"},"verifiedOnlyClanRoles":{"type":"boolean"},"autoUpdate":{"type":"boolean"},"forceRefresh":{"type":"boolean"},"allowNotLinked":{"type":"boolean"},"removalDelay":{"type":"number","enum":[0,3600000,7200000,14400000,21600000,28800000,43200000,64800000,86400000,129600000,172800000,259200000,604800000,1036800000]},"additionDelay":{"type":"number","enum":[0,3600000,7200000,14400000,21600000,28800000,43200000,64800000,86400000]},"familyNicknameFormat":{"type":"string","maxLength":100},"nonFamilyNicknameFormat":{"type":"string","maxLength":100},"autoNickname":{"type":"boolean"},"nicknameRoleLabels":{"$ref":"#/components/schemas/NicknameRoleLabels"}}},"DelayExclusion":{"type":"string","enum":["townHallRoles","builderHallRoles","leagueRoles","builderLeagueRoles","guestRole"]},"NicknameAccount":{"type":"string","enum":["default-account","best-account","default-or-best-account"]},"NicknameRoleLabels":{"type":"object","properties":{"leader":{"type":"string","maxLength":10},"coLeader":{"type":"string","maxLength":10},"elder":{"type":"string","maxLength":10},"member":{"type":"string","maxLength":10}},"required":["leader","coLeader","elder","member"]}}}}
```

## The AutoRoleClanInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"AutoRoleClanInput":{"type":"object","properties":{"leader":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"coLeader":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"elder":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"member":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"everyone":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"warRole":{"type":["string","null"],"pattern":"^\\d{17,20}$"}},"required":["leader","coLeader","elder","member","everyone","warRole"]}}}}
```

## The FlagType object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"FlagType":{"type":"string","enum":["ban","strike"]}}}}
```

## The FlagAuthorDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"FlagAuthorDto":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"}},"required":["id","username","displayName"]}}}}
```

## The FlagDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"FlagDto":{"type":"object","properties":{"flagType":{"allOf":[{"$ref":"#/components/schemas/FlagType"}]},"id":{"type":"string"},"refId":{"type":"string","description":"The short reference the bot shows, e.g. in `/flag delete`."},"tag":{"type":"string"},"name":{"type":"string"},"flagImpact":{"type":"number","description":"Strike points; 1 unless set."},"reason":{"type":"string"},"expiresAt":{"format":"date-time","type":["string","null"],"description":"Null when it never expires."},"createdAt":{"format":"date-time","type":"string"},"createdBy":{"$ref":"#/components/schemas/FlagAuthorDto"}},"required":["flagType","id","refId","tag","name","flagImpact","reason","expiresAt","createdAt","createdBy"]},"FlagType":{"type":"string","enum":["ban","strike"]},"FlagAuthorDto":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"}},"required":["id","username","displayName"]}}}}
```

## The FlagsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"FlagsDto":{"type":"object","properties":{"items":{"description":"Active flags, newest first.","type":"array","items":{"$ref":"#/components/schemas/FlagDto"}},"total":{"type":"number","description":"Active flags of both types, against the limit."},"limit":{"type":["number","null"],"description":"Null for supporter servers, which have no limit."}},"required":["items","total","limit"]},"FlagDto":{"type":"object","properties":{"flagType":{"allOf":[{"$ref":"#/components/schemas/FlagType"}]},"id":{"type":"string"},"refId":{"type":"string","description":"The short reference the bot shows, e.g. in `/flag delete`."},"tag":{"type":"string"},"name":{"type":"string"},"flagImpact":{"type":"number","description":"Strike points; 1 unless set."},"reason":{"type":"string"},"expiresAt":{"format":"date-time","type":["string","null"],"description":"Null when it never expires."},"createdAt":{"format":"date-time","type":"string"},"createdBy":{"$ref":"#/components/schemas/FlagAuthorDto"}},"required":["flagType","id","refId","tag","name","flagImpact","reason","expiresAt","createdAt","createdBy"]},"FlagType":{"type":"string","enum":["ban","strike"]},"FlagAuthorDto":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"}},"required":["id","username","displayName"]}}}}
```

## The FlagInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"FlagInput":{"type":"object","properties":{"flagType":{"allOf":[{"$ref":"#/components/schemas/FlagType"}]},"playerTags":{"description":"One or more player tags; the bot's option fits about 25.","minItems":1,"maxItems":25,"type":"array","items":{"type":"string"}},"reason":{"type":"string","minLength":1,"maxLength":256},"expiresInDays":{"type":["number","null"],"description":"Leave out for a flag that never expires.","minimum":1,"maximum":36500},"flagImpact":{"type":"number","description":"Strike points, 1 to 100; defaults to 1. The bot stores it for bans too.","minimum":1,"maximum":100}},"required":["flagType","playerTags","reason"]},"FlagType":{"type":"string","enum":["ban","strike"]}}}}
```

## The ListMemberDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ListMemberDto":{"type":"object","properties":{"id":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":"string"}},"required":["id","username","displayName","avatarUrl"]}}}}
```

## The FlagAlertLogDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"FlagAlertLogDto":{"type":"object","properties":{"roleId":{"type":["string","null"]},"useAutoRole":{"type":"boolean"},"channelId":{"type":"string"},"channelName":{"type":["string","null"],"description":"Null when the bot can't see the channel any more."},"missingPermissions":{"description":"Permissions `/debug` checks that ClashPerk lacks in the channel, e.g. `Send Messages`.","type":"array","items":{"type":"string"}}},"required":["roleId","useAutoRole","channelId","channelName","missingPermissions"]}}}}
```

## The ServerLogChannelDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ServerLogChannelDto":{"type":"object","properties":{"channelId":{"type":"string"},"channelName":{"type":["string","null"],"description":"Null when the bot can't see the channel any more."},"missingPermissions":{"description":"Permissions `/debug` checks that ClashPerk lacks in the channel, e.g. `Send Messages`.","type":"array","items":{"type":"string"}}},"required":["channelId","channelName","missingPermissions"]}}}}
```

## The WelcomeLogDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"WelcomeLogDto":{"type":"object","properties":{"channelId":{"type":"string"},"channelName":{"type":["string","null"],"description":"Null when the bot can't see the channel any more."},"missingPermissions":{"description":"Permissions `/debug` checks that ClashPerk lacks in the channel, e.g. `Send Messages`.","type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"welcomeText":{"type":"string"},"description":{"type":"string"},"bannerImage":{"type":["string","null"]},"embedColor":{"type":["number","null"]}},"required":["channelId","channelName","missingPermissions","enabled","welcomeText","description","bannerImage","embedColor"]}}}}
```

## The ServerLogsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ServerLogsDto":{"type":"object","properties":{"flagAlert":{"anyOf":[{"$ref":"#/components/schemas/FlagAlertLogDto"},{"type":"null"}]},"rosterChangelog":{"anyOf":[{"$ref":"#/components/schemas/ServerLogChannelDto"},{"type":"null"}]},"maintenance":{"anyOf":[{"$ref":"#/components/schemas/ServerLogChannelDto"},{"type":"null"}]},"welcome":{"anyOf":[{"$ref":"#/components/schemas/WelcomeLogDto"},{"type":"null"}]}},"required":["flagAlert","rosterChangelog","maintenance","welcome"]},"FlagAlertLogDto":{"type":"object","properties":{"roleId":{"type":["string","null"]},"useAutoRole":{"type":"boolean"},"channelId":{"type":"string"},"channelName":{"type":["string","null"],"description":"Null when the bot can't see the channel any more."},"missingPermissions":{"description":"Permissions `/debug` checks that ClashPerk lacks in the channel, e.g. `Send Messages`.","type":"array","items":{"type":"string"}}},"required":["roleId","useAutoRole","channelId","channelName","missingPermissions"]},"ServerLogChannelDto":{"type":"object","properties":{"channelId":{"type":"string"},"channelName":{"type":["string","null"],"description":"Null when the bot can't see the channel any more."},"missingPermissions":{"description":"Permissions `/debug` checks that ClashPerk lacks in the channel, e.g. `Send Messages`.","type":"array","items":{"type":"string"}}},"required":["channelId","channelName","missingPermissions"]},"WelcomeLogDto":{"type":"object","properties":{"channelId":{"type":"string"},"channelName":{"type":["string","null"],"description":"Null when the bot can't see the channel any more."},"missingPermissions":{"description":"Permissions `/debug` checks that ClashPerk lacks in the channel, e.g. `Send Messages`.","type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"welcomeText":{"type":"string"},"description":{"type":"string"},"bannerImage":{"type":["string","null"]},"embedColor":{"type":["number","null"]}},"required":["channelId","channelName","missingPermissions","enabled","welcomeText","description","bannerImage","embedColor"]}}}}
```

## The FlagAlertLogInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"FlagAlertLogInput":{"type":"object","properties":{"roleId":{"type":["string","null"],"description":"Pinged when a flagged player joins a clan; null for none.","pattern":"^\\d{17,20}$"},"useAutoRole":{"type":"boolean","description":"Ping each clan's leader and co-leader roles from auto-roles instead of `roleId`."},"channelId":{"type":"string","pattern":"^\\d{17,20}$"},"webhook":{"description":"From Discord's `webhook.incoming` sign-in; without one, a known webhook in the channel is reused.","allOf":[{"$ref":"#/components/schemas/ReminderWebhookInput"}]}},"required":["channelId"]},"ReminderWebhookInput":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{17,20}$"},"token":{"type":"string","minLength":1}},"required":["id","token"]}}}}
```

## The ServerLogChannelInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ServerLogChannelInput":{"type":"object","properties":{"channelId":{"type":"string","pattern":"^\\d{17,20}$"},"webhook":{"description":"From Discord's `webhook.incoming` sign-in; without one, a known webhook in the channel is reused.","allOf":[{"$ref":"#/components/schemas/ReminderWebhookInput"}]}},"required":["channelId"]},"ReminderWebhookInput":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{17,20}$"},"token":{"type":"string","minLength":1}},"required":["id","token"]}}}}
```

## The MaintenanceLogInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"MaintenanceLogInput":{"type":"object","properties":{"channelId":{"type":"string","pattern":"^\\d{17,20}$"}},"required":["channelId"]}}}}
```

## The WelcomeLogInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"WelcomeLogInput":{"type":"object","properties":{"channelId":{"type":"string","pattern":"^\\d{17,20}$"},"webhook":{"description":"From Discord's `webhook.incoming` sign-in; without one, a known webhook in the channel is reused.","allOf":[{"$ref":"#/components/schemas/ReminderWebhookInput"}]},"welcomeText":{"type":"string","minLength":1,"maxLength":500,"pattern":"\\{\\{user\\}\\}"},"description":{"type":"string","maxLength":2000},"bannerImage":{"type":["string","null"],"maxLength":256,"format":"uri"},"embedColor":{"type":["number","null"],"description":"RGB integer; null uses the bot's default.","minimum":0,"maximum":16777215}},"required":["channelId","welcomeText","description"]},"ReminderWebhookInput":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{17,20}$"},"token":{"type":"string","minLength":1}},"required":["id","token"]}}}}
```

## The ButtonTokenField object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ButtonTokenField":{"type":"string","enum":["required","optional","hidden"],"description":"Set for the link button only."}}}}
```

## The ButtonMessageDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ButtonMessageDto":{"type":"object","properties":{"tokenField":{"description":"Set for the link button only.","allOf":[{"$ref":"#/components/schemas/ButtonTokenField"}]},"title":{"type":"string"},"description":{"type":"string"},"imageUrl":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"color":{"type":["number","null"]},"buttonStyle":{"type":"number"}},"required":["title","description","imageUrl","thumbnailUrl","color","buttonStyle"]},"ButtonTokenField":{"type":"string","enum":["required","optional","hidden"],"description":"Set for the link button only."}}}}
```

## The ButtonsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ButtonsDto":{"type":"object","properties":{"link":{"anyOf":[{"$ref":"#/components/schemas/ButtonMessageDto"},{"type":"null"}]},"refresh":{"anyOf":[{"$ref":"#/components/schemas/ButtonMessageDto"},{"type":"null"}]},"myRosters":{"anyOf":[{"$ref":"#/components/schemas/ButtonMessageDto"},{"type":"null"}]}},"required":["link","refresh","myRosters"]},"ButtonMessageDto":{"type":"object","properties":{"tokenField":{"description":"Set for the link button only.","allOf":[{"$ref":"#/components/schemas/ButtonTokenField"}]},"title":{"type":"string"},"description":{"type":"string"},"imageUrl":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"color":{"type":["number","null"]},"buttonStyle":{"type":"number"}},"required":["title","description","imageUrl","thumbnailUrl","color","buttonStyle"]},"ButtonTokenField":{"type":"string","enum":["required","optional","hidden"],"description":"Set for the link button only."}}}}
```

## The ButtonType object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ButtonType":{"type":"string","enum":["link","refresh","myRosters"]}}}}
```

## The ButtonMessageInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ButtonMessageInput":{"type":"object","properties":{"tokenField":{"description":"Link button only: whether members enter their player token.","allOf":[{"$ref":"#/components/schemas/ButtonTokenField"}]},"title":{"type":"string","minLength":1,"maxLength":256},"description":{"type":"string","minLength":1,"maxLength":2000},"imageUrl":{"type":["string","null"],"maxLength":256},"thumbnailUrl":{"type":["string","null"],"maxLength":256},"color":{"type":["number","null"],"description":"RGB integer; null for none.","minimum":0,"maximum":16777215},"buttonStyle":{"type":"number","description":"1 blurple, 2 grey, 3 green, 4 red.","enum":[1,2,3,4]}},"required":["title","description","buttonStyle"]},"ButtonTokenField":{"type":"string","enum":["required","optional","hidden"],"description":"Set for the link button only."}}}}
```

## The GuildEventType object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GuildEventType":{"type":"string","enum":["clan_games_start","clan_games_end","cwl_start","cwl_signup_end","cwl_end","season_end","raid_week_start","raid_week_end"]}}}}
```

## The GuildEventCategoryDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GuildEventCategoryDto":{"type":"object","properties":{"imageUrl":{"type":["string","null"]},"location":{"type":["string","null"]}},"required":["imageUrl","location"]}}}}
```

## The GuildEventsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GuildEventsDto":{"type":"object","properties":{"allowedEvents":{"type":"array","items":{"$ref":"#/components/schemas/GuildEventType"}},"fullDurationEvents":{"type":"array","items":{"$ref":"#/components/schemas/GuildEventType"}},"enabled":{"type":"boolean"},"clanGames":{"$ref":"#/components/schemas/GuildEventCategoryDto"},"raidWeekend":{"$ref":"#/components/schemas/GuildEventCategoryDto"},"cwl":{"$ref":"#/components/schemas/GuildEventCategoryDto"},"seasonReset":{"$ref":"#/components/schemas/GuildEventCategoryDto"}},"required":["allowedEvents","fullDurationEvents","enabled","clanGames","raidWeekend","cwl","seasonReset"]},"GuildEventType":{"type":"string","enum":["clan_games_start","clan_games_end","cwl_start","cwl_signup_end","cwl_end","season_end","raid_week_start","raid_week_end"]},"GuildEventCategoryDto":{"type":"object","properties":{"imageUrl":{"type":["string","null"]},"location":{"type":["string","null"]}},"required":["imageUrl","location"]}}}}
```

## The GuildEventCategoryInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GuildEventCategoryInput":{"type":"object","properties":{"imageUrl":{"type":["string","null"],"maxLength":256,"format":"uri"},"location":{"type":["string","null"],"description":"Shown as the event's location. Defaults to \"in game\".","minLength":1,"maxLength":100}}}}}}
```

## The GuildEventsInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GuildEventsInput":{"type":"object","properties":{"allowedEvents":{"uniqueItems":true,"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/GuildEventType"}},"fullDurationEvents":{"description":"Start events that stay until the game event ends, instead of 30 minutes.","uniqueItems":true,"type":"array","items":{"$ref":"#/components/schemas/GuildEventType"}},"enabled":{"type":"boolean"},"clanGames":{"$ref":"#/components/schemas/GuildEventCategoryInput"},"raidWeekend":{"$ref":"#/components/schemas/GuildEventCategoryInput"},"cwl":{"$ref":"#/components/schemas/GuildEventCategoryInput"},"seasonReset":{"$ref":"#/components/schemas/GuildEventCategoryInput"}},"required":["allowedEvents","fullDurationEvents","enabled","clanGames","raidWeekend","cwl","seasonReset"]},"GuildEventType":{"type":"string","enum":["clan_games_start","clan_games_end","cwl_start","cwl_signup_end","cwl_end","season_end","raid_week_start","raid_week_end"]},"GuildEventCategoryInput":{"type":"object","properties":{"imageUrl":{"type":["string","null"],"maxLength":256,"format":"uri"},"location":{"type":["string","null"],"description":"Shown as the event's location. Defaults to \"in game\".","minLength":1,"maxLength":100}}}}}}
```

## The GuildEventImageDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GuildEventImageDto":{"type":"object","properties":{"url":{"type":"string","description":"The uploaded image's public link, to send as a category's `imageUrl`."}},"required":["url"]}}}}
```

## The ManagerRolesDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ManagerRolesDto":{"type":"object","properties":{"managerRoles":{"type":"array","items":{"type":"string"}},"rosterManagerRoles":{"type":"array","items":{"type":"string"}},"flagsManagerRoles":{"type":"array","items":{"type":"string"}},"linksManagerRoles":{"type":"array","items":{"type":"string"}}},"required":["managerRoles","rosterManagerRoles","flagsManagerRoles","linksManagerRoles"]}}}}
```

## The ManagerRolesInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ManagerRolesInput":{"type":"object","properties":{"managerRoles":{"description":"Can use every command and this dashboard, like Manage Server.","maxItems":25,"type":"array","items":{"type":"string","pattern":"^\\d{17,20}$"}},"rosterManagerRoles":{"maxItems":25,"type":"array","items":{"type":"string","pattern":"^\\d{17,20}$"}},"flagsManagerRoles":{"maxItems":25,"type":"array","items":{"type":"string","pattern":"^\\d{17,20}$"}},"linksManagerRoles":{"maxItems":25,"type":"array","items":{"type":"string","pattern":"^\\d{17,20}$"}}}}}}}
```

## The LinkParsingChannelDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LinkParsingChannelDto":{"type":"object","properties":{"status":{"enum":["ok","archived","locked","deleted","noAccess","unknown"],"type":"string"},"id":{"type":"string"},"name":{"type":["string","null"],"description":"Null when the channel was deleted or ClashPerk can't see it."},"missingPermissions":{"description":"Permissions ClashPerk lacks here, e.g. `Send Messages`.","type":"array","items":{"type":"string"}}},"required":["status","id","name","missingPermissions"]}}}}
```

## The LinkParsingRuleDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LinkParsingRuleDto":{"type":"object","properties":{"mode":{"enum":["reply","message","replace"],"type":"string"},"enabled":{"type":"boolean"},"channels":{"type":"array","items":{"$ref":"#/components/schemas/LinkParsingChannelDto"}},"categories":{"type":"array","items":{"$ref":"#/components/schemas/LinkParsingChannelDto"}}},"required":["mode","enabled","channels","categories"]},"LinkParsingChannelDto":{"type":"object","properties":{"status":{"enum":["ok","archived","locked","deleted","noAccess","unknown"],"type":"string"},"id":{"type":"string"},"name":{"type":["string","null"],"description":"Null when the channel was deleted or ClashPerk can't see it."},"missingPermissions":{"description":"Permissions ClashPerk lacks here, e.g. `Send Messages`.","type":"array","items":{"type":"string"}}},"required":["status","id","name","missingPermissions"]}}}}
```

## The LinkParsingDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LinkParsingDto":{"type":"object","properties":{"player":{"$ref":"#/components/schemas/LinkParsingRuleDto"},"clan":{"$ref":"#/components/schemas/LinkParsingRuleDto"},"army":{"$ref":"#/components/schemas/LinkParsingRuleDto"},"base":{"$ref":"#/components/schemas/LinkParsingRuleDto"}},"required":["player","clan","army","base"]},"LinkParsingRuleDto":{"type":"object","properties":{"mode":{"enum":["reply","message","replace"],"type":"string"},"enabled":{"type":"boolean"},"channels":{"type":"array","items":{"$ref":"#/components/schemas/LinkParsingChannelDto"}},"categories":{"type":"array","items":{"$ref":"#/components/schemas/LinkParsingChannelDto"}}},"required":["mode","enabled","channels","categories"]},"LinkParsingChannelDto":{"type":"object","properties":{"status":{"enum":["ok","archived","locked","deleted","noAccess","unknown"],"type":"string"},"id":{"type":"string"},"name":{"type":["string","null"],"description":"Null when the channel was deleted or ClashPerk can't see it."},"missingPermissions":{"description":"Permissions ClashPerk lacks here, e.g. `Send Messages`.","type":"array","items":{"type":"string"}}},"required":["status","id","name","missingPermissions"]}}}}
```

## The LinkParsingRuleInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LinkParsingRuleInput":{"type":"object","properties":{"mode":{"enum":["reply","message","replace"],"type":"string"},"enabled":{"type":"boolean","description":"Needs at least one channel or category when on."},"channelIds":{"description":"Text, announcement, forum or media channels. Threads and forum posts follow their channel.","uniqueItems":true,"maxItems":100,"type":"array","items":{"type":"string","pattern":"^\\d{17,20}$"}},"categoryIds":{"description":"Every channel in these categories, including ones added later.","uniqueItems":true,"maxItems":25,"type":"array","items":{"type":"string","pattern":"^\\d{17,20}$"}}},"required":["mode","enabled","channelIds","categoryIds"]}}}}
```

## The LinkParsingInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LinkParsingInput":{"type":"object","properties":{"player":{"description":"`action=OpenPlayerProfile`","allOf":[{"$ref":"#/components/schemas/LinkParsingRuleInput"}]},"clan":{"description":"`action=OpenClanProfile`","allOf":[{"$ref":"#/components/schemas/LinkParsingRuleInput"}]},"army":{"description":"`action=CopyArmy`","allOf":[{"$ref":"#/components/schemas/LinkParsingRuleInput"}]},"base":{"description":"`action=OpenLayout`","allOf":[{"$ref":"#/components/schemas/LinkParsingRuleInput"}]}},"required":["player","clan","army","base"]},"LinkParsingRuleInput":{"type":"object","properties":{"mode":{"enum":["reply","message","replace"],"type":"string"},"enabled":{"type":"boolean","description":"Needs at least one channel or category when on."},"channelIds":{"description":"Text, announcement, forum or media channels. Threads and forum posts follow their channel.","uniqueItems":true,"maxItems":100,"type":"array","items":{"type":"string","pattern":"^\\d{17,20}$"}},"categoryIds":{"description":"Every channel in these categories, including ones added later.","uniqueItems":true,"maxItems":25,"type":"array","items":{"type":"string","pattern":"^\\d{17,20}$"}}},"required":["mode","enabled","channelIds","categoryIds"]}}}}
```

## The SubscriptionDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"SubscriptionDto":{"type":"object","properties":{"active":{"type":"boolean"},"tier":{"type":["string","null"],"description":"A special tier such as `lifetime` or `gifted`; null for a regular plan."}},"required":["active","tier"]}}}}
```

## The ServerConfigDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ServerConfigDto":{"type":"object","properties":{"color":{"type":["number","null"]},"webhookLimit":{"type":"number"},"subscription":{"$ref":"#/components/schemas/SubscriptionDto"}},"required":["color","webhookLimit","subscription"]},"SubscriptionDto":{"type":"object","properties":{"active":{"type":"boolean"},"tier":{"type":["string","null"],"description":"A special tier such as `lifetime` or `gifted`; null for a regular plan."}},"required":["active","tier"]}}}}
```

## The ServerConfigInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ServerConfigInput":{"type":"object","properties":{"color":{"type":["number","null"],"description":"RGB integer for the bot's embeds; null goes back to the default.","minimum":0,"maximum":16777215},"webhookLimit":{"type":"number","description":"Most webhooks the bot creates in one channel before it shares them between logs.","minimum":3,"maximum":8}}}}}}
```

## The GuildBetaDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GuildBetaDto":{"type":"object","properties":{"beta":{"type":"boolean"}},"required":["beta"]}}}}
```

## The TicketDisplayMode object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketDisplayMode":{"type":"string","enum":["menu","buttons"]}}}}
```

## The TicketEmbedDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketEmbedDto":{"type":"object","properties":{"title":{"type":["string","null"]},"description":{"type":["string","null"]},"color":{"type":["number","null"]},"imageUrl":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"footerText":{"type":["string","null"]}},"required":["title","description","color","imageUrl","thumbnailUrl","footerText"]}}}}
```

## The TicketButtonDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketButtonDto":{"type":"object","properties":{"label":{"type":"string"},"emoji":{"type":["string","null"]},"style":{"type":"number"}},"required":["label","emoji","style"]}}}}
```

## The TicketQuestionDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketQuestionDto":{"type":"object","properties":{"label":{"type":"string"},"required":{"type":"boolean"}},"required":["label","required"]}}}}
```

## The TicketTypeDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketTypeDto":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"emoji":{"type":["string","null"]},"buttonStyle":{"type":"number"},"requireLinkedAccount":{"type":"boolean"},"thMin":{"type":["number","null"]},"minTrophies":{"type":["number","null"]},"minLeagueTier":{"type":["string","null"]},"questions":{"type":"array","items":{"$ref":"#/components/schemas/TicketQuestionDto"}},"pingRoleIds":{"type":"array","items":{"type":"string"}},"viewOnlyRoleIds":{"type":"array","items":{"type":"string"}},"addRoleIds":{"type":"array","items":{"type":"string"}},"removeRoleIds":{"type":"array","items":{"type":"string"}},"openCategoryId":{"type":["string","null"]},"sleepCategoryId":{"type":["string","null"]},"namingConvention":{"type":"string"},"createStaffThread":{"type":"boolean"},"autoSleepHours":{"type":["number","null"]},"allowClaim":{"type":"boolean"}},"required":["id","label","emoji","buttonStyle","requireLinkedAccount","thMin","minTrophies","minLeagueTier","questions","pingRoleIds","viewOnlyRoleIds","addRoleIds","removeRoleIds","openCategoryId","sleepCategoryId","namingConvention","createStaffThread","autoSleepHours","allowClaim"]},"TicketQuestionDto":{"type":"object","properties":{"label":{"type":"string"},"required":{"type":"boolean"}},"required":["label","required"]}}}}
```

## The TicketLogChannelsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketLogChannelsDto":{"type":"object","properties":{"buttonClick":{"type":["string","null"]},"statusChange":{"type":["string","null"]},"ticketClose":{"type":["string","null"]}},"required":["buttonClick","statusChange","ticketClose"]}}}}
```

## The TicketExtraButtonKind object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketExtraButtonKind":{"type":"string","enum":["link-account","url"]}}}}
```

## The TicketExtraButtonDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketExtraButtonDto":{"type":"object","properties":{"kind":{"allOf":[{"$ref":"#/components/schemas/TicketExtraButtonKind"}]},"id":{"type":"string"},"label":{"type":"string"},"emoji":{"type":["string","null"]},"style":{"type":"number"},"url":{"type":["string","null"]}},"required":["kind","id","label","emoji","style","url"]},"TicketExtraButtonKind":{"type":"string","enum":["link-account","url"]}}}}
```

## The TicketPanelDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketPanelDto":{"type":"object","properties":{"displayMode":{"allOf":[{"$ref":"#/components/schemas/TicketDisplayMode"}]},"id":{"type":"string"},"name":{"type":"string"},"embed":{"$ref":"#/components/schemas/TicketEmbedDto"},"button":{"$ref":"#/components/schemas/TicketButtonDto"},"ticketTypes":{"type":"array","items":{"$ref":"#/components/schemas/TicketTypeDto"}},"logChannels":{"$ref":"#/components/schemas/TicketLogChannelsDto"},"extraButtons":{"type":"array","items":{"$ref":"#/components/schemas/TicketExtraButtonDto"}},"extraButtonsPlacement":{"type":"string"},"saveTranscripts":{"type":"boolean"},"ticketCount":{"type":"number"},"openTicketCount":{"type":"number"},"updatedAt":{"format":"date-time","type":"string"}},"required":["displayMode","id","name","embed","button","ticketTypes","logChannels","extraButtons","extraButtonsPlacement","saveTranscripts","ticketCount","openTicketCount","updatedAt"]},"TicketDisplayMode":{"type":"string","enum":["menu","buttons"]},"TicketEmbedDto":{"type":"object","properties":{"title":{"type":["string","null"]},"description":{"type":["string","null"]},"color":{"type":["number","null"]},"imageUrl":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"footerText":{"type":["string","null"]}},"required":["title","description","color","imageUrl","thumbnailUrl","footerText"]},"TicketButtonDto":{"type":"object","properties":{"label":{"type":"string"},"emoji":{"type":["string","null"]},"style":{"type":"number"}},"required":["label","emoji","style"]},"TicketTypeDto":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"emoji":{"type":["string","null"]},"buttonStyle":{"type":"number"},"requireLinkedAccount":{"type":"boolean"},"thMin":{"type":["number","null"]},"minTrophies":{"type":["number","null"]},"minLeagueTier":{"type":["string","null"]},"questions":{"type":"array","items":{"$ref":"#/components/schemas/TicketQuestionDto"}},"pingRoleIds":{"type":"array","items":{"type":"string"}},"viewOnlyRoleIds":{"type":"array","items":{"type":"string"}},"addRoleIds":{"type":"array","items":{"type":"string"}},"removeRoleIds":{"type":"array","items":{"type":"string"}},"openCategoryId":{"type":["string","null"]},"sleepCategoryId":{"type":["string","null"]},"namingConvention":{"type":"string"},"createStaffThread":{"type":"boolean"},"autoSleepHours":{"type":["number","null"]},"allowClaim":{"type":"boolean"}},"required":["id","label","emoji","buttonStyle","requireLinkedAccount","thMin","minTrophies","minLeagueTier","questions","pingRoleIds","viewOnlyRoleIds","addRoleIds","removeRoleIds","openCategoryId","sleepCategoryId","namingConvention","createStaffThread","autoSleepHours","allowClaim"]},"TicketQuestionDto":{"type":"object","properties":{"label":{"type":"string"},"required":{"type":"boolean"}},"required":["label","required"]},"TicketLogChannelsDto":{"type":"object","properties":{"buttonClick":{"type":["string","null"]},"statusChange":{"type":["string","null"]},"ticketClose":{"type":["string","null"]}},"required":["buttonClick","statusChange","ticketClose"]},"TicketExtraButtonDto":{"type":"object","properties":{"kind":{"allOf":[{"$ref":"#/components/schemas/TicketExtraButtonKind"}]},"id":{"type":"string"},"label":{"type":"string"},"emoji":{"type":["string","null"]},"style":{"type":"number"},"url":{"type":["string","null"]}},"required":["kind","id","label","emoji","style","url"]},"TicketExtraButtonKind":{"type":"string","enum":["link-account","url"]}}}}
```

## The TicketSavedReplyDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketSavedReplyDto":{"type":"object","properties":{"name":{"type":"string"},"content":{"type":"string"}},"required":["name","content"]}}}}
```

## The TicketsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketsDto":{"type":"object","properties":{"panels":{"type":"array","items":{"$ref":"#/components/schemas/TicketPanelDto"}},"savedReplies":{"type":"array","items":{"$ref":"#/components/schemas/TicketSavedReplyDto"}}},"required":["panels","savedReplies"]},"TicketPanelDto":{"type":"object","properties":{"displayMode":{"allOf":[{"$ref":"#/components/schemas/TicketDisplayMode"}]},"id":{"type":"string"},"name":{"type":"string"},"embed":{"$ref":"#/components/schemas/TicketEmbedDto"},"button":{"$ref":"#/components/schemas/TicketButtonDto"},"ticketTypes":{"type":"array","items":{"$ref":"#/components/schemas/TicketTypeDto"}},"logChannels":{"$ref":"#/components/schemas/TicketLogChannelsDto"},"extraButtons":{"type":"array","items":{"$ref":"#/components/schemas/TicketExtraButtonDto"}},"extraButtonsPlacement":{"type":"string"},"saveTranscripts":{"type":"boolean"},"ticketCount":{"type":"number"},"openTicketCount":{"type":"number"},"updatedAt":{"format":"date-time","type":"string"}},"required":["displayMode","id","name","embed","button","ticketTypes","logChannels","extraButtons","extraButtonsPlacement","saveTranscripts","ticketCount","openTicketCount","updatedAt"]},"TicketDisplayMode":{"type":"string","enum":["menu","buttons"]},"TicketEmbedDto":{"type":"object","properties":{"title":{"type":["string","null"]},"description":{"type":["string","null"]},"color":{"type":["number","null"]},"imageUrl":{"type":["string","null"]},"thumbnailUrl":{"type":["string","null"]},"footerText":{"type":["string","null"]}},"required":["title","description","color","imageUrl","thumbnailUrl","footerText"]},"TicketButtonDto":{"type":"object","properties":{"label":{"type":"string"},"emoji":{"type":["string","null"]},"style":{"type":"number"}},"required":["label","emoji","style"]},"TicketTypeDto":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"emoji":{"type":["string","null"]},"buttonStyle":{"type":"number"},"requireLinkedAccount":{"type":"boolean"},"thMin":{"type":["number","null"]},"minTrophies":{"type":["number","null"]},"minLeagueTier":{"type":["string","null"]},"questions":{"type":"array","items":{"$ref":"#/components/schemas/TicketQuestionDto"}},"pingRoleIds":{"type":"array","items":{"type":"string"}},"viewOnlyRoleIds":{"type":"array","items":{"type":"string"}},"addRoleIds":{"type":"array","items":{"type":"string"}},"removeRoleIds":{"type":"array","items":{"type":"string"}},"openCategoryId":{"type":["string","null"]},"sleepCategoryId":{"type":["string","null"]},"namingConvention":{"type":"string"},"createStaffThread":{"type":"boolean"},"autoSleepHours":{"type":["number","null"]},"allowClaim":{"type":"boolean"}},"required":["id","label","emoji","buttonStyle","requireLinkedAccount","thMin","minTrophies","minLeagueTier","questions","pingRoleIds","viewOnlyRoleIds","addRoleIds","removeRoleIds","openCategoryId","sleepCategoryId","namingConvention","createStaffThread","autoSleepHours","allowClaim"]},"TicketQuestionDto":{"type":"object","properties":{"label":{"type":"string"},"required":{"type":"boolean"}},"required":["label","required"]},"TicketLogChannelsDto":{"type":"object","properties":{"buttonClick":{"type":["string","null"]},"statusChange":{"type":["string","null"]},"ticketClose":{"type":["string","null"]}},"required":["buttonClick","statusChange","ticketClose"]},"TicketExtraButtonDto":{"type":"object","properties":{"kind":{"allOf":[{"$ref":"#/components/schemas/TicketExtraButtonKind"}]},"id":{"type":"string"},"label":{"type":"string"},"emoji":{"type":["string","null"]},"style":{"type":"number"},"url":{"type":["string","null"]}},"required":["kind","id","label","emoji","style","url"]},"TicketExtraButtonKind":{"type":"string","enum":["link-account","url"]},"TicketSavedReplyDto":{"type":"object","properties":{"name":{"type":"string"},"content":{"type":"string"}},"required":["name","content"]}}}}
```

## The TicketStatus object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketStatus":{"type":"string","enum":["open","sleep","closed"]}}}}
```

## The TicketMemberDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketMemberDto":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":["string","null"],"description":"From Discord, or the name the bot last saw for someone who left. Null when neither is known."},"avatarUrl":{"type":["string","null"],"description":"Null when they aren't in the server."}},"required":["id","displayName","avatarUrl"]}}}}
```

## The TicketDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketDto":{"type":"object","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/TicketStatus"}]},"channelStatus":{"allOf":[{"$ref":"#/components/schemas/ChannelStatus"}]},"id":{"type":"string"},"number":{"type":"number","description":"The ticket's number in the server."},"panelId":{"type":"string"},"panelName":{"type":["string","null"],"description":"Null when the panel was deleted."},"typeId":{"type":"string"},"typeLabel":{"type":["string","null"],"description":"Null when the type was deleted."},"typeEmoji":{"type":["string","null"]},"openedBy":{"$ref":"#/components/schemas/TicketMemberDto"},"claimedBy":{"anyOf":[{"$ref":"#/components/schemas/TicketMemberDto"},{"type":"null"}]},"closedBy":{"anyOf":[{"$ref":"#/components/schemas/TicketMemberDto"},{"type":"null"}]},"accountTag":{"type":["string","null"],"description":"The linked game account the member picked, if the type asked for one."},"accountName":{"type":["string","null"]},"channelId":{"type":"string"},"channelName":{"type":["string","null"],"description":"Null once the channel is deleted, which closing does."},"staffThreadId":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"closedAt":{"format":"date-time","type":["string","null"]}},"required":["status","channelStatus","id","number","panelId","panelName","typeId","typeLabel","typeEmoji","openedBy","claimedBy","closedBy","accountTag","accountName","channelId","channelName","staffThreadId","createdAt","closedAt"]},"TicketStatus":{"type":"string","enum":["open","sleep","closed"]},"ChannelStatus":{"type":"string","enum":["ok","archived","locked","deleted","noAccess","unknown"]},"TicketMemberDto":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":["string","null"],"description":"From Discord, or the name the bot last saw for someone who left. Null when neither is known."},"avatarUrl":{"type":["string","null"],"description":"Null when they aren't in the server."}},"required":["id","displayName","avatarUrl"]}}}}
```

## The TicketCountsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketCountsDto":{"type":"object","properties":{"open":{"type":"number"},"sleep":{"type":"number"},"closed":{"type":"number"}},"required":["open","sleep","closed"]}}}}
```

## The TicketListDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketListDto":{"type":"object","properties":{"tickets":{"type":"array","items":{"$ref":"#/components/schemas/TicketDto"}},"counts":{"$ref":"#/components/schemas/TicketCountsDto"},"total":{"type":"number","description":"Tickets matching the status filter, across every page."},"nextCursor":{"type":["string","null"],"description":"Pass as `before` for the next 25. Null on the last page."}},"required":["tickets","counts","total","nextCursor"]},"TicketDto":{"type":"object","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/TicketStatus"}]},"channelStatus":{"allOf":[{"$ref":"#/components/schemas/ChannelStatus"}]},"id":{"type":"string"},"number":{"type":"number","description":"The ticket's number in the server."},"panelId":{"type":"string"},"panelName":{"type":["string","null"],"description":"Null when the panel was deleted."},"typeId":{"type":"string"},"typeLabel":{"type":["string","null"],"description":"Null when the type was deleted."},"typeEmoji":{"type":["string","null"]},"openedBy":{"$ref":"#/components/schemas/TicketMemberDto"},"claimedBy":{"anyOf":[{"$ref":"#/components/schemas/TicketMemberDto"},{"type":"null"}]},"closedBy":{"anyOf":[{"$ref":"#/components/schemas/TicketMemberDto"},{"type":"null"}]},"accountTag":{"type":["string","null"],"description":"The linked game account the member picked, if the type asked for one."},"accountName":{"type":["string","null"]},"channelId":{"type":"string"},"channelName":{"type":["string","null"],"description":"Null once the channel is deleted, which closing does."},"staffThreadId":{"type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"closedAt":{"format":"date-time","type":["string","null"]}},"required":["status","channelStatus","id","number","panelId","panelName","typeId","typeLabel","typeEmoji","openedBy","claimedBy","closedBy","accountTag","accountName","channelId","channelName","staffThreadId","createdAt","closedAt"]},"TicketStatus":{"type":"string","enum":["open","sleep","closed"]},"ChannelStatus":{"type":"string","enum":["ok","archived","locked","deleted","noAccess","unknown"]},"TicketMemberDto":{"type":"object","properties":{"id":{"type":"string"},"displayName":{"type":["string","null"],"description":"From Discord, or the name the bot last saw for someone who left. Null when neither is known."},"avatarUrl":{"type":["string","null"],"description":"Null when they aren't in the server."}},"required":["id","displayName","avatarUrl"]},"TicketCountsDto":{"type":"object","properties":{"open":{"type":"number"},"sleep":{"type":"number"},"closed":{"type":"number"}},"required":["open","sleep","closed"]}}}}
```

## The CreateTicketPanelInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"CreateTicketPanelInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"]}}}}
```

## The TicketEmbedInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketEmbedInput":{"type":"object","properties":{"title":{"type":["string","null"],"minLength":1,"maxLength":256},"description":{"type":["string","null"],"minLength":1,"maxLength":2000},"color":{"type":["number","null"],"minimum":1,"maximum":16777215},"imageUrl":{"type":["string","null"],"maxLength":512,"format":"uri"},"thumbnailUrl":{"type":["string","null"],"maxLength":512,"format":"uri"},"footerText":{"type":["string","null"],"minLength":1,"maxLength":2048}}}}}}
```

## The TicketButtonInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketButtonInput":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"emoji":{"type":["string","null"],"maxLength":56},"style":{"type":"number","description":"Discord button style: 1 blue, 2 grey, 3 green, 4 red.","minimum":1,"maximum":4}},"required":["label","style"]}}}}
```

## The TicketLogChannelsInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketLogChannelsInput":{"type":"object","properties":{"buttonClick":{"type":["string","null"],"description":"Every click on the panel."},"statusChange":{"type":["string","null"],"description":"Tickets put to sleep, reopened or claimed."},"ticketClose":{"type":["string","null"],"description":"Closed tickets, with a transcript when the panel saves them."}}}}}}
```

## The TicketExtraButtonInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketExtraButtonInput":{"type":"object","properties":{"kind":{"allOf":[{"$ref":"#/components/schemas/TicketExtraButtonKind"}]},"label":{"type":"string","minLength":1,"maxLength":80},"emoji":{"type":["string","null"],"maxLength":56},"style":{"type":"number","description":"Ignored for link buttons, which Discord always shows grey.","minimum":1,"maximum":4},"url":{"type":"string","maxLength":256,"format":"uri"}},"required":["kind","label"]},"TicketExtraButtonKind":{"type":"string","enum":["link-account","url"]}}}}
```

## The TicketPanelInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketPanelInput":{"type":"object","properties":{"displayMode":{"allOf":[{"$ref":"#/components/schemas/TicketDisplayMode"}]},"name":{"type":"string","minLength":1,"maxLength":100},"embed":{"$ref":"#/components/schemas/TicketEmbedInput"},"button":{"$ref":"#/components/schemas/TicketButtonInput"},"logChannels":{"$ref":"#/components/schemas/TicketLogChannelsInput"},"extraButtons":{"maxItems":10,"type":"array","items":{"$ref":"#/components/schemas/TicketExtraButtonInput"}},"extraButtonsPlacement":{"type":"string","description":"`row` keeps extra buttons beside the type buttons; `col` starts a new row.","enum":["row","col"]},"saveTranscripts":{"type":"boolean","description":"Post a transcript to the ticket close log when a ticket closes."}}},"TicketDisplayMode":{"type":"string","enum":["menu","buttons"]},"TicketEmbedInput":{"type":"object","properties":{"title":{"type":["string","null"],"minLength":1,"maxLength":256},"description":{"type":["string","null"],"minLength":1,"maxLength":2000},"color":{"type":["number","null"],"minimum":1,"maximum":16777215},"imageUrl":{"type":["string","null"],"maxLength":512,"format":"uri"},"thumbnailUrl":{"type":["string","null"],"maxLength":512,"format":"uri"},"footerText":{"type":["string","null"],"minLength":1,"maxLength":2048}}},"TicketButtonInput":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"emoji":{"type":["string","null"],"maxLength":56},"style":{"type":"number","description":"Discord button style: 1 blue, 2 grey, 3 green, 4 red.","minimum":1,"maximum":4}},"required":["label","style"]},"TicketLogChannelsInput":{"type":"object","properties":{"buttonClick":{"type":["string","null"],"description":"Every click on the panel."},"statusChange":{"type":["string","null"],"description":"Tickets put to sleep, reopened or claimed."},"ticketClose":{"type":["string","null"],"description":"Closed tickets, with a transcript when the panel saves them."}}},"TicketExtraButtonInput":{"type":"object","properties":{"kind":{"allOf":[{"$ref":"#/components/schemas/TicketExtraButtonKind"}]},"label":{"type":"string","minLength":1,"maxLength":80},"emoji":{"type":["string","null"],"maxLength":56},"style":{"type":"number","description":"Ignored for link buttons, which Discord always shows grey.","minimum":1,"maximum":4},"url":{"type":"string","maxLength":256,"format":"uri"}},"required":["kind","label"]},"TicketExtraButtonKind":{"type":"string","enum":["link-account","url"]}}}}
```

## The CreateTicketTypeInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"CreateTicketTypeInput":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"emoji":{"type":["string","null"],"maxLength":56}},"required":["label"]}}}}
```

## The ReorderTicketTypesInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ReorderTicketTypesInput":{"type":"object","properties":{"typeIds":{"maxItems":25,"type":"array","items":{"type":"string"}}},"required":["typeIds"]}}}}
```

## The TicketQuestionInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketQuestionInput":{"type":"object","properties":{"label":{"type":"string","description":"Discord shows at most 45 characters in the form.","minLength":1,"maxLength":45},"required":{"type":"boolean"}},"required":["label","required"]}}}}
```

## The TicketTypeInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketTypeInput":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"emoji":{"type":["string","null"],"maxLength":56},"buttonStyle":{"type":"number","description":"Used in buttons mode.","minimum":1,"maximum":4},"requireLinkedAccount":{"type":"boolean","description":"Requirements below only apply when this is on."},"thMin":{"type":["number","null"],"minimum":1,"maximum":20},"minTrophies":{"type":["number","null"],"minimum":1,"maximum":10000},"minLeagueTier":{"type":["string","null"],"description":"105000013 (Valkyrie League 13) to 105000036 (Legend League).","pattern":"^1050000(1[3-9]|2\\d|3[0-6])$"},"questions":{"maxItems":5,"type":"array","items":{"$ref":"#/components/schemas/TicketQuestionInput"}},"pingRoleIds":{"description":"Pinged on new tickets, and staff on them.","maxItems":10,"type":"array","items":{"type":"string"}},"viewOnlyRoleIds":{"maxItems":10,"type":"array","items":{"type":"string"}},"addRoleIds":{"description":"Given to the member who opens the ticket.","maxItems":10,"type":"array","items":{"type":"string"}},"removeRoleIds":{"description":"Taken from the member who opens the ticket.","maxItems":10,"type":"array","items":{"type":"string"}},"openCategoryId":{"type":["string","null"]},"sleepCategoryId":{"type":["string","null"]},"namingConvention":{"type":"string","description":"`{count}`, `{user}`, `{account_name}` and `{account_th}` are filled in.","minLength":1,"maxLength":64},"createStaffThread":{"type":"boolean"},"autoSleepHours":{"type":["number","null"],"minimum":1,"maximum":999},"allowClaim":{"type":"boolean"}}},"TicketQuestionInput":{"type":"object","properties":{"label":{"type":"string","description":"Discord shows at most 45 characters in the form.","minLength":1,"maxLength":45},"required":{"type":"boolean"}},"required":["label","required"]}}}}
```

## The TicketSavedReplyInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketSavedReplyInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"content":{"type":"string","minLength":1,"maxLength":1800}},"required":["name","content"]}}}}
```

## The TicketSavedRepliesInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"TicketSavedRepliesInput":{"type":"object","properties":{"savedReplies":{"maxItems":25,"type":"array","items":{"$ref":"#/components/schemas/TicketSavedReplyInput"}}},"required":["savedReplies"]},"TicketSavedReplyInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"content":{"type":"string","minLength":1,"maxLength":1800}},"required":["name","content"]}}}}
```

## The ReminderClanDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ReminderClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The ReminderScheduleDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ReminderScheduleDto":{"type":"object","properties":{"warType":{"enum":["normal","friendly","cwl",null],"type":["string","null"]},"id":{"type":"string"},"clan":{"$ref":"#/components/schemas/ReminderClanDto"},"timestamp":{"format":"date-time","type":"string","description":"When the bot pings (or pinged) for this clan."},"triggered":{"type":"boolean"},"reason":{"type":["string","null"],"description":"Bot outcome once handled, e.g. `reminder_sent_successfully` or a skip reason."}},"required":["warType","id","clan","timestamp","triggered","reason"]},"ReminderClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]}}}}
```

## The ClanWarReminderDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanWarReminderDto":{"type":"object","properties":{"disabled":{"type":"boolean"},"townHalls":{"type":"array","items":{"type":"number"}},"remaining":{"type":"array","items":{"type":"number"}},"warTypes":{"type":"array","items":{"type":"string"}},"smartSkip":{"type":"boolean"},"silent":{"type":"boolean"},"randomLimit":{"type":["number","null"]},"id":{"type":"string"},"shortId":{"type":"string","description":"Short ID the bot shows in Discord: the last 5 hex characters, uppercased."},"channelId":{"type":"string"},"channelName":{"type":["string","null"]},"threadId":{"type":["string","null"]},"message":{"type":"string"},"duration":{"type":"number","description":"Time before the event ends, in milliseconds."},"roles":{"type":"array","items":{"type":"string"}},"linkedOnly":{"type":"boolean"},"clans":{"type":"array","items":{"$ref":"#/components/schemas/ReminderClanDto"}},"schedules":{"description":"Runs from the last 3 days and upcoming ones, oldest first. The bot drops older runs.","type":"array","items":{"$ref":"#/components/schemas/ReminderScheduleDto"}},"createdAt":{"format":"date-time","type":"string"}},"required":["disabled","townHalls","remaining","warTypes","smartSkip","silent","randomLimit","id","shortId","channelId","channelName","threadId","message","duration","roles","linkedOnly","clans","schedules","createdAt"]},"ReminderClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]},"ReminderScheduleDto":{"type":"object","properties":{"warType":{"enum":["normal","friendly","cwl",null],"type":["string","null"]},"id":{"type":"string"},"clan":{"$ref":"#/components/schemas/ReminderClanDto"},"timestamp":{"format":"date-time","type":"string","description":"When the bot pings (or pinged) for this clan."},"triggered":{"type":"boolean"},"reason":{"type":["string","null"],"description":"Bot outcome once handled, e.g. `reminder_sent_successfully` or a skip reason."}},"required":["warType","id","clan","timestamp","triggered","reason"]}}}}
```

## The CapitalRaidReminderDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"CapitalRaidReminderDto":{"type":"object","properties":{"allMembers":{"type":"boolean"},"minThreshold":{"type":"number"},"remaining":{"type":"array","items":{"type":"number"}},"id":{"type":"string"},"shortId":{"type":"string","description":"Short ID the bot shows in Discord: the last 5 hex characters, uppercased."},"channelId":{"type":"string"},"channelName":{"type":["string","null"]},"threadId":{"type":["string","null"]},"message":{"type":"string"},"duration":{"type":"number","description":"Time before the event ends, in milliseconds."},"roles":{"type":"array","items":{"type":"string"}},"linkedOnly":{"type":"boolean"},"clans":{"type":"array","items":{"$ref":"#/components/schemas/ReminderClanDto"}},"schedules":{"description":"Runs from the last 3 days and upcoming ones, oldest first. The bot drops older runs.","type":"array","items":{"$ref":"#/components/schemas/ReminderScheduleDto"}},"createdAt":{"format":"date-time","type":"string"}},"required":["allMembers","minThreshold","remaining","id","shortId","channelId","channelName","threadId","message","duration","roles","linkedOnly","clans","schedules","createdAt"]},"ReminderClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]},"ReminderScheduleDto":{"type":"object","properties":{"warType":{"enum":["normal","friendly","cwl",null],"type":["string","null"]},"id":{"type":"string"},"clan":{"$ref":"#/components/schemas/ReminderClanDto"},"timestamp":{"format":"date-time","type":"string","description":"When the bot pings (or pinged) for this clan."},"triggered":{"type":"boolean"},"reason":{"type":["string","null"],"description":"Bot outcome once handled, e.g. `reminder_sent_successfully` or a skip reason."}},"required":["warType","id","clan","timestamp","triggered","reason"]}}}}
```

## The ClanGamesReminderDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanGamesReminderDto":{"type":"object","properties":{"allMembers":{"type":"boolean"},"minPoints":{"type":"number"},"id":{"type":"string"},"shortId":{"type":"string","description":"Short ID the bot shows in Discord: the last 5 hex characters, uppercased."},"channelId":{"type":"string"},"channelName":{"type":["string","null"]},"threadId":{"type":["string","null"]},"message":{"type":"string"},"duration":{"type":"number","description":"Time before the event ends, in milliseconds."},"roles":{"type":"array","items":{"type":"string"}},"linkedOnly":{"type":"boolean"},"clans":{"type":"array","items":{"$ref":"#/components/schemas/ReminderClanDto"}},"schedules":{"description":"Runs from the last 3 days and upcoming ones, oldest first. The bot drops older runs.","type":"array","items":{"$ref":"#/components/schemas/ReminderScheduleDto"}},"createdAt":{"format":"date-time","type":"string"}},"required":["allMembers","minPoints","id","shortId","channelId","channelName","threadId","message","duration","roles","linkedOnly","clans","schedules","createdAt"]},"ReminderClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]},"ReminderScheduleDto":{"type":"object","properties":{"warType":{"enum":["normal","friendly","cwl",null],"type":["string","null"]},"id":{"type":"string"},"clan":{"$ref":"#/components/schemas/ReminderClanDto"},"timestamp":{"format":"date-time","type":"string","description":"When the bot pings (or pinged) for this clan."},"triggered":{"type":"boolean"},"reason":{"type":["string","null"],"description":"Bot outcome once handled, e.g. `reminder_sent_successfully` or a skip reason."}},"required":["warType","id","clan","timestamp","triggered","reason"]}}}}
```

## The GuildRemindersDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GuildRemindersDto":{"type":"object","properties":{"clanWars":{"type":"array","items":{"$ref":"#/components/schemas/ClanWarReminderDto"}},"capitalRaids":{"type":"array","items":{"$ref":"#/components/schemas/CapitalRaidReminderDto"}},"clanGames":{"type":"array","items":{"$ref":"#/components/schemas/ClanGamesReminderDto"}}},"required":["clanWars","capitalRaids","clanGames"]},"ClanWarReminderDto":{"type":"object","properties":{"disabled":{"type":"boolean"},"townHalls":{"type":"array","items":{"type":"number"}},"remaining":{"type":"array","items":{"type":"number"}},"warTypes":{"type":"array","items":{"type":"string"}},"smartSkip":{"type":"boolean"},"silent":{"type":"boolean"},"randomLimit":{"type":["number","null"]},"id":{"type":"string"},"shortId":{"type":"string","description":"Short ID the bot shows in Discord: the last 5 hex characters, uppercased."},"channelId":{"type":"string"},"channelName":{"type":["string","null"]},"threadId":{"type":["string","null"]},"message":{"type":"string"},"duration":{"type":"number","description":"Time before the event ends, in milliseconds."},"roles":{"type":"array","items":{"type":"string"}},"linkedOnly":{"type":"boolean"},"clans":{"type":"array","items":{"$ref":"#/components/schemas/ReminderClanDto"}},"schedules":{"description":"Runs from the last 3 days and upcoming ones, oldest first. The bot drops older runs.","type":"array","items":{"$ref":"#/components/schemas/ReminderScheduleDto"}},"createdAt":{"format":"date-time","type":"string"}},"required":["disabled","townHalls","remaining","warTypes","smartSkip","silent","randomLimit","id","shortId","channelId","channelName","threadId","message","duration","roles","linkedOnly","clans","schedules","createdAt"]},"ReminderClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]},"ReminderScheduleDto":{"type":"object","properties":{"warType":{"enum":["normal","friendly","cwl",null],"type":["string","null"]},"id":{"type":"string"},"clan":{"$ref":"#/components/schemas/ReminderClanDto"},"timestamp":{"format":"date-time","type":"string","description":"When the bot pings (or pinged) for this clan."},"triggered":{"type":"boolean"},"reason":{"type":["string","null"],"description":"Bot outcome once handled, e.g. `reminder_sent_successfully` or a skip reason."}},"required":["warType","id","clan","timestamp","triggered","reason"]},"CapitalRaidReminderDto":{"type":"object","properties":{"allMembers":{"type":"boolean"},"minThreshold":{"type":"number"},"remaining":{"type":"array","items":{"type":"number"}},"id":{"type":"string"},"shortId":{"type":"string","description":"Short ID the bot shows in Discord: the last 5 hex characters, uppercased."},"channelId":{"type":"string"},"channelName":{"type":["string","null"]},"threadId":{"type":["string","null"]},"message":{"type":"string"},"duration":{"type":"number","description":"Time before the event ends, in milliseconds."},"roles":{"type":"array","items":{"type":"string"}},"linkedOnly":{"type":"boolean"},"clans":{"type":"array","items":{"$ref":"#/components/schemas/ReminderClanDto"}},"schedules":{"description":"Runs from the last 3 days and upcoming ones, oldest first. The bot drops older runs.","type":"array","items":{"$ref":"#/components/schemas/ReminderScheduleDto"}},"createdAt":{"format":"date-time","type":"string"}},"required":["allMembers","minThreshold","remaining","id","shortId","channelId","channelName","threadId","message","duration","roles","linkedOnly","clans","schedules","createdAt"]},"ClanGamesReminderDto":{"type":"object","properties":{"allMembers":{"type":"boolean"},"minPoints":{"type":"number"},"id":{"type":"string"},"shortId":{"type":"string","description":"Short ID the bot shows in Discord: the last 5 hex characters, uppercased."},"channelId":{"type":"string"},"channelName":{"type":["string","null"]},"threadId":{"type":["string","null"]},"message":{"type":"string"},"duration":{"type":"number","description":"Time before the event ends, in milliseconds."},"roles":{"type":"array","items":{"type":"string"}},"linkedOnly":{"type":"boolean"},"clans":{"type":"array","items":{"$ref":"#/components/schemas/ReminderClanDto"}},"schedules":{"description":"Runs from the last 3 days and upcoming ones, oldest first. The bot drops older runs.","type":"array","items":{"$ref":"#/components/schemas/ReminderScheduleDto"}},"createdAt":{"format":"date-time","type":"string"}},"required":["allMembers","minPoints","id","shortId","channelId","channelName","threadId","message","duration","roles","linkedOnly","clans","schedules","createdAt"]}}}}
```

## The ReminderPingsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ReminderPingsDto":{"type":"object","properties":{"mode":{"description":"optIn pings only members with the role; optOut skips them.","enum":["optIn","optOut"],"type":"string"},"clanWarsRole":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"capitalRaidsRole":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"clanGamesRole":{"type":["string","null"],"pattern":"^\\d{17,20}$"}},"required":["mode","clanWarsRole","capitalRaidsRole","clanGamesRole"]}}}}
```

## The ReminderPingsInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ReminderPingsInput":{"type":"object","properties":{"mode":{"type":"string","description":"optIn pings only members with the role; optOut skips them.","enum":["optIn","optOut"]},"clanWarsRole":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"capitalRaidsRole":{"type":["string","null"],"pattern":"^\\d{17,20}$"},"clanGamesRole":{"type":["string","null"],"pattern":"^\\d{17,20}$"}},"required":["mode","clanWarsRole","capitalRaidsRole","clanGamesRole"]}}}}
```

## The ReminderClanRole object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ReminderClanRole":{"type":"string","enum":["leader","coLeader","admin","member"]}}}}
```

## The WarAttacksLeft object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"WarAttacksLeft":{"type":"number","enum":[1,2],"description":"Ping members with this many attacks left; empty pings nobody."}}}}
```

## The ReminderWarType object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ReminderWarType":{"type":"string","enum":["normal","friendly","cwl"]}}}}
```

## The ClanWarReminderInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanWarReminderInput":{"type":"object","properties":{"roles":{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/ReminderClanRole"}},"remaining":{"type":"array","description":"Ping members with this many attacks left; empty pings nobody.","uniqueItems":true,"items":{"$ref":"#/components/schemas/WarAttacksLeft"}},"warTypes":{"type":"array","uniqueItems":true,"minItems":1,"items":{"$ref":"#/components/schemas/ReminderWarType"}},"disabled":{"type":"boolean"},"townHalls":{"uniqueItems":true,"type":"array","items":{"type":"number","maximum":19,"minimum":1}},"smartSkip":{"type":"boolean","description":"Skip once the clan reaches 100% destruction."},"silent":{"type":"boolean","description":"Post the message only, without mentioning members."},"channelId":{"type":"string","pattern":"^\\d{17,20}$"},"webhook":{"description":"From Discord's `webhook.incoming` sign-in; without one, a known webhook in the channel is reused.","allOf":[{"$ref":"#/components/schemas/ReminderWebhookInput"}]},"message":{"type":"string","minLength":1,"maxLength":1800},"duration":{"type":"number","description":"Time before the event ends, in milliseconds.","minimum":900000},"linkedOnly":{"type":"boolean"},"clans":{"uniqueItems":true,"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","pattern":"^#[0289PYLQGRJCUV]{3,}$"}}},"required":["roles","remaining","warTypes","disabled","townHalls","smartSkip","silent","channelId","message","duration","linkedOnly","clans"]},"ReminderClanRole":{"type":"string","enum":["leader","coLeader","admin","member"]},"WarAttacksLeft":{"type":"number","enum":[1,2],"description":"Ping members with this many attacks left; empty pings nobody."},"ReminderWarType":{"type":"string","enum":["normal","friendly","cwl"]},"ReminderWebhookInput":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{17,20}$"},"token":{"type":"string","minLength":1}},"required":["id","token"]}}}}
```

## The ReminderIdDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ReminderIdDto":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}}
```

## The RaidAttacksLeft object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RaidAttacksLeft":{"type":"number","enum":[1,2,3,4,5,6]}}}}
```

## The CapitalRaidReminderInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"CapitalRaidReminderInput":{"type":"object","properties":{"roles":{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/ReminderClanRole"}},"remaining":{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/RaidAttacksLeft"}},"allMembers":{"type":"boolean"},"minThreshold":{"type":"number","minimum":0,"maximum":6},"channelId":{"type":"string","pattern":"^\\d{17,20}$"},"webhook":{"description":"From Discord's `webhook.incoming` sign-in; without one, a known webhook in the channel is reused.","allOf":[{"$ref":"#/components/schemas/ReminderWebhookInput"}]},"message":{"type":"string","minLength":1,"maxLength":1800},"duration":{"type":"number","description":"Time before the event ends, in milliseconds.","minimum":900000},"linkedOnly":{"type":"boolean"},"clans":{"uniqueItems":true,"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","pattern":"^#[0289PYLQGRJCUV]{3,}$"}}},"required":["roles","remaining","allMembers","minThreshold","channelId","message","duration","linkedOnly","clans"]},"ReminderClanRole":{"type":"string","enum":["leader","coLeader","admin","member"]},"RaidAttacksLeft":{"type":"number","enum":[1,2,3,4,5,6]},"ReminderWebhookInput":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{17,20}$"},"token":{"type":"string","minLength":1}},"required":["id","token"]}}}}
```

## The ClanGamesReminderInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanGamesReminderInput":{"type":"object","properties":{"roles":{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/ReminderClanRole"}},"allMembers":{"type":"boolean"},"minPoints":{"type":"number","minimum":0,"maximum":10000},"channelId":{"type":"string","pattern":"^\\d{17,20}$"},"webhook":{"description":"From Discord's `webhook.incoming` sign-in; without one, a known webhook in the channel is reused.","allOf":[{"$ref":"#/components/schemas/ReminderWebhookInput"}]},"message":{"type":"string","minLength":1,"maxLength":1800},"duration":{"type":"number","description":"Time before the event ends, in milliseconds.","minimum":900000},"linkedOnly":{"type":"boolean"},"clans":{"uniqueItems":true,"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","pattern":"^#[0289PYLQGRJCUV]{3,}$"}}},"required":["roles","allMembers","minPoints","channelId","message","duration","linkedOnly","clans"]},"ReminderClanRole":{"type":"string","enum":["leader","coLeader","admin","member"]},"ReminderWebhookInput":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{17,20}$"},"token":{"type":"string","minLength":1}},"required":["id","token"]}}}}
```

## The ServerInfoDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ServerInfoDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"],"description":"Null when the bot can't see the server."},"iconUrl":{"type":["string","null"]},"memberCount":{"type":["number","null"]},"botPresent":{"type":"boolean","description":"False when the bot that serves this server has left it or was never added."},"missingPermissions":{"description":"Server-wide permissions the bot lacks: `Manage Roles` for auto-roles, `Manage Nicknames` for auto-nickname.","type":"array","items":{"type":"string"}},"customBot":{"type":"object","properties":{"name":{"type":"string"},"isLive":{"type":"boolean"}},"required":["name","isLive"]}},"required":["id","name","iconUrl","memberCount","botPresent","missingPermissions","customBot"]}}}}
```

## The CategoryClanCountDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"CategoryClanCountDto":{"type":"object","properties":{"id":{"type":["string","null"],"description":"Null for clans without a category."},"name":{"type":"string"},"clans":{"type":"number"}},"required":["id","name","clans"]}}}}
```

## The LinkedClanDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LinkedClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"alias":{"type":["string","null"]},"paused":{"type":"boolean"},"lastSyncedAt":{"type":["string","null"],"description":"When the bot last fetched the clan, the sync time `/debug` shows. Null before the first."},"categoryId":{"type":["string","null"],"description":"One of `categories`, or null when the clan has none."}},"required":["tag","name","alias","paused","lastSyncedAt","categoryId"]}}}}
```

## The LinkedClansDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LinkedClansDto":{"type":"object","properties":{"total":{"type":"number"},"active":{"type":"number"},"paused":{"type":"number"},"limit":{"type":"number","description":"Clans the server can link, from its subscription."},"categories":{"type":"array","items":{"$ref":"#/components/schemas/CategoryClanCountDto"}},"list":{"description":"Every linked clan, in the server's order.","type":"array","items":{"$ref":"#/components/schemas/LinkedClanDto"}}},"required":["total","active","paused","limit","categories","list"]},"CategoryClanCountDto":{"type":"object","properties":{"id":{"type":["string","null"],"description":"Null for clans without a category."},"name":{"type":"string"},"clans":{"type":"number"}},"required":["id","name","clans"]},"LinkedClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"alias":{"type":["string","null"]},"paused":{"type":"boolean"},"lastSyncedAt":{"type":["string","null"],"description":"When the bot last fetched the clan, the sync time `/debug` shows. Null before the first."},"categoryId":{"type":["string","null"],"description":"One of `categories`, or null when the clan has none."}},"required":["tag","name","alias","paused","lastSyncedAt","categoryId"]}}}}
```

## The LogTypeCountDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"LogTypeCountDto":{"type":"object","properties":{"logType":{"type":"string"},"total":{"type":"number"},"enabled":{"type":"number"}},"required":["logType","total","enabled"]}}}}
```

## The ClanLogChannelDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanLogChannelDto":{"type":"object","properties":{"logType":{"type":"string"},"clanTag":{"type":"string"},"channelId":{"type":"string","description":"The channel or thread it posts to."},"parentId":{"type":["string","null"],"description":"The thread's parent channel, for logs posted in a thread or forum post."},"enabled":{"type":"boolean"},"lastPostedAt":{"type":["string","null"],"description":"When the bot last posted this log. Null before its first post."}},"required":["logType","clanTag","channelId","parentId","enabled","lastPostedAt"]}}}}
```

## The ClanLogsSummaryDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ClanLogsSummaryDto":{"type":"object","properties":{"total":{"type":"number"},"enabled":{"type":"number"},"clans":{"type":"number","description":"Clans with at least one log."},"types":{"type":"array","items":{"$ref":"#/components/schemas/LogTypeCountDto"}},"logs":{"type":"array","items":{"$ref":"#/components/schemas/ClanLogChannelDto"}}},"required":["total","enabled","clans","types","logs"]},"LogTypeCountDto":{"type":"object","properties":{"logType":{"type":"string"},"total":{"type":"number"},"enabled":{"type":"number"}},"required":["logType","total","enabled"]},"ClanLogChannelDto":{"type":"object","properties":{"logType":{"type":"string"},"clanTag":{"type":"string"},"channelId":{"type":"string","description":"The channel or thread it posts to."},"parentId":{"type":["string","null"],"description":"The thread's parent channel, for logs posted in a thread or forum post."},"enabled":{"type":"boolean"},"lastPostedAt":{"type":["string","null"],"description":"When the bot last posted this log. Null before its first post."}},"required":["logType","clanTag","channelId","parentId","enabled","lastPostedAt"]}}}}
```

## The KeyCountDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"KeyCountDto":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"number"}},"required":["key","count"]}}}}
```

## The RemindersSummaryDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RemindersSummaryDto":{"type":"object","properties":{"total":{"type":"number"},"enabled":{"type":"number"},"clans":{"type":"number","description":"Clans at least one reminder covers."},"timings":{"description":"Count per time left in the event when the reminder fires, in milliseconds.","type":"array","items":{"$ref":"#/components/schemas/KeyCountDto"}},"warTypes":{"description":"Clan war reminders only: count per war type list, e.g. `cwl,normal`.","type":"array","items":{"$ref":"#/components/schemas/KeyCountDto"}}},"required":["total","enabled","clans","timings","warTypes"]},"KeyCountDto":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"number"}},"required":["key","count"]}}}}
```

## The RosterSummaryDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RosterSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]},"closed":{"type":"boolean"},"members":{"type":"number"},"maxMembers":{"type":["number","null"]},"roleId":{"type":["string","null"],"description":"Given to everyone signed up."},"logChannelId":{"type":["string","null"],"description":"Where this roster's sign-ups and changes are posted."}},"required":["id","name","clan","closed","members","maxMembers","roleId","logChannelId"]}}}}
```

## The RosterCategoryRoleDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RosterCategoryRoleDto":{"type":"object","properties":{"name":{"type":"string"},"roleId":{"type":["string","null"],"description":"Given to members placed in this category."},"selectable":{"type":"boolean","description":"Members can pick it when signing up."}},"required":["name","roleId","selectable"]}}}}
```

## The RostersSummaryDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RostersSummaryDto":{"type":"object","properties":{"rosters":{"type":"array","items":{"$ref":"#/components/schemas/RosterSummaryDto"}},"categories":{"type":"array","items":{"$ref":"#/components/schemas/RosterCategoryRoleDto"}},"defaults":{"type":["object","null"],"additionalProperties":true,"description":"The server's defaults for new rosters, as the bot stores them; null when never set."}},"required":["rosters","categories","defaults"]},"RosterSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]},"closed":{"type":"boolean"},"members":{"type":"number"},"maxMembers":{"type":["number","null"]},"roleId":{"type":["string","null"],"description":"Given to everyone signed up."},"logChannelId":{"type":["string","null"],"description":"Where this roster's sign-ups and changes are posted."}},"required":["id","name","clan","closed","members","maxMembers","roleId","logChannelId"]},"RosterCategoryRoleDto":{"type":"object","properties":{"name":{"type":"string"},"roleId":{"type":["string","null"],"description":"Given to members placed in this category."},"selectable":{"type":"boolean","description":"Members can pick it when signing up."}},"required":["name","roleId","selectable"]}}}}
```

## The ServerLogChannelsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ServerLogChannelsDto":{"type":"object","properties":{"welcomeChannelId":{"type":["string","null"]},"welcomeEnabled":{"type":"boolean"},"rosterChangelogChannelId":{"type":["string","null"]},"flagAlertChannelId":{"type":["string","null"]},"eventsChannelId":{"type":["string","null"],"description":"Where the bot posts maintenance breaks."}},"required":["welcomeChannelId","welcomeEnabled","rosterChangelogChannelId","flagAlertChannelId","eventsChannelId"]}}}}
```

## The ServerExtrasDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ServerExtrasDto":{"type":"object","properties":{"ticketPanels":{"type":"number"},"openTickets":{"type":"number"},"flags":{"type":"number"},"autoBoards":{"type":"number"},"pendingRoleDelays":{"type":"number","description":"Members with delayed role changes waiting to apply."},"commandWhitelist":{"type":"number","description":"Commands opened to specific users or roles."},"buttons":{"description":"Button messages set up: `link`, `refresh` and `my-rosters`.","type":"array","items":{"type":"string"}}},"required":["ticketPanels","openTickets","flags","autoBoards","pendingRoleDelays","commandWhitelist","buttons"]}}}}
```

## The RoleNameDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"RoleNameDto":{"type":"object","properties":{"problem":{"description":"Why ClashPerk can't give this role out, or null when it can.","anyOf":[{"$ref":"#/components/schemas/RoleProblem"},{"type":"null"}]},"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"number"}},"required":["problem","id","name","color"]},"RoleProblem":{"type":"string","enum":["above_bot","managed","no_manage_roles"],"description":"Why ClashPerk can't give this role out, or null when it can."}}}}
```

## The ChannelNameDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ChannelNameDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"number","description":"Discord's channel type, for the icon: text, forum, thread and so on."},"missingPermissions":{"description":"Permissions `/debug` checks that the bot lacks here, e.g. `Manage Webhooks`.","type":"array","items":{"type":"string"}}},"required":["id","name","type","missingPermissions"]}}}}
```

## The ChannelStateDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ChannelStateDto":{"type":"object","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/ChannelStatus"}]},"id":{"type":"string"},"name":{"type":["string","null"],"description":"Null when the channel is gone or ClashPerk can't see it."},"parentName":{"type":["string","null"],"description":"The channel a thread is in; null for channels."},"missingPermissions":{"type":"array","items":{"type":"string"}}},"required":["status","id","name","parentName","missingPermissions"]},"ChannelStatus":{"type":"string","enum":["ok","archived","locked","deleted","noAccess","unknown"]}}}}
```

## The ServerSetupDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ServerSetupDto":{"type":"object","properties":{"server":{"$ref":"#/components/schemas/ServerInfoDto"},"config":{"$ref":"#/components/schemas/ServerConfigDto"},"clans":{"$ref":"#/components/schemas/LinkedClansDto"},"autoRoles":{"$ref":"#/components/schemas/AutoRolesDto"},"managers":{"$ref":"#/components/schemas/ManagerRolesDto"},"clanLogs":{"$ref":"#/components/schemas/ClanLogsSummaryDto"},"clanWarReminders":{"$ref":"#/components/schemas/RemindersSummaryDto"},"capitalRaidReminders":{"$ref":"#/components/schemas/RemindersSummaryDto"},"clanGamesReminders":{"$ref":"#/components/schemas/RemindersSummaryDto"},"rosters":{"$ref":"#/components/schemas/RostersSummaryDto"},"serverLogs":{"$ref":"#/components/schemas/ServerLogChannelsDto"},"extras":{"$ref":"#/components/schemas/ServerExtrasDto"},"roles":{"description":"Names for the role and channel IDs above; empty when the bot can't see the server.","type":"array","items":{"$ref":"#/components/schemas/RoleNameDto"}},"channels":{"type":"array","items":{"$ref":"#/components/schemas/ChannelNameDto"}},"channelStates":{"description":"The channels the server's logs post to, with whether ClashPerk can post there.","type":"array","items":{"$ref":"#/components/schemas/ChannelStateDto"}},"settings":{"type":["object","null"],"additionalProperties":true,"description":"The raw `Settings` record with webhooks and tokens removed, for debugging."}},"required":["server","config","clans","autoRoles","managers","clanLogs","clanWarReminders","capitalRaidReminders","clanGamesReminders","rosters","serverLogs","extras","roles","channels","channelStates","settings"]},"ServerInfoDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"],"description":"Null when the bot can't see the server."},"iconUrl":{"type":["string","null"]},"memberCount":{"type":["number","null"]},"botPresent":{"type":"boolean","description":"False when the bot that serves this server has left it or was never added."},"missingPermissions":{"description":"Server-wide permissions the bot lacks: `Manage Roles` for auto-roles, `Manage Nicknames` for auto-nickname.","type":"array","items":{"type":"string"}},"customBot":{"type":"object","properties":{"name":{"type":"string"},"isLive":{"type":"boolean"}},"required":["name","isLive"]}},"required":["id","name","iconUrl","memberCount","botPresent","missingPermissions","customBot"]},"ServerConfigDto":{"type":"object","properties":{"color":{"type":["number","null"]},"webhookLimit":{"type":"number"},"subscription":{"$ref":"#/components/schemas/SubscriptionDto"}},"required":["color","webhookLimit","subscription"]},"SubscriptionDto":{"type":"object","properties":{"active":{"type":"boolean"},"tier":{"type":["string","null"],"description":"A special tier such as `lifetime` or `gifted`; null for a regular plan."}},"required":["active","tier"]},"LinkedClansDto":{"type":"object","properties":{"total":{"type":"number"},"active":{"type":"number"},"paused":{"type":"number"},"limit":{"type":"number","description":"Clans the server can link, from its subscription."},"categories":{"type":"array","items":{"$ref":"#/components/schemas/CategoryClanCountDto"}},"list":{"description":"Every linked clan, in the server's order.","type":"array","items":{"$ref":"#/components/schemas/LinkedClanDto"}}},"required":["total","active","paused","limit","categories","list"]},"CategoryClanCountDto":{"type":"object","properties":{"id":{"type":["string","null"],"description":"Null for clans without a category."},"name":{"type":"string"},"clans":{"type":"number"}},"required":["id","name","clans"]},"LinkedClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"alias":{"type":["string","null"]},"paused":{"type":"boolean"},"lastSyncedAt":{"type":["string","null"],"description":"When the bot last fetched the clan, the sync time `/debug` shows. Null before the first."},"categoryId":{"type":["string","null"],"description":"One of `categories`, or null when the clan has none."}},"required":["tag","name","alias","paused","lastSyncedAt","categoryId"]},"AutoRolesDto":{"type":"object","properties":{"townHall":{"type":"object","additionalProperties":{"type":"string"}},"builderHall":{"type":"object","additionalProperties":{"type":"string"}},"leagues":{"type":"object","additionalProperties":{"type":"string"}},"builderLeagues":{"type":"object","additionalProperties":{"type":"string"}},"trophies":{"type":"object","additionalProperties":{"type":"string"}},"delayExclusions":{"type":"array","items":{"$ref":"#/components/schemas/DelayExclusion"}},"nicknameAccount":{"allOf":[{"$ref":"#/components/schemas/NicknameAccount"}]},"familyRole":{"type":["string","null"]},"exclusiveFamilyRole":{"type":["string","null"]},"familyLeadersRoles":{"type":"array","items":{"type":"string"}},"guestRole":{"type":["string","null"]},"verifiedRole":{"type":["string","null"]},"linkedRole":{"type":["string","null"]},"eosPushRole":{"type":["string","null"]},"eosPushClans":{"type":"array","items":{"type":"string"}},"allowNonFamilyTownHall":{"type":"boolean","description":"Town Hall and Builder Hall roles also go to accounts outside the server's clans."},"allowNonFamilyLeagues":{"type":"boolean","description":"League and builder league roles also go to accounts outside the server's clans."},"verifiedOnlyClanRoles":{"type":"boolean"},"autoUpdate":{"type":"boolean"},"forceRefresh":{"type":"boolean"},"allowNotLinked":{"type":"boolean","description":"Members with no linked account still get roles like the guest role."},"removalDelay":{"type":"number","description":"Milliseconds; one of the bot's choices."},"additionDelay":{"type":"number"},"clans":{"type":"array","items":{"$ref":"#/components/schemas/AutoRoleClanDto"}},"familyNicknameFormat":{"type":"string","description":"Nickname format for members in your clans; \"\" means none."},"nonFamilyNicknameFormat":{"type":"string","description":"Nickname format for everyone else; \"\" means none."},"autoNickname":{"type":"boolean","description":"Nicknames change on the bot's checks, not only on a refresh."},"nicknameRoleLabels":{"$ref":"#/components/schemas/NicknameRoleLabels"}},"required":["townHall","builderHall","leagues","builderLeagues","trophies","delayExclusions","nicknameAccount","familyRole","exclusiveFamilyRole","familyLeadersRoles","guestRole","verifiedRole","linkedRole","eosPushRole","eosPushClans","allowNonFamilyTownHall","allowNonFamilyLeagues","verifiedOnlyClanRoles","autoUpdate","forceRefresh","allowNotLinked","removalDelay","additionDelay","clans","familyNicknameFormat","nonFamilyNicknameFormat","autoNickname","nicknameRoleLabels"]},"DelayExclusion":{"type":"string","enum":["townHallRoles","builderHallRoles","leagueRoles","builderLeagueRoles","guestRole"]},"NicknameAccount":{"type":"string","enum":["default-account","best-account","default-or-best-account"]},"AutoRoleClanDto":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"},"leader":{"type":["string","null"]},"coLeader":{"type":["string","null"]},"elder":{"type":["string","null"]},"member":{"type":["string","null"]},"everyone":{"type":["string","null"]},"warRole":{"type":["string","null"]}},"required":["tag","name","leader","coLeader","elder","member","everyone","warRole"]},"NicknameRoleLabels":{"type":"object","properties":{"leader":{"type":"string","maxLength":10},"coLeader":{"type":"string","maxLength":10},"elder":{"type":"string","maxLength":10},"member":{"type":"string","maxLength":10}},"required":["leader","coLeader","elder","member"]},"ManagerRolesDto":{"type":"object","properties":{"managerRoles":{"type":"array","items":{"type":"string"}},"rosterManagerRoles":{"type":"array","items":{"type":"string"}},"flagsManagerRoles":{"type":"array","items":{"type":"string"}},"linksManagerRoles":{"type":"array","items":{"type":"string"}}},"required":["managerRoles","rosterManagerRoles","flagsManagerRoles","linksManagerRoles"]},"ClanLogsSummaryDto":{"type":"object","properties":{"total":{"type":"number"},"enabled":{"type":"number"},"clans":{"type":"number","description":"Clans with at least one log."},"types":{"type":"array","items":{"$ref":"#/components/schemas/LogTypeCountDto"}},"logs":{"type":"array","items":{"$ref":"#/components/schemas/ClanLogChannelDto"}}},"required":["total","enabled","clans","types","logs"]},"LogTypeCountDto":{"type":"object","properties":{"logType":{"type":"string"},"total":{"type":"number"},"enabled":{"type":"number"}},"required":["logType","total","enabled"]},"ClanLogChannelDto":{"type":"object","properties":{"logType":{"type":"string"},"clanTag":{"type":"string"},"channelId":{"type":"string","description":"The channel or thread it posts to."},"parentId":{"type":["string","null"],"description":"The thread's parent channel, for logs posted in a thread or forum post."},"enabled":{"type":"boolean"},"lastPostedAt":{"type":["string","null"],"description":"When the bot last posted this log. Null before its first post."}},"required":["logType","clanTag","channelId","parentId","enabled","lastPostedAt"]},"RemindersSummaryDto":{"type":"object","properties":{"total":{"type":"number"},"enabled":{"type":"number"},"clans":{"type":"number","description":"Clans at least one reminder covers."},"timings":{"description":"Count per time left in the event when the reminder fires, in milliseconds.","type":"array","items":{"$ref":"#/components/schemas/KeyCountDto"}},"warTypes":{"description":"Clan war reminders only: count per war type list, e.g. `cwl,normal`.","type":"array","items":{"$ref":"#/components/schemas/KeyCountDto"}}},"required":["total","enabled","clans","timings","warTypes"]},"KeyCountDto":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"number"}},"required":["key","count"]},"RostersSummaryDto":{"type":"object","properties":{"rosters":{"type":"array","items":{"$ref":"#/components/schemas/RosterSummaryDto"}},"categories":{"type":"array","items":{"$ref":"#/components/schemas/RosterCategoryRoleDto"}},"defaults":{"type":["object","null"],"additionalProperties":true,"description":"The server's defaults for new rosters, as the bot stores them; null when never set."}},"required":["rosters","categories","defaults"]},"RosterSummaryDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"clan":{"type":"object","properties":{"tag":{"type":"string"},"name":{"type":"string"}},"required":["tag","name"]},"closed":{"type":"boolean"},"members":{"type":"number"},"maxMembers":{"type":["number","null"]},"roleId":{"type":["string","null"],"description":"Given to everyone signed up."},"logChannelId":{"type":["string","null"],"description":"Where this roster's sign-ups and changes are posted."}},"required":["id","name","clan","closed","members","maxMembers","roleId","logChannelId"]},"RosterCategoryRoleDto":{"type":"object","properties":{"name":{"type":"string"},"roleId":{"type":["string","null"],"description":"Given to members placed in this category."},"selectable":{"type":"boolean","description":"Members can pick it when signing up."}},"required":["name","roleId","selectable"]},"ServerLogChannelsDto":{"type":"object","properties":{"welcomeChannelId":{"type":["string","null"]},"welcomeEnabled":{"type":"boolean"},"rosterChangelogChannelId":{"type":["string","null"]},"flagAlertChannelId":{"type":["string","null"]},"eventsChannelId":{"type":["string","null"],"description":"Where the bot posts maintenance breaks."}},"required":["welcomeChannelId","welcomeEnabled","rosterChangelogChannelId","flagAlertChannelId","eventsChannelId"]},"ServerExtrasDto":{"type":"object","properties":{"ticketPanels":{"type":"number"},"openTickets":{"type":"number"},"flags":{"type":"number"},"autoBoards":{"type":"number"},"pendingRoleDelays":{"type":"number","description":"Members with delayed role changes waiting to apply."},"commandWhitelist":{"type":"number","description":"Commands opened to specific users or roles."},"buttons":{"description":"Button messages set up: `link`, `refresh` and `my-rosters`.","type":"array","items":{"type":"string"}}},"required":["ticketPanels","openTickets","flags","autoBoards","pendingRoleDelays","commandWhitelist","buttons"]},"RoleNameDto":{"type":"object","properties":{"problem":{"description":"Why ClashPerk can't give this role out, or null when it can.","anyOf":[{"$ref":"#/components/schemas/RoleProblem"},{"type":"null"}]},"id":{"type":"string"},"name":{"type":"string"},"color":{"type":"number"}},"required":["problem","id","name","color"]},"RoleProblem":{"type":"string","enum":["above_bot","managed","no_manage_roles"],"description":"Why ClashPerk can't give this role out, or null when it can."},"ChannelNameDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"number","description":"Discord's channel type, for the icon: text, forum, thread and so on."},"missingPermissions":{"description":"Permissions `/debug` checks that the bot lacks here, e.g. `Manage Webhooks`.","type":"array","items":{"type":"string"}}},"required":["id","name","type","missingPermissions"]},"ChannelStateDto":{"type":"object","properties":{"status":{"allOf":[{"$ref":"#/components/schemas/ChannelStatus"}]},"id":{"type":"string"},"name":{"type":["string","null"],"description":"Null when the channel is gone or ClashPerk can't see it."},"parentName":{"type":["string","null"],"description":"The channel a thread is in; null for channels."},"missingPermissions":{"type":"array","items":{"type":"string"}}},"required":["status","id","name","parentName","missingPermissions"]},"ChannelStatus":{"type":"string","enum":["ok","archived","locked","deleted","noAccess","unknown"]}}}}
```

## The ExportMembersInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ExportMembersInput":{"type":"object","properties":{"clanTags":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string"}},"guildId":{"type":"string"},"scheduled":{"type":"boolean"}},"required":["clanTags","guildId","scheduled"]}}}}
```

## The ExportMembersOutputDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"ExportMembersOutputDto":{"type":"object","properties":{"spreadsheetId":{"type":"string"},"spreadsheetUrl":{"type":"string"}},"required":["spreadsheetId","spreadsheetUrl"]}}}}
```

## The CommandsUsageLogDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"CommandsUsageLogDto":{"type":"object","properties":{"userId":{"type":"string"},"commandId":{"type":"string"},"guildId":{"type":"string"},"createdAt":{"type":"number"}},"required":["userId","commandId","guildId","createdAt"]}}}}
```

## The CommandsUsageLogItemsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"CommandsUsageLogItemsDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CommandsUsageLogDto"}}},"required":["items"]},"CommandsUsageLogDto":{"type":"object","properties":{"userId":{"type":"string"},"commandId":{"type":"string"},"guildId":{"type":"string"},"createdAt":{"type":"number"}},"required":["userId","commandId","guildId","createdAt"]}}}}
```

## The BotDayDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"BotDayDto":{"type":"object","properties":{"date":{"type":"string","description":"YYYY-MM-DD, the bot's day (UTC+5:30)."},"commands":{"type":"number"},"serversJoined":{"type":"number"},"serversLeft":{"type":"number"}},"required":["date","commands","serversJoined","serversLeft"]}}}}
```

## The BotCommandUsesDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"BotCommandUsesDto":{"type":"object","properties":{"command":{"type":"string"},"uses":{"type":"number"}},"required":["command","uses"]}}}}
```

## The BotOverviewDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"BotOverviewDto":{"type":"object","properties":{"servers":{"type":"number"},"clans":{"type":"number"},"players":{"type":"number"},"commandsUsed":{"type":"number"},"days":{"description":"The last 30 days, oldest first, today included.","type":"array","items":{"$ref":"#/components/schemas/BotDayDto"}},"topCommands":{"description":"The most used commands over the last 7 days.","type":"array","items":{"$ref":"#/components/schemas/BotCommandUsesDto"}}},"required":["servers","clans","players","commandsUsed","days","topCommands"]},"BotDayDto":{"type":"object","properties":{"date":{"type":"string","description":"YYYY-MM-DD, the bot's day (UTC+5:30)."},"commands":{"type":"number"},"serversJoined":{"type":"number"},"serversLeft":{"type":"number"}},"required":["date","commands","serversJoined","serversLeft"]},"BotCommandUsesDto":{"type":"object","properties":{"command":{"type":"string"},"uses":{"type":"number"}},"required":["command","uses"]}}}}
```

## The BetaGuildDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"BetaGuildDto":{"type":"object","properties":{"guildId":{"type":"string"},"name":{"type":["string","null"],"description":"Null when ClashPerk isn't in the server."},"iconUrl":{"type":["string","null"]},"note":{"type":["string","null"]},"addedBy":{"type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["guildId","name","iconUrl","note","addedBy","createdAt"]}}}}
```

## The BetaGuildsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"BetaGuildsDto":{"type":"object","properties":{"guilds":{"type":"array","items":{"$ref":"#/components/schemas/BetaGuildDto"}}},"required":["guilds"]},"BetaGuildDto":{"type":"object","properties":{"guildId":{"type":"string"},"name":{"type":["string","null"],"description":"Null when ClashPerk isn't in the server."},"iconUrl":{"type":["string","null"]},"note":{"type":["string","null"]},"addedBy":{"type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["guildId","name","iconUrl","note","addedBy","createdAt"]}}}}
```

## The AddBetaGuildsInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"AddBetaGuildsInput":{"type":"object","properties":{"guildIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","pattern":"^\\d{17,20}$"}},"note":{"type":["string","null"],"minLength":1,"maxLength":200}},"required":["guildIds"]}}}}
```

## The BetaGuildIdsDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"BetaGuildIdsDto":{"type":"object","properties":{"guildIds":{"type":"array","items":{"type":"string"}}},"required":["guildIds"]}}}}
```

## The SubscriptionProvider object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"SubscriptionProvider":{"type":"string","enum":["patreon","manual"]}}}}
```

## The BillingCadence object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"BillingCadence":{"type":"string","enum":["monthly","yearly","one_time"]}}}}
```

## The SubscriberServerDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"SubscriberServerDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"The server's current name when ClashPerk is in it, or the name when it was added."},"iconUrl":{"type":["string","null"],"description":"Null without an icon or when ClashPerk isn't in the server."},"clanLimit":{"type":"number","description":"Clans this subscription lets the server have logs for."}},"required":["id","name","iconUrl","clanLimit"]}}}}
```

## The SubscriberDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"SubscriberDto":{"type":"object","properties":{"provider":{"allOf":[{"$ref":"#/components/schemas/SubscriptionProvider"}]},"cadence":{"allOf":[{"$ref":"#/components/schemas/BillingCadence"}]},"id":{"type":"string"},"name":{"type":"string"},"discordUserId":{"type":["string","null"],"description":"The Discord account that redeemed it. Null until someone does."},"discordUsername":{"type":["string","null"]},"plan":{"type":["string","null"],"description":"Bronze, silver or gold. Null for special tiers or an unknown reward."},"tier":{"type":["string","null"],"description":"A special tier such as `lifetime` or `gifted`."},"note":{"type":["string","null"],"description":"Manual grants: where it was paid and the payment's reference."},"active":{"type":"boolean"},"status":{"type":["string","null"],"description":"The provider's own status, e.g. `active_patron` or `declined_patron`."},"billedCents":{"type":"number","description":"What each charge bills, for a month or a year, or a manual grant's last payment."},"monthlyCents":{"type":"number","description":"The charge spread per month, estimated for yearly plans and manual grants."},"lifetimeCents":{"type":"number"},"customBot":{"type":"boolean"},"servers":{"type":"array","items":{"$ref":"#/components/schemas/SubscriberServerDto"}},"lastChargeDate":{"format":"date-time","type":["string","null"]},"expiresAt":{"format":"date-time","type":["string","null"],"description":"Manual grants: when it ends. Null for lifetime or Patreon."},"createdAt":{"format":"date-time","type":"string"}},"required":["provider","cadence","id","name","discordUserId","discordUsername","plan","tier","note","active","status","billedCents","monthlyCents","lifetimeCents","customBot","servers","lastChargeDate","expiresAt","createdAt"]},"SubscriptionProvider":{"type":"string","enum":["patreon","manual"]},"BillingCadence":{"type":"string","enum":["monthly","yearly","one_time"]},"SubscriberServerDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"The server's current name when ClashPerk is in it, or the name when it was added."},"iconUrl":{"type":["string","null"],"description":"Null without an icon or when ClashPerk isn't in the server."},"clanLimit":{"type":"number","description":"Clans this subscription lets the server have logs for."}},"required":["id","name","iconUrl","clanLimit"]}}}}
```

## The SubscribersDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"SubscribersDto":{"type":"object","properties":{"subscribers":{"type":"array","items":{"$ref":"#/components/schemas/SubscriberDto"}}},"required":["subscribers"]},"SubscriberDto":{"type":"object","properties":{"provider":{"allOf":[{"$ref":"#/components/schemas/SubscriptionProvider"}]},"cadence":{"allOf":[{"$ref":"#/components/schemas/BillingCadence"}]},"id":{"type":"string"},"name":{"type":"string"},"discordUserId":{"type":["string","null"],"description":"The Discord account that redeemed it. Null until someone does."},"discordUsername":{"type":["string","null"]},"plan":{"type":["string","null"],"description":"Bronze, silver or gold. Null for special tiers or an unknown reward."},"tier":{"type":["string","null"],"description":"A special tier such as `lifetime` or `gifted`."},"note":{"type":["string","null"],"description":"Manual grants: where it was paid and the payment's reference."},"active":{"type":"boolean"},"status":{"type":["string","null"],"description":"The provider's own status, e.g. `active_patron` or `declined_patron`."},"billedCents":{"type":"number","description":"What each charge bills, for a month or a year, or a manual grant's last payment."},"monthlyCents":{"type":"number","description":"The charge spread per month, estimated for yearly plans and manual grants."},"lifetimeCents":{"type":"number"},"customBot":{"type":"boolean"},"servers":{"type":"array","items":{"$ref":"#/components/schemas/SubscriberServerDto"}},"lastChargeDate":{"format":"date-time","type":["string","null"]},"expiresAt":{"format":"date-time","type":["string","null"],"description":"Manual grants: when it ends. Null for lifetime or Patreon."},"createdAt":{"format":"date-time","type":"string"}},"required":["provider","cadence","id","name","discordUserId","discordUsername","plan","tier","note","active","status","billedCents","monthlyCents","lifetimeCents","customBot","servers","lastChargeDate","expiresAt","createdAt"]},"SubscriptionProvider":{"type":"string","enum":["patreon","manual"]},"BillingCadence":{"type":"string","enum":["monthly","yearly","one_time"]},"SubscriberServerDto":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"The server's current name when ClashPerk is in it, or the name when it was added."},"iconUrl":{"type":["string","null"],"description":"Null without an icon or when ClashPerk isn't in the server."},"clanLimit":{"type":"number","description":"Clans this subscription lets the server have logs for."}},"required":["id","name","iconUrl","clanLimit"]}}}}
```

## The SubscriptionPlan object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"SubscriptionPlan":{"type":"string","enum":["bronze","silver","gold","gifted","sponsored","sponsored_custom_bot","lifetime","lifetime_custom_bot"]}}}}
```

## The PaymentSource object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"PaymentSource":{"type":"string","enum":["patreon","ko-fi","buymeacoffee","paypal","other"]}}}}
```

## The SubscriptionPaymentInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"SubscriptionPaymentInput":{"type":"object","properties":{"source":{"allOf":[{"$ref":"#/components/schemas/PaymentSource"}]},"reference":{"type":"string","description":"The transaction ID or receipt link.","minLength":1,"maxLength":200},"amountCents":{"type":"number","description":"What was paid, in US cents.","minimum":0,"maximum":1000000}},"required":["source","amountCents"]},"PaymentSource":{"type":"string","enum":["patreon","ko-fi","buymeacoffee","paypal","other"]}}}}
```

## The GrantSubscriptionInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"GrantSubscriptionInput":{"type":"object","properties":{"plan":{"allOf":[{"$ref":"#/components/schemas/SubscriptionPlan"}]},"discordUserId":{"type":"string"},"name":{"type":"string","description":"Who paid, as the payment shows it.","minLength":1,"maxLength":100},"email":{"type":"string","format":"email"},"payment":{"$ref":"#/components/schemas/SubscriptionPaymentInput"},"expiresAt":{"type":["string","null"],"description":"ISO time it ends, in the future. Null for lifetime."},"serverIds":{"description":"Servers to cover now. The user can add the rest with /redeem.","maxItems":10,"type":"array","items":{"type":"string"}}},"required":["plan","discordUserId","name","payment","expiresAt"]},"SubscriptionPlan":{"type":"string","enum":["bronze","silver","gold","gifted","sponsored","sponsored_custom_bot","lifetime","lifetime_custom_bot"]},"SubscriptionPaymentInput":{"type":"object","properties":{"source":{"allOf":[{"$ref":"#/components/schemas/PaymentSource"}]},"reference":{"type":"string","description":"The transaction ID or receipt link.","minLength":1,"maxLength":200},"amountCents":{"type":"number","description":"What was paid, in US cents.","minimum":0,"maximum":1000000}},"required":["source","amountCents"]},"PaymentSource":{"type":"string","enum":["patreon","ko-fi","buymeacoffee","paypal","other"]}}}}
```

## The UpdateSubscriptionInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"UpdateSubscriptionInput":{"type":"object","properties":{"plan":{"allOf":[{"$ref":"#/components/schemas/SubscriptionPlan"}]},"expiresAt":{"type":["string","null"],"description":"ISO time it ends. Null for lifetime. A past time ends it now."},"payment":{"description":"A new payment, such as a renewal. It's added to the lifetime total.","allOf":[{"$ref":"#/components/schemas/SubscriptionPaymentInput"}]},"addServerIds":{"maxItems":10,"type":"array","items":{"type":"string"}}}},"SubscriptionPlan":{"type":"string","enum":["bronze","silver","gold","gifted","sponsored","sponsored_custom_bot","lifetime","lifetime_custom_bot"]},"SubscriptionPaymentInput":{"type":"object","properties":{"source":{"allOf":[{"$ref":"#/components/schemas/PaymentSource"}]},"reference":{"type":"string","description":"The transaction ID or receipt link.","minLength":1,"maxLength":200},"amountCents":{"type":"number","description":"What was paid, in US cents.","minimum":0,"maximum":1000000}},"required":["source","amountCents"]},"PaymentSource":{"type":"string","enum":["patreon","ko-fi","buymeacoffee","paypal","other"]}}}}
```

## The DeveloperDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"DeveloperDto":{"type":"object","properties":{"roles":{"type":"array","items":{"$ref":"#/components/schemas/UserRoles"}},"userId":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"isBot":{"type":"boolean"},"createdAt":{"format":"date-time","type":["string","null"],"description":"Null for accounts made before it was recorded."},"lastLoginAt":{"format":"date-time","type":["string","null"]}},"required":["roles","userId","username","displayName","isBot","createdAt","lastLoginAt"]},"UserRoles":{"type":"string","enum":["user","admin","viewer","fetch:wars","fetch:clans","fetch:players","fetch:legends","fetch:links","manage:links","fetch:rosters","manage:rosters","manage:reminders"]}}}}
```

## The DevelopersDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"DevelopersDto":{"type":"object","properties":{"developers":{"type":"array","items":{"$ref":"#/components/schemas/DeveloperDto"}}},"required":["developers"]},"DeveloperDto":{"type":"object","properties":{"roles":{"type":"array","items":{"$ref":"#/components/schemas/UserRoles"}},"userId":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"isBot":{"type":"boolean"},"createdAt":{"format":"date-time","type":["string","null"],"description":"Null for accounts made before it was recorded."},"lastLoginAt":{"format":"date-time","type":["string","null"]}},"required":["roles","userId","username","displayName","isBot","createdAt","lastLoginAt"]},"UserRoles":{"type":"string","enum":["user","admin","viewer","fetch:wars","fetch:clans","fetch:players","fetch:legends","fetch:links","manage:links","fetch:rosters","manage:rosters","manage:reminders"]}}}}
```

## The AddDeveloperInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"AddDeveloperInput":{"type":"object","properties":{"roles":{"minItems":1,"maxItems":11,"type":"array","items":{"$ref":"#/components/schemas/UserRoles"}},"userId":{"type":"string","pattern":"^\\d{17,20}$"}},"required":["roles","userId"]},"UserRoles":{"type":"string","enum":["user","admin","viewer","fetch:wars","fetch:clans","fetch:players","fetch:legends","fetch:links","manage:links","fetch:rosters","manage:rosters","manage:reminders"]}}}}
```

## The AddedDeveloperDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"AddedDeveloperDto":{"type":"object","properties":{"developer":{"$ref":"#/components/schemas/DeveloperDto"},"passKey":{"type":"string","description":"Shown only once. Sign in with it at /auth/login."}},"required":["developer","passKey"]},"DeveloperDto":{"type":"object","properties":{"roles":{"type":"array","items":{"$ref":"#/components/schemas/UserRoles"}},"userId":{"type":"string"},"username":{"type":"string"},"displayName":{"type":"string"},"isBot":{"type":"boolean"},"createdAt":{"format":"date-time","type":["string","null"],"description":"Null for accounts made before it was recorded."},"lastLoginAt":{"format":"date-time","type":["string","null"]}},"required":["roles","userId","username","displayName","isBot","createdAt","lastLoginAt"]},"UserRoles":{"type":"string","enum":["user","admin","viewer","fetch:wars","fetch:clans","fetch:players","fetch:legends","fetch:links","manage:links","fetch:rosters","manage:rosters","manage:reminders"]}}}}
```

## The EditDeveloperInput object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"EditDeveloperInput":{"type":"object","properties":{"roles":{"minItems":1,"maxItems":11,"type":"array","items":{"$ref":"#/components/schemas/UserRoles"}}},"required":["roles"]},"UserRoles":{"type":"string","enum":["user","admin","viewer","fetch:wars","fetch:clans","fetch:players","fetch:legends","fetch:links","manage:links","fetch:rosters","manage:rosters","manage:reminders"]}}}}
```

## The MessageOkDto object

```json
{"openapi":"3.2.0","info":{"title":"ClashPerk Discord Bot API","version":"v2.0.192"},"components":{"schemas":{"MessageOkDto":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.clashperk.com/models.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
