{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -Wno-partial-type-signatures #-}

-- | Guild endpoints
module Calamity.HTTP.Guild (
  GuildRequest (..),
  CreateGuildData (..),
  ModifyGuildData (..),
  ChannelCreateData (..),
  ChannelPosition (..),
  ListMembersOptions (..),
  AddGuildMemberData (..),
  ModifyGuildMemberData,
  modifyGuildMemberNick,
  modifyGuildMemberRoles,
  modifyGuildMemberMute,
  modifyGuildMemberDeaf,
  modifyGuildMemberChannelID,
  CreateGuildBanData (..),
  ModifyGuildRoleData,
  modifyGuildRoleName,
  modifyGuildRolePermissions,
  modifyGuildRoleColour,
  modifyGuildRoleHoist,
  modifyGuildRoleMentionable,
  ModifyGuildRolePositionsData (..),
) where

import Calamity.HTTP.Internal.Request
import Calamity.HTTP.Internal.Route
import Calamity.Internal.IntColour
import Calamity.Internal.Utils (CalamityToJSON (..), CalamityToJSON' (..), (.=), (.?=))
import Calamity.Types.Model.Channel
import Calamity.Types.Model.Guild
import Calamity.Types.Model.User
import Calamity.Types.Model.Voice
import Calamity.Types.Snowflake
import Data.Aeson qualified as Aeson
import Data.Aeson.KeyMap qualified as K
import Data.Colour (Colour)
import Data.Default.Class
import Data.Text (Text)
import Network.HTTP.Req
import Optics

data CreateGuildData = CreateGuildData
  { CreateGuildData -> Text
name :: Text
  , CreateGuildData -> Text
region :: Text
  , CreateGuildData -> Text
icon :: Text
  , CreateGuildData -> Integer
verificationLevel :: Integer -- TODO: enums for these
  , CreateGuildData -> Integer
defaultMessageNotifications :: Integer
  , CreateGuildData -> Integer
explicitContentFilter :: Integer
  , CreateGuildData -> [Role]
roles :: [Role]
  , CreateGuildData -> [Partial Channel]
channels :: [Partial Channel]
  }
  deriving (Int -> CreateGuildData -> ShowS
[CreateGuildData] -> ShowS
CreateGuildData -> String
(Int -> CreateGuildData -> ShowS)
-> (CreateGuildData -> String)
-> ([CreateGuildData] -> ShowS)
-> Show CreateGuildData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CreateGuildData -> ShowS
showsPrec :: Int -> CreateGuildData -> ShowS
$cshow :: CreateGuildData -> String
show :: CreateGuildData -> String
$cshowList :: [CreateGuildData] -> ShowS
showList :: [CreateGuildData] -> ShowS
Show)
  deriving ([CreateGuildData] -> Value
[CreateGuildData] -> Encoding
CreateGuildData -> Value
CreateGuildData -> Encoding
(CreateGuildData -> Value)
-> (CreateGuildData -> Encoding)
-> ([CreateGuildData] -> Value)
-> ([CreateGuildData] -> Encoding)
-> ToJSON CreateGuildData
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
$ctoJSON :: CreateGuildData -> Value
toJSON :: CreateGuildData -> Value
$ctoEncoding :: CreateGuildData -> Encoding
toEncoding :: CreateGuildData -> Encoding
$ctoJSONList :: [CreateGuildData] -> Value
toJSONList :: [CreateGuildData] -> Value
$ctoEncodingList :: [CreateGuildData] -> Encoding
toEncodingList :: [CreateGuildData] -> Encoding
Aeson.ToJSON) via CalamityToJSON CreateGuildData

instance CalamityToJSON' CreateGuildData where
  toPairs :: forall kv. KeyValue kv => CreateGuildData -> [Maybe kv]
toPairs CreateGuildData {Integer
[Partial Channel]
[Role]
Text
$sel:name:CreateGuildData :: CreateGuildData -> Text
$sel:region:CreateGuildData :: CreateGuildData -> Text
$sel:icon:CreateGuildData :: CreateGuildData -> Text
$sel:verificationLevel:CreateGuildData :: CreateGuildData -> Integer
$sel:defaultMessageNotifications:CreateGuildData :: CreateGuildData -> Integer
$sel:explicitContentFilter:CreateGuildData :: CreateGuildData -> Integer
$sel:roles:CreateGuildData :: CreateGuildData -> [Role]
$sel:channels:CreateGuildData :: CreateGuildData -> [Partial Channel]
name :: Text
region :: Text
icon :: Text
verificationLevel :: Integer
defaultMessageNotifications :: Integer
explicitContentFilter :: Integer
roles :: [Role]
channels :: [Partial Channel]
..} =
    [ Key
"name" Key -> Text -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= Text
name
    , Key
"region" Key -> Text -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= Text
region
    , Key
"icon" Key -> Text -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= Text
icon
    , Key
"verification_level" Key -> Integer -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= Integer
verificationLevel
    , Key
"default_message_notifications" Key -> Integer -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= Integer
defaultMessageNotifications
    , Key
"explicit_content_filter" Key -> Integer -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= Integer
explicitContentFilter
    , Key
"roles" Key -> [Role] -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= [Role]
roles
    , Key
"channels" Key -> [Partial Channel] -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= [Partial Channel]
channels
    ]

data ModifyGuildData = ModifyGuildData
  { ModifyGuildData -> Maybe Text
name :: Maybe Text
  , ModifyGuildData -> Maybe Text
region :: Maybe Text
  , ModifyGuildData -> Maybe Text
icon :: Maybe Text
  , ModifyGuildData -> Maybe Integer
verificationLevel :: Maybe Integer -- TODO: enums for these
  , ModifyGuildData -> Maybe Integer
defaultMessageNotifications :: Maybe Integer
  , ModifyGuildData -> Maybe Integer
explicitContentFilter :: Maybe Integer
  , ModifyGuildData -> Maybe (Snowflake GuildChannel)
afkChannelID :: Maybe (Snowflake GuildChannel)
  , ModifyGuildData -> Maybe Integer
afkTimeout :: Maybe Integer
  , ModifyGuildData -> Maybe (Snowflake User)
ownerID :: Maybe (Snowflake User)
  , ModifyGuildData -> Maybe Text
splash :: Maybe Text
  , ModifyGuildData -> Maybe Text
banner :: Maybe Text
  , ModifyGuildData -> Maybe (Snowflake GuildChannel)
systemChannelID :: Maybe (Snowflake GuildChannel)
  }
  deriving (Int -> ModifyGuildData -> ShowS
[ModifyGuildData] -> ShowS
ModifyGuildData -> String
(Int -> ModifyGuildData -> ShowS)
-> (ModifyGuildData -> String)
-> ([ModifyGuildData] -> ShowS)
-> Show ModifyGuildData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ModifyGuildData -> ShowS
showsPrec :: Int -> ModifyGuildData -> ShowS
$cshow :: ModifyGuildData -> String
show :: ModifyGuildData -> String
$cshowList :: [ModifyGuildData] -> ShowS
showList :: [ModifyGuildData] -> ShowS
Show)
  deriving ([ModifyGuildData] -> Value
[ModifyGuildData] -> Encoding
ModifyGuildData -> Value
ModifyGuildData -> Encoding
(ModifyGuildData -> Value)
-> (ModifyGuildData -> Encoding)
-> ([ModifyGuildData] -> Value)
-> ([ModifyGuildData] -> Encoding)
-> ToJSON ModifyGuildData
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
$ctoJSON :: ModifyGuildData -> Value
toJSON :: ModifyGuildData -> Value
$ctoEncoding :: ModifyGuildData -> Encoding
toEncoding :: ModifyGuildData -> Encoding
$ctoJSONList :: [ModifyGuildData] -> Value
toJSONList :: [ModifyGuildData] -> Value
$ctoEncodingList :: [ModifyGuildData] -> Encoding
toEncodingList :: [ModifyGuildData] -> Encoding
Aeson.ToJSON) via CalamityToJSON ModifyGuildData

instance Default ModifyGuildData where
  def :: ModifyGuildData
def =
    Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Integer
-> Maybe Integer
-> Maybe Integer
-> Maybe (Snowflake GuildChannel)
-> Maybe Integer
-> Maybe (Snowflake User)
-> Maybe Text
-> Maybe Text
-> Maybe (Snowflake GuildChannel)
-> ModifyGuildData
ModifyGuildData
      Maybe Text
forall a. Maybe a
Nothing
      Maybe Text
forall a. Maybe a
Nothing
      Maybe Text
forall a. Maybe a
Nothing
      Maybe Integer
forall a. Maybe a
Nothing
      Maybe Integer
forall a. Maybe a
Nothing
      Maybe Integer
forall a. Maybe a
Nothing
      Maybe (Snowflake GuildChannel)
forall a. Maybe a
Nothing
      Maybe Integer
forall a. Maybe a
Nothing
      Maybe (Snowflake User)
forall a. Maybe a
Nothing
      Maybe Text
forall a. Maybe a
Nothing
      Maybe Text
forall a. Maybe a
Nothing
      Maybe (Snowflake GuildChannel)
forall a. Maybe a
Nothing

-- TODO: Make this work properly, a la modifyguildmember
instance CalamityToJSON' ModifyGuildData where
  toPairs :: forall kv. KeyValue kv => ModifyGuildData -> [Maybe kv]
toPairs ModifyGuildData {Maybe Integer
Maybe Text
Maybe (Snowflake User)
Maybe (Snowflake GuildChannel)
$sel:name:ModifyGuildData :: ModifyGuildData -> Maybe Text
$sel:region:ModifyGuildData :: ModifyGuildData -> Maybe Text
$sel:icon:ModifyGuildData :: ModifyGuildData -> Maybe Text
$sel:verificationLevel:ModifyGuildData :: ModifyGuildData -> Maybe Integer
$sel:defaultMessageNotifications:ModifyGuildData :: ModifyGuildData -> Maybe Integer
$sel:explicitContentFilter:ModifyGuildData :: ModifyGuildData -> Maybe Integer
$sel:afkChannelID:ModifyGuildData :: ModifyGuildData -> Maybe (Snowflake GuildChannel)
$sel:afkTimeout:ModifyGuildData :: ModifyGuildData -> Maybe Integer
$sel:ownerID:ModifyGuildData :: ModifyGuildData -> Maybe (Snowflake User)
$sel:splash:ModifyGuildData :: ModifyGuildData -> Maybe Text
$sel:banner:ModifyGuildData :: ModifyGuildData -> Maybe Text
$sel:systemChannelID:ModifyGuildData :: ModifyGuildData -> Maybe (Snowflake GuildChannel)
name :: Maybe Text
region :: Maybe Text
icon :: Maybe Text
verificationLevel :: Maybe Integer
defaultMessageNotifications :: Maybe Integer
explicitContentFilter :: Maybe Integer
afkChannelID :: Maybe (Snowflake GuildChannel)
afkTimeout :: Maybe Integer
ownerID :: Maybe (Snowflake User)
splash :: Maybe Text
banner :: Maybe Text
systemChannelID :: Maybe (Snowflake GuildChannel)
..} =
    [ Key
"name" Key -> Maybe Text -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Text
name
    , Key
"region" Key -> Maybe Text -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Text
region
    , Key
"icon" Key -> Maybe Text -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Text
icon
    , Key
"verification_level" Key -> Maybe Integer -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Integer
verificationLevel
    , Key
"default_message_notifications" Key -> Maybe Integer -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Integer
defaultMessageNotifications
    , Key
"explicit_content_filter" Key -> Maybe Integer -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Integer
explicitContentFilter
    , Key
"afk_timeout" Key -> Maybe Integer -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Integer
afkTimeout
    , Key
"owner_id" Key -> Maybe (Snowflake User) -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe (Snowflake User)
ownerID
    , Key
"splash" Key -> Maybe Text -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Text
splash
    , Key
"banner" Key -> Maybe Text -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Text
banner
    , Key
"system_channel_id" Key -> Maybe (Snowflake GuildChannel) -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe (Snowflake GuildChannel)
systemChannelID
    ]

data ChannelCreateData = ChannelCreateData
  { ChannelCreateData -> Text
name :: Text
  , ChannelCreateData -> Maybe ChannelType
type_ :: Maybe ChannelType
  , ChannelCreateData -> Maybe Text
topic :: Maybe Text
  , ChannelCreateData -> Maybe Integer
bitrate :: Maybe Integer
  , ChannelCreateData -> Maybe Integer
userLimit :: Maybe Integer
  , ChannelCreateData -> Maybe Integer
rateLimitPerUser :: Maybe Integer
  , ChannelCreateData -> Maybe Integer
position :: Maybe Integer
  , ChannelCreateData -> Maybe [Overwrite]
permissionOverwrites :: Maybe [Overwrite]
  , ChannelCreateData -> Maybe (Snowflake Category)
parentID :: Maybe (Snowflake Category)
  , ChannelCreateData -> Maybe Bool
nsfw :: Maybe Bool
  }
  deriving (Int -> ChannelCreateData -> ShowS
[ChannelCreateData] -> ShowS
ChannelCreateData -> String
(Int -> ChannelCreateData -> ShowS)
-> (ChannelCreateData -> String)
-> ([ChannelCreateData] -> ShowS)
-> Show ChannelCreateData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ChannelCreateData -> ShowS
showsPrec :: Int -> ChannelCreateData -> ShowS
$cshow :: ChannelCreateData -> String
show :: ChannelCreateData -> String
$cshowList :: [ChannelCreateData] -> ShowS
showList :: [ChannelCreateData] -> ShowS
Show)
  deriving ([ChannelCreateData] -> Value
[ChannelCreateData] -> Encoding
ChannelCreateData -> Value
ChannelCreateData -> Encoding
(ChannelCreateData -> Value)
-> (ChannelCreateData -> Encoding)
-> ([ChannelCreateData] -> Value)
-> ([ChannelCreateData] -> Encoding)
-> ToJSON ChannelCreateData
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
$ctoJSON :: ChannelCreateData -> Value
toJSON :: ChannelCreateData -> Value
$ctoEncoding :: ChannelCreateData -> Encoding
toEncoding :: ChannelCreateData -> Encoding
$ctoJSONList :: [ChannelCreateData] -> Value
toJSONList :: [ChannelCreateData] -> Value
$ctoEncodingList :: [ChannelCreateData] -> Encoding
toEncodingList :: [ChannelCreateData] -> Encoding
Aeson.ToJSON) via CalamityToJSON ChannelCreateData

instance CalamityToJSON' ChannelCreateData where
  toPairs :: forall kv. KeyValue kv => ChannelCreateData -> [Maybe kv]
toPairs ChannelCreateData {Maybe Bool
Maybe Integer
Maybe [Overwrite]
Maybe Text
Maybe ChannelType
Maybe (Snowflake Category)
Text
$sel:name:ChannelCreateData :: ChannelCreateData -> Text
$sel:type_:ChannelCreateData :: ChannelCreateData -> Maybe ChannelType
$sel:topic:ChannelCreateData :: ChannelCreateData -> Maybe Text
$sel:bitrate:ChannelCreateData :: ChannelCreateData -> Maybe Integer
$sel:userLimit:ChannelCreateData :: ChannelCreateData -> Maybe Integer
$sel:rateLimitPerUser:ChannelCreateData :: ChannelCreateData -> Maybe Integer
$sel:position:ChannelCreateData :: ChannelCreateData -> Maybe Integer
$sel:permissionOverwrites:ChannelCreateData :: ChannelCreateData -> Maybe [Overwrite]
$sel:parentID:ChannelCreateData :: ChannelCreateData -> Maybe (Snowflake Category)
$sel:nsfw:ChannelCreateData :: ChannelCreateData -> Maybe Bool
name :: Text
type_ :: Maybe ChannelType
topic :: Maybe Text
bitrate :: Maybe Integer
userLimit :: Maybe Integer
rateLimitPerUser :: Maybe Integer
position :: Maybe Integer
permissionOverwrites :: Maybe [Overwrite]
parentID :: Maybe (Snowflake Category)
nsfw :: Maybe Bool
..} =
    [ Key
"name" Key -> Text -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= Text
name
    , Key
"type" Key -> Maybe ChannelType -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe ChannelType
type_
    , Key
"topic" Key -> Maybe Text -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Text
topic
    , Key
"bitrate" Key -> Maybe Integer -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Integer
bitrate
    , Key
"user_limit" Key -> Maybe Integer -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Integer
userLimit
    , Key
"rate_limit_per_user" Key -> Maybe Integer -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Integer
rateLimitPerUser
    , Key
"position" Key -> Maybe Integer -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Integer
position
    , Key
"permission_overwrites" Key -> Maybe [Overwrite] -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe [Overwrite]
permissionOverwrites
    , Key
"parent_id" Key -> Maybe (Snowflake Category) -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe (Snowflake Category)
parentID
    , Key
"nsfw" Key -> Maybe Bool -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Bool
nsfw
    ]

data ChannelPosition = ChannelPosition
  { ChannelPosition -> Snowflake GuildChannel
id :: Snowflake GuildChannel
  , ChannelPosition -> Maybe Integer
position :: Maybe Integer
  , ChannelPosition -> Maybe Bool
lockPermissions :: Maybe Bool
  , ChannelPosition -> Snowflake GuildChannel
parentID :: Snowflake GuildChannel
  }
  deriving (Int -> ChannelPosition -> ShowS
[ChannelPosition] -> ShowS
ChannelPosition -> String
(Int -> ChannelPosition -> ShowS)
-> (ChannelPosition -> String)
-> ([ChannelPosition] -> ShowS)
-> Show ChannelPosition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ChannelPosition -> ShowS
showsPrec :: Int -> ChannelPosition -> ShowS
$cshow :: ChannelPosition -> String
show :: ChannelPosition -> String
$cshowList :: [ChannelPosition] -> ShowS
showList :: [ChannelPosition] -> ShowS
Show)
  deriving ([ChannelPosition] -> Value
[ChannelPosition] -> Encoding
ChannelPosition -> Value
ChannelPosition -> Encoding
(ChannelPosition -> Value)
-> (ChannelPosition -> Encoding)
-> ([ChannelPosition] -> Value)
-> ([ChannelPosition] -> Encoding)
-> ToJSON ChannelPosition
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
$ctoJSON :: ChannelPosition -> Value
toJSON :: ChannelPosition -> Value
$ctoEncoding :: ChannelPosition -> Encoding
toEncoding :: ChannelPosition -> Encoding
$ctoJSONList :: [ChannelPosition] -> Value
toJSONList :: [ChannelPosition] -> Value
$ctoEncodingList :: [ChannelPosition] -> Encoding
toEncodingList :: [ChannelPosition] -> Encoding
Aeson.ToJSON) via CalamityToJSON ChannelPosition

instance CalamityToJSON' ChannelPosition where
  toPairs :: forall kv. KeyValue kv => ChannelPosition -> [Maybe kv]
toPairs ChannelPosition {Maybe Bool
Maybe Integer
Snowflake GuildChannel
$sel:id:ChannelPosition :: ChannelPosition -> Snowflake GuildChannel
$sel:position:ChannelPosition :: ChannelPosition -> Maybe Integer
$sel:lockPermissions:ChannelPosition :: ChannelPosition -> Maybe Bool
$sel:parentID:ChannelPosition :: ChannelPosition -> Snowflake GuildChannel
id :: Snowflake GuildChannel
position :: Maybe Integer
lockPermissions :: Maybe Bool
parentID :: Snowflake GuildChannel
..} =
    [ Key
"id" Key -> Snowflake GuildChannel -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= Snowflake GuildChannel
id
    , Key
"position" Key -> Maybe Integer -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= Maybe Integer
position
    , Key
"lock_permissions" Key -> Maybe Bool -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= Maybe Bool
lockPermissions
    , Key
"parent_id" Key -> Snowflake GuildChannel -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= Snowflake GuildChannel
parentID
    ]

data ListMembersOptions = ListMembersOptions
  { ListMembersOptions -> Maybe Integer
limit :: Maybe Integer
  , ListMembersOptions -> Maybe (Snowflake User)
after :: Maybe (Snowflake User)
  }
  deriving (Int -> ListMembersOptions -> ShowS
[ListMembersOptions] -> ShowS
ListMembersOptions -> String
(Int -> ListMembersOptions -> ShowS)
-> (ListMembersOptions -> String)
-> ([ListMembersOptions] -> ShowS)
-> Show ListMembersOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ListMembersOptions -> ShowS
showsPrec :: Int -> ListMembersOptions -> ShowS
$cshow :: ListMembersOptions -> String
show :: ListMembersOptions -> String
$cshowList :: [ListMembersOptions] -> ShowS
showList :: [ListMembersOptions] -> ShowS
Show)
  deriving ([ListMembersOptions] -> Value
[ListMembersOptions] -> Encoding
ListMembersOptions -> Value
ListMembersOptions -> Encoding
(ListMembersOptions -> Value)
-> (ListMembersOptions -> Encoding)
-> ([ListMembersOptions] -> Value)
-> ([ListMembersOptions] -> Encoding)
-> ToJSON ListMembersOptions
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
$ctoJSON :: ListMembersOptions -> Value
toJSON :: ListMembersOptions -> Value
$ctoEncoding :: ListMembersOptions -> Encoding
toEncoding :: ListMembersOptions -> Encoding
$ctoJSONList :: [ListMembersOptions] -> Value
toJSONList :: [ListMembersOptions] -> Value
$ctoEncodingList :: [ListMembersOptions] -> Encoding
toEncodingList :: [ListMembersOptions] -> Encoding
Aeson.ToJSON) via CalamityToJSON ListMembersOptions

instance Default ListMembersOptions where
  def :: ListMembersOptions
def = Maybe Integer -> Maybe (Snowflake User) -> ListMembersOptions
ListMembersOptions Maybe Integer
forall a. Maybe a
Nothing Maybe (Snowflake User)
forall a. Maybe a
Nothing

instance CalamityToJSON' ListMembersOptions where
  toPairs :: forall kv. KeyValue kv => ListMembersOptions -> [Maybe kv]
toPairs ListMembersOptions {Maybe Integer
Maybe (Snowflake User)
$sel:limit:ListMembersOptions :: ListMembersOptions -> Maybe Integer
$sel:after:ListMembersOptions :: ListMembersOptions -> Maybe (Snowflake User)
limit :: Maybe Integer
after :: Maybe (Snowflake User)
..} =
    [ Key
"limit" Key -> Maybe Integer -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Integer
limit
    , Key
"after" Key -> Maybe (Snowflake User) -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe (Snowflake User)
after
    ]

data SearchMembersOptions = SearchMembersOptions
  { SearchMembersOptions -> Maybe Integer
limit :: Maybe Integer
  , SearchMembersOptions -> Text
query :: Text
  }
  deriving (Int -> SearchMembersOptions -> ShowS
[SearchMembersOptions] -> ShowS
SearchMembersOptions -> String
(Int -> SearchMembersOptions -> ShowS)
-> (SearchMembersOptions -> String)
-> ([SearchMembersOptions] -> ShowS)
-> Show SearchMembersOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SearchMembersOptions -> ShowS
showsPrec :: Int -> SearchMembersOptions -> ShowS
$cshow :: SearchMembersOptions -> String
show :: SearchMembersOptions -> String
$cshowList :: [SearchMembersOptions] -> ShowS
showList :: [SearchMembersOptions] -> ShowS
Show)
  deriving ([SearchMembersOptions] -> Value
[SearchMembersOptions] -> Encoding
SearchMembersOptions -> Value
SearchMembersOptions -> Encoding
(SearchMembersOptions -> Value)
-> (SearchMembersOptions -> Encoding)
-> ([SearchMembersOptions] -> Value)
-> ([SearchMembersOptions] -> Encoding)
-> ToJSON SearchMembersOptions
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
$ctoJSON :: SearchMembersOptions -> Value
toJSON :: SearchMembersOptions -> Value
$ctoEncoding :: SearchMembersOptions -> Encoding
toEncoding :: SearchMembersOptions -> Encoding
$ctoJSONList :: [SearchMembersOptions] -> Value
toJSONList :: [SearchMembersOptions] -> Value
$ctoEncodingList :: [SearchMembersOptions] -> Encoding
toEncodingList :: [SearchMembersOptions] -> Encoding
Aeson.ToJSON) via CalamityToJSON SearchMembersOptions

instance CalamityToJSON' SearchMembersOptions where
  toPairs :: forall kv. KeyValue kv => SearchMembersOptions -> [Maybe kv]
toPairs SearchMembersOptions {Maybe Integer
Text
$sel:limit:SearchMembersOptions :: SearchMembersOptions -> Maybe Integer
$sel:query:SearchMembersOptions :: SearchMembersOptions -> Text
limit :: Maybe Integer
query :: Text
..} =
    [ Key
"limit" Key -> Maybe Integer -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Integer
limit
    , Key
"query" Key -> Text -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= Text
query
    ]

data AddGuildMemberData = AddGuildMemberData
  { AddGuildMemberData -> Text
accessToken :: Text
  , AddGuildMemberData -> Maybe Text
nick :: Maybe Text
  , AddGuildMemberData -> Maybe [Snowflake Role]
roles :: Maybe [Snowflake Role]
  , AddGuildMemberData -> Maybe Bool
mute :: Maybe Bool
  , AddGuildMemberData -> Maybe Bool
deaf :: Maybe Bool
  }
  deriving (Int -> AddGuildMemberData -> ShowS
[AddGuildMemberData] -> ShowS
AddGuildMemberData -> String
(Int -> AddGuildMemberData -> ShowS)
-> (AddGuildMemberData -> String)
-> ([AddGuildMemberData] -> ShowS)
-> Show AddGuildMemberData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> AddGuildMemberData -> ShowS
showsPrec :: Int -> AddGuildMemberData -> ShowS
$cshow :: AddGuildMemberData -> String
show :: AddGuildMemberData -> String
$cshowList :: [AddGuildMemberData] -> ShowS
showList :: [AddGuildMemberData] -> ShowS
Show)
  deriving ([AddGuildMemberData] -> Value
[AddGuildMemberData] -> Encoding
AddGuildMemberData -> Value
AddGuildMemberData -> Encoding
(AddGuildMemberData -> Value)
-> (AddGuildMemberData -> Encoding)
-> ([AddGuildMemberData] -> Value)
-> ([AddGuildMemberData] -> Encoding)
-> ToJSON AddGuildMemberData
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
$ctoJSON :: AddGuildMemberData -> Value
toJSON :: AddGuildMemberData -> Value
$ctoEncoding :: AddGuildMemberData -> Encoding
toEncoding :: AddGuildMemberData -> Encoding
$ctoJSONList :: [AddGuildMemberData] -> Value
toJSONList :: [AddGuildMemberData] -> Value
$ctoEncodingList :: [AddGuildMemberData] -> Encoding
toEncodingList :: [AddGuildMemberData] -> Encoding
Aeson.ToJSON) via CalamityToJSON AddGuildMemberData

instance CalamityToJSON' AddGuildMemberData where
  toPairs :: forall kv. KeyValue kv => AddGuildMemberData -> [Maybe kv]
toPairs AddGuildMemberData {Maybe Bool
Maybe [Snowflake Role]
Maybe Text
Text
$sel:accessToken:AddGuildMemberData :: AddGuildMemberData -> Text
$sel:nick:AddGuildMemberData :: AddGuildMemberData -> Maybe Text
$sel:roles:AddGuildMemberData :: AddGuildMemberData -> Maybe [Snowflake Role]
$sel:mute:AddGuildMemberData :: AddGuildMemberData -> Maybe Bool
$sel:deaf:AddGuildMemberData :: AddGuildMemberData -> Maybe Bool
accessToken :: Text
nick :: Maybe Text
roles :: Maybe [Snowflake Role]
mute :: Maybe Bool
deaf :: Maybe Bool
..} =
    [ Key
"access_token" Key -> Text -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= Text
accessToken
    , Key
"nick" Key -> Maybe Text -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Text
nick
    , Key
"roles" Key -> Maybe [Snowflake Role] -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe [Snowflake Role]
roles
    , Key
"mute" Key -> Maybe Bool -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Bool
mute
    , Key
"deaf" Key -> Maybe Bool -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Bool
deaf
    ]

{- | Parameters to the Modify Guild Member endpoint.

 Use the provided methods (@modifyGuildMemberX@) to create a value with the
 field set, use the Semigroup instance to combine modifications.

 ==== Examples

 >>> encode $ modifyGuildMemberNick (Just "test") <> modifyGuildMemberDeaf Nothing
 "{\"nick\":\"test\",\"deaf\":null}"
-}
newtype ModifyGuildMemberData = ModifyGuildMemberData Aeson.Object
  deriving stock (Int -> ModifyGuildMemberData -> ShowS
[ModifyGuildMemberData] -> ShowS
ModifyGuildMemberData -> String
(Int -> ModifyGuildMemberData -> ShowS)
-> (ModifyGuildMemberData -> String)
-> ([ModifyGuildMemberData] -> ShowS)
-> Show ModifyGuildMemberData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ModifyGuildMemberData -> ShowS
showsPrec :: Int -> ModifyGuildMemberData -> ShowS
$cshow :: ModifyGuildMemberData -> String
show :: ModifyGuildMemberData -> String
$cshowList :: [ModifyGuildMemberData] -> ShowS
showList :: [ModifyGuildMemberData] -> ShowS
Show)
  deriving newtype ([ModifyGuildMemberData] -> Value
[ModifyGuildMemberData] -> Encoding
ModifyGuildMemberData -> Value
ModifyGuildMemberData -> Encoding
(ModifyGuildMemberData -> Value)
-> (ModifyGuildMemberData -> Encoding)
-> ([ModifyGuildMemberData] -> Value)
-> ([ModifyGuildMemberData] -> Encoding)
-> ToJSON ModifyGuildMemberData
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
$ctoJSON :: ModifyGuildMemberData -> Value
toJSON :: ModifyGuildMemberData -> Value
$ctoEncoding :: ModifyGuildMemberData -> Encoding
toEncoding :: ModifyGuildMemberData -> Encoding
$ctoJSONList :: [ModifyGuildMemberData] -> Value
toJSONList :: [ModifyGuildMemberData] -> Value
$ctoEncodingList :: [ModifyGuildMemberData] -> Encoding
toEncodingList :: [ModifyGuildMemberData] -> Encoding
Aeson.ToJSON, NonEmpty ModifyGuildMemberData -> ModifyGuildMemberData
ModifyGuildMemberData
-> ModifyGuildMemberData -> ModifyGuildMemberData
(ModifyGuildMemberData
 -> ModifyGuildMemberData -> ModifyGuildMemberData)
-> (NonEmpty ModifyGuildMemberData -> ModifyGuildMemberData)
-> (forall b.
    Integral b =>
    b -> ModifyGuildMemberData -> ModifyGuildMemberData)
-> Semigroup ModifyGuildMemberData
forall b.
Integral b =>
b -> ModifyGuildMemberData -> ModifyGuildMemberData
forall a.
(a -> a -> a)
-> (NonEmpty a -> a)
-> (forall b. Integral b => b -> a -> a)
-> Semigroup a
$c<> :: ModifyGuildMemberData
-> ModifyGuildMemberData -> ModifyGuildMemberData
<> :: ModifyGuildMemberData
-> ModifyGuildMemberData -> ModifyGuildMemberData
$csconcat :: NonEmpty ModifyGuildMemberData -> ModifyGuildMemberData
sconcat :: NonEmpty ModifyGuildMemberData -> ModifyGuildMemberData
$cstimes :: forall b.
Integral b =>
b -> ModifyGuildMemberData -> ModifyGuildMemberData
stimes :: forall b.
Integral b =>
b -> ModifyGuildMemberData -> ModifyGuildMemberData
Semigroup, Semigroup ModifyGuildMemberData
ModifyGuildMemberData
Semigroup ModifyGuildMemberData
-> ModifyGuildMemberData
-> (ModifyGuildMemberData
    -> ModifyGuildMemberData -> ModifyGuildMemberData)
-> ([ModifyGuildMemberData] -> ModifyGuildMemberData)
-> Monoid ModifyGuildMemberData
[ModifyGuildMemberData] -> ModifyGuildMemberData
ModifyGuildMemberData
-> ModifyGuildMemberData -> ModifyGuildMemberData
forall a.
Semigroup a -> a -> (a -> a -> a) -> ([a] -> a) -> Monoid a
$cmempty :: ModifyGuildMemberData
mempty :: ModifyGuildMemberData
$cmappend :: ModifyGuildMemberData
-> ModifyGuildMemberData -> ModifyGuildMemberData
mappend :: ModifyGuildMemberData
-> ModifyGuildMemberData -> ModifyGuildMemberData
$cmconcat :: [ModifyGuildMemberData] -> ModifyGuildMemberData
mconcat :: [ModifyGuildMemberData] -> ModifyGuildMemberData
Monoid)

modifyGuildMemberNick :: Maybe Text -> ModifyGuildMemberData
modifyGuildMemberNick :: Maybe Text -> ModifyGuildMemberData
modifyGuildMemberNick Maybe Text
v = Object -> ModifyGuildMemberData
ModifyGuildMemberData (Object -> ModifyGuildMemberData)
-> Object -> ModifyGuildMemberData
forall a b. (a -> b) -> a -> b
$ [(Key, Value)] -> Object
forall v. [(Key, v)] -> KeyMap v
K.fromList [(Key
"nick", Maybe Text -> Value
forall a. ToJSON a => a -> Value
Aeson.toJSON Maybe Text
v)]

modifyGuildMemberRoles :: Maybe [Snowflake Role] -> ModifyGuildMemberData
modifyGuildMemberRoles :: Maybe [Snowflake Role] -> ModifyGuildMemberData
modifyGuildMemberRoles Maybe [Snowflake Role]
v = Object -> ModifyGuildMemberData
ModifyGuildMemberData (Object -> ModifyGuildMemberData)
-> Object -> ModifyGuildMemberData
forall a b. (a -> b) -> a -> b
$ [(Key, Value)] -> Object
forall v. [(Key, v)] -> KeyMap v
K.fromList [(Key
"roles", Maybe [Snowflake Role] -> Value
forall a. ToJSON a => a -> Value
Aeson.toJSON Maybe [Snowflake Role]
v)]

modifyGuildMemberMute :: Maybe Bool -> ModifyGuildMemberData
modifyGuildMemberMute :: Maybe Bool -> ModifyGuildMemberData
modifyGuildMemberMute Maybe Bool
v = Object -> ModifyGuildMemberData
ModifyGuildMemberData (Object -> ModifyGuildMemberData)
-> Object -> ModifyGuildMemberData
forall a b. (a -> b) -> a -> b
$ [(Key, Value)] -> Object
forall v. [(Key, v)] -> KeyMap v
K.fromList [(Key
"mute", Maybe Bool -> Value
forall a. ToJSON a => a -> Value
Aeson.toJSON Maybe Bool
v)]

modifyGuildMemberDeaf :: Maybe Bool -> ModifyGuildMemberData
modifyGuildMemberDeaf :: Maybe Bool -> ModifyGuildMemberData
modifyGuildMemberDeaf Maybe Bool
v = Object -> ModifyGuildMemberData
ModifyGuildMemberData (Object -> ModifyGuildMemberData)
-> Object -> ModifyGuildMemberData
forall a b. (a -> b) -> a -> b
$ [(Key, Value)] -> Object
forall v. [(Key, v)] -> KeyMap v
K.fromList [(Key
"deaf", Maybe Bool -> Value
forall a. ToJSON a => a -> Value
Aeson.toJSON Maybe Bool
v)]

modifyGuildMemberChannelID :: Maybe (Snowflake VoiceChannel) -> ModifyGuildMemberData
modifyGuildMemberChannelID :: Maybe (Snowflake VoiceChannel) -> ModifyGuildMemberData
modifyGuildMemberChannelID Maybe (Snowflake VoiceChannel)
v = Object -> ModifyGuildMemberData
ModifyGuildMemberData (Object -> ModifyGuildMemberData)
-> Object -> ModifyGuildMemberData
forall a b. (a -> b) -> a -> b
$ [(Key, Value)] -> Object
forall v. [(Key, v)] -> KeyMap v
K.fromList [(Key
"channel_id", Maybe (Snowflake VoiceChannel) -> Value
forall a. ToJSON a => a -> Value
Aeson.toJSON Maybe (Snowflake VoiceChannel)
v)]

data GetGuildBansOptions = GetGuildBansOptions
  { GetGuildBansOptions -> Maybe Int
limit :: Maybe Int
  , GetGuildBansOptions -> Maybe Int
before :: Maybe Int
  , GetGuildBansOptions -> Maybe Int
after :: Maybe Int
  }
  deriving (Int -> GetGuildBansOptions -> ShowS
[GetGuildBansOptions] -> ShowS
GetGuildBansOptions -> String
(Int -> GetGuildBansOptions -> ShowS)
-> (GetGuildBansOptions -> String)
-> ([GetGuildBansOptions] -> ShowS)
-> Show GetGuildBansOptions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetGuildBansOptions -> ShowS
showsPrec :: Int -> GetGuildBansOptions -> ShowS
$cshow :: GetGuildBansOptions -> String
show :: GetGuildBansOptions -> String
$cshowList :: [GetGuildBansOptions] -> ShowS
showList :: [GetGuildBansOptions] -> ShowS
Show)

instance Default GetGuildBansOptions where
  def :: GetGuildBansOptions
def = Maybe Int -> Maybe Int -> Maybe Int -> GetGuildBansOptions
GetGuildBansOptions Maybe Int
forall a. Maybe a
Nothing Maybe Int
forall a. Maybe a
Nothing Maybe Int
forall a. Maybe a
Nothing

data CreateGuildBanData = CreateGuildBanData
  { CreateGuildBanData -> Maybe Integer
deleteMessageDays :: Maybe Integer
  , CreateGuildBanData -> Maybe Text
reason :: Maybe Text
  }
  deriving (Int -> CreateGuildBanData -> ShowS
[CreateGuildBanData] -> ShowS
CreateGuildBanData -> String
(Int -> CreateGuildBanData -> ShowS)
-> (CreateGuildBanData -> String)
-> ([CreateGuildBanData] -> ShowS)
-> Show CreateGuildBanData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CreateGuildBanData -> ShowS
showsPrec :: Int -> CreateGuildBanData -> ShowS
$cshow :: CreateGuildBanData -> String
show :: CreateGuildBanData -> String
$cshowList :: [CreateGuildBanData] -> ShowS
showList :: [CreateGuildBanData] -> ShowS
Show)

instance Default CreateGuildBanData where
  def :: CreateGuildBanData
def = Maybe Integer -> Maybe Text -> CreateGuildBanData
CreateGuildBanData Maybe Integer
forall a. Maybe a
Nothing Maybe Text
forall a. Maybe a
Nothing

{- | Parameters to the Modify Guild Role endpoint.

 Use the provided methods (@modifyGuildRoleX@) to create a value with the
 field set, use the Semigroup instance to combine parameters.

 ==== Examples

 >>> encode $ modifyGuildRoleName (Just "test") <> modifyGuildRolePermissions Nothing
 "{\"name\":\"test\",\"permissions\":null}"
-}
newtype ModifyGuildRoleData = ModifyGuildRoleData Aeson.Object
  deriving stock (Int -> ModifyGuildRoleData -> ShowS
[ModifyGuildRoleData] -> ShowS
ModifyGuildRoleData -> String
(Int -> ModifyGuildRoleData -> ShowS)
-> (ModifyGuildRoleData -> String)
-> ([ModifyGuildRoleData] -> ShowS)
-> Show ModifyGuildRoleData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ModifyGuildRoleData -> ShowS
showsPrec :: Int -> ModifyGuildRoleData -> ShowS
$cshow :: ModifyGuildRoleData -> String
show :: ModifyGuildRoleData -> String
$cshowList :: [ModifyGuildRoleData] -> ShowS
showList :: [ModifyGuildRoleData] -> ShowS
Show)
  deriving newtype ([ModifyGuildRoleData] -> Value
[ModifyGuildRoleData] -> Encoding
ModifyGuildRoleData -> Value
ModifyGuildRoleData -> Encoding
(ModifyGuildRoleData -> Value)
-> (ModifyGuildRoleData -> Encoding)
-> ([ModifyGuildRoleData] -> Value)
-> ([ModifyGuildRoleData] -> Encoding)
-> ToJSON ModifyGuildRoleData
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
$ctoJSON :: ModifyGuildRoleData -> Value
toJSON :: ModifyGuildRoleData -> Value
$ctoEncoding :: ModifyGuildRoleData -> Encoding
toEncoding :: ModifyGuildRoleData -> Encoding
$ctoJSONList :: [ModifyGuildRoleData] -> Value
toJSONList :: [ModifyGuildRoleData] -> Value
$ctoEncodingList :: [ModifyGuildRoleData] -> Encoding
toEncodingList :: [ModifyGuildRoleData] -> Encoding
Aeson.ToJSON, NonEmpty ModifyGuildRoleData -> ModifyGuildRoleData
ModifyGuildRoleData -> ModifyGuildRoleData -> ModifyGuildRoleData
(ModifyGuildRoleData -> ModifyGuildRoleData -> ModifyGuildRoleData)
-> (NonEmpty ModifyGuildRoleData -> ModifyGuildRoleData)
-> (forall b.
    Integral b =>
    b -> ModifyGuildRoleData -> ModifyGuildRoleData)
-> Semigroup ModifyGuildRoleData
forall b.
Integral b =>
b -> ModifyGuildRoleData -> ModifyGuildRoleData
forall a.
(a -> a -> a)
-> (NonEmpty a -> a)
-> (forall b. Integral b => b -> a -> a)
-> Semigroup a
$c<> :: ModifyGuildRoleData -> ModifyGuildRoleData -> ModifyGuildRoleData
<> :: ModifyGuildRoleData -> ModifyGuildRoleData -> ModifyGuildRoleData
$csconcat :: NonEmpty ModifyGuildRoleData -> ModifyGuildRoleData
sconcat :: NonEmpty ModifyGuildRoleData -> ModifyGuildRoleData
$cstimes :: forall b.
Integral b =>
b -> ModifyGuildRoleData -> ModifyGuildRoleData
stimes :: forall b.
Integral b =>
b -> ModifyGuildRoleData -> ModifyGuildRoleData
Semigroup, Semigroup ModifyGuildRoleData
ModifyGuildRoleData
Semigroup ModifyGuildRoleData
-> ModifyGuildRoleData
-> (ModifyGuildRoleData
    -> ModifyGuildRoleData -> ModifyGuildRoleData)
-> ([ModifyGuildRoleData] -> ModifyGuildRoleData)
-> Monoid ModifyGuildRoleData
[ModifyGuildRoleData] -> ModifyGuildRoleData
ModifyGuildRoleData -> ModifyGuildRoleData -> ModifyGuildRoleData
forall a.
Semigroup a -> a -> (a -> a -> a) -> ([a] -> a) -> Monoid a
$cmempty :: ModifyGuildRoleData
mempty :: ModifyGuildRoleData
$cmappend :: ModifyGuildRoleData -> ModifyGuildRoleData -> ModifyGuildRoleData
mappend :: ModifyGuildRoleData -> ModifyGuildRoleData -> ModifyGuildRoleData
$cmconcat :: [ModifyGuildRoleData] -> ModifyGuildRoleData
mconcat :: [ModifyGuildRoleData] -> ModifyGuildRoleData
Monoid)

modifyGuildRoleName :: Maybe Text -> ModifyGuildRoleData
modifyGuildRoleName :: Maybe Text -> ModifyGuildRoleData
modifyGuildRoleName Maybe Text
v = Object -> ModifyGuildRoleData
ModifyGuildRoleData (Object -> ModifyGuildRoleData) -> Object -> ModifyGuildRoleData
forall a b. (a -> b) -> a -> b
$ [(Key, Value)] -> Object
forall v. [(Key, v)] -> KeyMap v
K.fromList [(Key
"name", Maybe Text -> Value
forall a. ToJSON a => a -> Value
Aeson.toJSON Maybe Text
v)]

modifyGuildRolePermissions :: Maybe Permissions -> ModifyGuildRoleData
modifyGuildRolePermissions :: Maybe Permissions -> ModifyGuildRoleData
modifyGuildRolePermissions Maybe Permissions
v = Object -> ModifyGuildRoleData
ModifyGuildRoleData (Object -> ModifyGuildRoleData) -> Object -> ModifyGuildRoleData
forall a b. (a -> b) -> a -> b
$ [(Key, Value)] -> Object
forall v. [(Key, v)] -> KeyMap v
K.fromList [(Key
"permissions", Maybe Permissions -> Value
forall a. ToJSON a => a -> Value
Aeson.toJSON Maybe Permissions
v)]

modifyGuildRoleColour :: Maybe (Colour Double) -> ModifyGuildRoleData
modifyGuildRoleColour :: Maybe (Colour Double) -> ModifyGuildRoleData
modifyGuildRoleColour Maybe (Colour Double)
v = Object -> ModifyGuildRoleData
ModifyGuildRoleData (Object -> ModifyGuildRoleData) -> Object -> ModifyGuildRoleData
forall a b. (a -> b) -> a -> b
$ [(Key, Value)] -> Object
forall v. [(Key, v)] -> KeyMap v
K.fromList [(Key
"colour", Maybe IntColour -> Value
forall a. ToJSON a => a -> Value
Aeson.toJSON (Colour Double -> IntColour
IntColour (Colour Double -> IntColour)
-> Maybe (Colour Double) -> Maybe IntColour
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Maybe (Colour Double)
v))]

modifyGuildRoleHoist :: Maybe Bool -> ModifyGuildRoleData
modifyGuildRoleHoist :: Maybe Bool -> ModifyGuildRoleData
modifyGuildRoleHoist Maybe Bool
v = Object -> ModifyGuildRoleData
ModifyGuildRoleData (Object -> ModifyGuildRoleData) -> Object -> ModifyGuildRoleData
forall a b. (a -> b) -> a -> b
$ [(Key, Value)] -> Object
forall v. [(Key, v)] -> KeyMap v
K.fromList [(Key
"hoist", Maybe Bool -> Value
forall a. ToJSON a => a -> Value
Aeson.toJSON Maybe Bool
v)]

modifyGuildRoleMentionable :: Maybe Bool -> ModifyGuildRoleData
modifyGuildRoleMentionable :: Maybe Bool -> ModifyGuildRoleData
modifyGuildRoleMentionable Maybe Bool
v = Object -> ModifyGuildRoleData
ModifyGuildRoleData (Object -> ModifyGuildRoleData) -> Object -> ModifyGuildRoleData
forall a b. (a -> b) -> a -> b
$ [(Key, Value)] -> Object
forall v. [(Key, v)] -> KeyMap v
K.fromList [(Key
"mentionable", Maybe Bool -> Value
forall a. ToJSON a => a -> Value
Aeson.toJSON Maybe Bool
v)]

data ModifyGuildRolePositionsData = ModifyGuildRolePositionsData
  { ModifyGuildRolePositionsData -> Snowflake Role
id :: Snowflake Role
  , ModifyGuildRolePositionsData -> Maybe Integer
position :: Maybe Integer
  }
  deriving (Int -> ModifyGuildRolePositionsData -> ShowS
[ModifyGuildRolePositionsData] -> ShowS
ModifyGuildRolePositionsData -> String
(Int -> ModifyGuildRolePositionsData -> ShowS)
-> (ModifyGuildRolePositionsData -> String)
-> ([ModifyGuildRolePositionsData] -> ShowS)
-> Show ModifyGuildRolePositionsData
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ModifyGuildRolePositionsData -> ShowS
showsPrec :: Int -> ModifyGuildRolePositionsData -> ShowS
$cshow :: ModifyGuildRolePositionsData -> String
show :: ModifyGuildRolePositionsData -> String
$cshowList :: [ModifyGuildRolePositionsData] -> ShowS
showList :: [ModifyGuildRolePositionsData] -> ShowS
Show)
  deriving ([ModifyGuildRolePositionsData] -> Value
[ModifyGuildRolePositionsData] -> Encoding
ModifyGuildRolePositionsData -> Value
ModifyGuildRolePositionsData -> Encoding
(ModifyGuildRolePositionsData -> Value)
-> (ModifyGuildRolePositionsData -> Encoding)
-> ([ModifyGuildRolePositionsData] -> Value)
-> ([ModifyGuildRolePositionsData] -> Encoding)
-> ToJSON ModifyGuildRolePositionsData
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
$ctoJSON :: ModifyGuildRolePositionsData -> Value
toJSON :: ModifyGuildRolePositionsData -> Value
$ctoEncoding :: ModifyGuildRolePositionsData -> Encoding
toEncoding :: ModifyGuildRolePositionsData -> Encoding
$ctoJSONList :: [ModifyGuildRolePositionsData] -> Value
toJSONList :: [ModifyGuildRolePositionsData] -> Value
$ctoEncodingList :: [ModifyGuildRolePositionsData] -> Encoding
toEncodingList :: [ModifyGuildRolePositionsData] -> Encoding
Aeson.ToJSON) via CalamityToJSON ModifyGuildRolePositionsData

instance CalamityToJSON' ModifyGuildRolePositionsData where
  toPairs :: forall kv.
KeyValue kv =>
ModifyGuildRolePositionsData -> [Maybe kv]
toPairs ModifyGuildRolePositionsData {Maybe Integer
Snowflake Role
$sel:id:ModifyGuildRolePositionsData :: ModifyGuildRolePositionsData -> Snowflake Role
$sel:position:ModifyGuildRolePositionsData :: ModifyGuildRolePositionsData -> Maybe Integer
id :: Snowflake Role
position :: Maybe Integer
..} =
    [ Key
"id" Key -> Snowflake Role -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> v -> Maybe kv
.= Snowflake Role
id
    , Key
"postition" Key -> Maybe Integer -> Maybe kv
forall v kv. (ToJSON v, KeyValue kv) => Key -> Maybe v -> Maybe kv
.?= Maybe Integer
position
    ]

data GuildRequest a where
  CreateGuild :: CreateGuildData -> GuildRequest Guild
  GetGuild :: HasID Guild g => g -> GuildRequest Guild
  ModifyGuild :: HasID Guild g => g -> ModifyGuildData -> GuildRequest Guild
  DeleteGuild :: HasID Guild g => g -> GuildRequest ()
  GetGuildChannels :: HasID Guild g => g -> GuildRequest [Channel]
  CreateGuildChannel :: HasID Guild g => g -> ChannelCreateData -> GuildRequest Channel
  ModifyGuildChannelPositions :: HasID Guild g => g -> [ChannelPosition] -> GuildRequest ()
  GetGuildMember :: (HasID Guild g, HasID User u) => g -> u -> GuildRequest Member
  ListGuildMembers :: HasID Guild g => g -> ListMembersOptions -> GuildRequest [Member]
  SearchGuildMembers :: HasID Guild g => g -> SearchMembersOptions -> GuildRequest [Member]
  AddGuildMember :: (HasID Guild g, HasID User u) => g -> u -> AddGuildMemberData -> GuildRequest (Maybe Member)
  ModifyGuildMember :: (HasID Guild g, HasID User u) => g -> u -> ModifyGuildMemberData -> GuildRequest ()
  ModifyCurrentUserNick :: HasID Guild g => g -> Maybe Text -> GuildRequest ()
  AddGuildMemberRole :: (HasID Guild g, HasID User u, HasID Role r) => g -> u -> r -> GuildRequest ()
  RemoveGuildMemberRole :: (HasID Guild g, HasID User u, HasID Role r) => g -> u -> r -> GuildRequest ()
  RemoveGuildMember :: (HasID Guild g, HasID User u) => g -> u -> GuildRequest ()
  GetGuildBans :: HasID Guild g => g -> GetGuildBansOptions -> GuildRequest [BanData]
  GetGuildBan :: (HasID Guild g, HasID User u) => g -> u -> GuildRequest BanData
  CreateGuildBan :: (HasID Guild g, HasID User u) => g -> u -> CreateGuildBanData -> GuildRequest ()
  RemoveGuildBan :: (HasID Guild g, HasID User u) => g -> u -> GuildRequest ()
  GetGuildRoles :: HasID Guild g => g -> GuildRequest [Role]
  CreateGuildRole :: HasID Guild g => g -> ModifyGuildRoleData -> GuildRequest Role
  ModifyGuildRolePositions :: HasID Guild g => g -> ModifyGuildRolePositionsData -> GuildRequest [Role]
  ModifyGuildRole :: (HasID Guild g, HasID Role r) => g -> r -> ModifyGuildRoleData -> GuildRequest Role
  DeleteGuildRole :: (HasID Guild g, HasID Role r) => g -> r -> GuildRequest ()
  GetGuildPruneCount :: HasID Guild g => g -> Integer -> GuildRequest Integer
  BeginGuildPrune :: HasID Guild g => g -> Integer -> Bool -> GuildRequest (Maybe Integer)
  GetGuildVoiceRegions :: HasID Guild g => g -> GuildRequest [VoiceRegion]
  GetGuildInvites :: HasID Guild g => g -> GuildRequest [Invite]

baseRoute :: Snowflake Guild -> RouteBuilder _
baseRoute :: Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild,
           AddRequiredInner (Lookup ('IDRequirement Guild) '[]))]
baseRoute Snowflake Guild
id =
  RouteBuilder '[]
mkRouteBuilder RouteBuilder '[] -> S -> ConsRes S '[]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"guilds" RouteBuilder '[] -> ID Guild -> ConsRes (ID Guild) '[]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// forall a. ID a
forall {k} (a :: k). ID a
ID @Guild
    RouteBuilder
  '[ '( 'IDRequirement Guild,
        AddRequiredInner (Lookup ('IDRequirement Guild) '[]))]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild,
            AddRequiredInner (Lookup ('IDRequirement Guild) '[]))]
    -> RouteBuilder
         '[ '( 'IDRequirement Guild, 'Satisfied),
            '( 'IDRequirement Guild,
               AddRequiredInner (Lookup ('IDRequirement Guild) '[]))])
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild,
           AddRequiredInner (Lookup ('IDRequirement Guild) '[]))]
forall a b. a -> (a -> b) -> b
& Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild,
           AddRequiredInner (Lookup ('IDRequirement Guild) '[]))]
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild,
           AddRequiredInner (Lookup ('IDRequirement Guild) '[]))]
forall t (reqs :: [(RequirementType, RouteRequirement)]).
Typeable t =>
Snowflake t
-> RouteBuilder reqs
-> RouteBuilder ('( 'IDRequirement t, 'Satisfied) : reqs)
giveID Snowflake Guild
id

instance Request (GuildRequest a) where
  type Result (GuildRequest a) = a

  route :: GuildRequest a -> Route
route (CreateGuild CreateGuildData
_) =
    RouteBuilder '[]
mkRouteBuilder RouteBuilder '[] -> S -> ConsRes S '[]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"guilds"
      RouteBuilder '[] -> (RouteBuilder '[] -> Route) -> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder '[] -> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (GetGuild (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid)) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid
      RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (ModifyGuild (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) ModifyGuildData
_) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid
      RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (DeleteGuild (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid)) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid
      RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (GetGuildChannels (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid)) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"channels"
      RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (CreateGuildChannel (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) ChannelCreateData
_) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"channels"
      RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (ModifyGuildChannelPositions (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) [ChannelPosition]
_) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"channels"
      RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (GetGuildMember (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall b a. HasID b a => a -> Snowflake b
getID @User -> Snowflake User
uid)) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"members" RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> ID User
-> ConsRes
     (ID User)
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// forall a. ID a
forall {k} (a :: k). ID a
ID @User
      RouteBuilder
  '[ '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement User,
            AddRequiredInner
              (Lookup
                 ('IDRequirement User)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> RouteBuilder
         '[ '( 'IDRequirement User, 'Satisfied),
            '( 'IDRequirement User,
               AddRequiredInner
                 (Lookup
                    ('IDRequirement User)
                    '[ '( 'IDRequirement Guild, 'Satisfied),
                       '( 'IDRequirement Guild, 'Required)])),
            '( 'IDRequirement Guild, 'Satisfied),
            '( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
     '[ '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
     '[ '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
     '[ '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall t (reqs :: [(RequirementType, RouteRequirement)]).
Typeable t =>
Snowflake t
-> RouteBuilder reqs
-> RouteBuilder ('( 'IDRequirement t, 'Satisfied) : reqs)
giveID Snowflake User
uid
      RouteBuilder
  '[ '( 'IDRequirement User, 'Satisfied),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement User, 'Satisfied),
         '( 'IDRequirement User,
            AddRequiredInner
              (Lookup
                 ('IDRequirement User)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement User, 'Satisfied),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (ListGuildMembers (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) ListMembersOptions
_) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"members"
      RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (SearchGuildMembers (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) SearchMembersOptions
_) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"members" RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"search"
      RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (AddGuildMember (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall b a. HasID b a => a -> Snowflake b
getID @User -> Snowflake User
uid) AddGuildMemberData
_) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"members" RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> ID User
-> ConsRes
     (ID User)
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// forall a. ID a
forall {k} (a :: k). ID a
ID @User
      RouteBuilder
  '[ '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement User,
            AddRequiredInner
              (Lookup
                 ('IDRequirement User)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> RouteBuilder
         '[ '( 'IDRequirement User, 'Satisfied),
            '( 'IDRequirement User,
               AddRequiredInner
                 (Lookup
                    ('IDRequirement User)
                    '[ '( 'IDRequirement Guild, 'Satisfied),
                       '( 'IDRequirement Guild, 'Required)])),
            '( 'IDRequirement Guild, 'Satisfied),
            '( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
     '[ '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
     '[ '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
     '[ '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall t (reqs :: [(RequirementType, RouteRequirement)]).
Typeable t =>
Snowflake t
-> RouteBuilder reqs
-> RouteBuilder ('( 'IDRequirement t, 'Satisfied) : reqs)
giveID Snowflake User
uid
      RouteBuilder
  '[ '( 'IDRequirement User, 'Satisfied),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement User, 'Satisfied),
         '( 'IDRequirement User,
            AddRequiredInner
              (Lookup
                 ('IDRequirement User)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement User, 'Satisfied),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (ModifyGuildMember (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall b a. HasID b a => a -> Snowflake b
getID @User -> Snowflake User
uid) ModifyGuildMemberData
_) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"members" RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> ID User
-> ConsRes
     (ID User)
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// forall a. ID a
forall {k} (a :: k). ID a
ID @User
      RouteBuilder
  '[ '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement User,
            AddRequiredInner
              (Lookup
                 ('IDRequirement User)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> RouteBuilder
         '[ '( 'IDRequirement User, 'Satisfied),
            '( 'IDRequirement User,
               AddRequiredInner
                 (Lookup
                    ('IDRequirement User)
                    '[ '( 'IDRequirement Guild, 'Satisfied),
                       '( 'IDRequirement Guild, 'Required)])),
            '( 'IDRequirement Guild, 'Satisfied),
            '( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
     '[ '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
     '[ '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
     '[ '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall t (reqs :: [(RequirementType, RouteRequirement)]).
Typeable t =>
Snowflake t
-> RouteBuilder reqs
-> RouteBuilder ('( 'IDRequirement t, 'Satisfied) : reqs)
giveID Snowflake User
uid
      RouteBuilder
  '[ '( 'IDRequirement User, 'Satisfied),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement User, 'Satisfied),
         '( 'IDRequirement User,
            AddRequiredInner
              (Lookup
                 ('IDRequirement User)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement User, 'Satisfied),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (ModifyCurrentUserNick (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) Maybe Text
_) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"members" RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"@me" RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"nick"
      RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (AddGuildMemberRole (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall b a. HasID b a => a -> Snowflake b
getID @User -> Snowflake User
uid) (forall b a. HasID b a => a -> Snowflake b
getID @Role -> Snowflake Role
rid)) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"members" RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> ID User
-> ConsRes
     (ID User)
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// forall a. ID a
forall {k} (a :: k). ID a
ID @User RouteBuilder
  '[ '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"roles" RouteBuilder
  '[ '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> ID Role
-> ConsRes
     (ID Role)
     '[ '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// forall a. ID a
forall {k} (a :: k). ID a
ID @Role
      RouteBuilder
  '[ '( 'IDRequirement Role,
        AddRequiredInner
          (Lookup
             ('IDRequirement Role)
             '[ '( 'IDRequirement User,
                   AddRequiredInner
                     (Lookup
                        ('IDRequirement User)
                        '[ '( 'IDRequirement Guild, 'Satisfied),
                           '( 'IDRequirement Guild, 'Required)])),
                '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Role,
            AddRequiredInner
              (Lookup
                 ('IDRequirement Role)
                 '[ '( 'IDRequirement User,
                       AddRequiredInner
                         (Lookup
                            ('IDRequirement User)
                            '[ '( 'IDRequirement Guild, 'Satisfied),
                               '( 'IDRequirement Guild, 'Required)])),
                    '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement User,
            AddRequiredInner
              (Lookup
                 ('IDRequirement User)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> RouteBuilder
         '[ '( 'IDRequirement User, 'Satisfied),
            '( 'IDRequirement Role,
               AddRequiredInner
                 (Lookup
                    ('IDRequirement Role)
                    '[ '( 'IDRequirement User,
                          AddRequiredInner
                            (Lookup
                               ('IDRequirement User)
                               '[ '( 'IDRequirement Guild, 'Satisfied),
                                  '( 'IDRequirement Guild, 'Required)])),
                       '( 'IDRequirement Guild, 'Satisfied),
                       '( 'IDRequirement Guild, 'Required)])),
            '( 'IDRequirement User,
               AddRequiredInner
                 (Lookup
                    ('IDRequirement User)
                    '[ '( 'IDRequirement Guild, 'Satisfied),
                       '( 'IDRequirement Guild, 'Required)])),
            '( 'IDRequirement Guild, 'Satisfied),
            '( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
     '[ '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement Role,
           AddRequiredInner
             (Lookup
                ('IDRequirement Role)
                '[ '( 'IDRequirement User,
                      AddRequiredInner
                        (Lookup
                           ('IDRequirement User)
                           '[ '( 'IDRequirement Guild, 'Satisfied),
                              '( 'IDRequirement Guild, 'Required)])),
                   '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
     '[ '( 'IDRequirement Role,
           AddRequiredInner
             (Lookup
                ('IDRequirement Role)
                '[ '( 'IDRequirement User,
                      AddRequiredInner
                        (Lookup
                           ('IDRequirement User)
                           '[ '( 'IDRequirement Guild, 'Satisfied),
                              '( 'IDRequirement Guild, 'Required)])),
                   '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
     '[ '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement Role,
           AddRequiredInner
             (Lookup
                ('IDRequirement Role)
                '[ '( 'IDRequirement User,
                      AddRequiredInner
                        (Lookup
                           ('IDRequirement User)
                           '[ '( 'IDRequirement Guild, 'Satisfied),
                              '( 'IDRequirement Guild, 'Required)])),
                   '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall t (reqs :: [(RequirementType, RouteRequirement)]).
Typeable t =>
Snowflake t
-> RouteBuilder reqs
-> RouteBuilder ('( 'IDRequirement t, 'Satisfied) : reqs)
giveID Snowflake User
uid
      RouteBuilder
  '[ '( 'IDRequirement User, 'Satisfied),
     '( 'IDRequirement Role,
        AddRequiredInner
          (Lookup
             ('IDRequirement Role)
             '[ '( 'IDRequirement User,
                   AddRequiredInner
                     (Lookup
                        ('IDRequirement User)
                        '[ '( 'IDRequirement Guild, 'Satisfied),
                           '( 'IDRequirement Guild, 'Required)])),
                '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement User, 'Satisfied),
         '( 'IDRequirement Role,
            AddRequiredInner
              (Lookup
                 ('IDRequirement Role)
                 '[ '( 'IDRequirement User,
                       AddRequiredInner
                         (Lookup
                            ('IDRequirement User)
                            '[ '( 'IDRequirement Guild, 'Satisfied),
                               '( 'IDRequirement Guild, 'Required)])),
                    '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement User,
            AddRequiredInner
              (Lookup
                 ('IDRequirement User)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> RouteBuilder
         '[ '( 'IDRequirement Role, 'Satisfied),
            '( 'IDRequirement User, 'Satisfied),
            '( 'IDRequirement Role,
               AddRequiredInner
                 (Lookup
                    ('IDRequirement Role)
                    '[ '( 'IDRequirement User,
                          AddRequiredInner
                            (Lookup
                               ('IDRequirement User)
                               '[ '( 'IDRequirement Guild, 'Satisfied),
                                  '( 'IDRequirement Guild, 'Required)])),
                       '( 'IDRequirement Guild, 'Satisfied),
                       '( 'IDRequirement Guild, 'Required)])),
            '( 'IDRequirement User,
               AddRequiredInner
                 (Lookup
                    ('IDRequirement User)
                    '[ '( 'IDRequirement Guild, 'Satisfied),
                       '( 'IDRequirement Guild, 'Required)])),
            '( 'IDRequirement Guild, 'Satisfied),
            '( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
     '[ '( 'IDRequirement Role, 'Satisfied),
        '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement Role,
           AddRequiredInner
             (Lookup
                ('IDRequirement Role)
                '[ '( 'IDRequirement User,
                      AddRequiredInner
                        (Lookup
                           ('IDRequirement User)
                           '[ '( 'IDRequirement Guild, 'Satisfied),
                              '( 'IDRequirement Guild, 'Required)])),
                   '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake Role
-> RouteBuilder
     '[ '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement Role,
           AddRequiredInner
             (Lookup
                ('IDRequirement Role)
                '[ '( 'IDRequirement User,
                      AddRequiredInner
                        (Lookup
                           ('IDRequirement User)
                           '[ '( 'IDRequirement Guild, 'Satisfied),
                              '( 'IDRequirement Guild, 'Required)])),
                   '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
     '[ '( 'IDRequirement Role, 'Satisfied),
        '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement Role,
           AddRequiredInner
             (Lookup
                ('IDRequirement Role)
                '[ '( 'IDRequirement User,
                      AddRequiredInner
                        (Lookup
                           ('IDRequirement User)
                           '[ '( 'IDRequirement Guild, 'Satisfied),
                              '( 'IDRequirement Guild, 'Required)])),
                   '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall t (reqs :: [(RequirementType, RouteRequirement)]).
Typeable t =>
Snowflake t
-> RouteBuilder reqs
-> RouteBuilder ('( 'IDRequirement t, 'Satisfied) : reqs)
giveID Snowflake Role
rid
      RouteBuilder
  '[ '( 'IDRequirement Role, 'Satisfied),
     '( 'IDRequirement User, 'Satisfied),
     '( 'IDRequirement Role,
        AddRequiredInner
          (Lookup
             ('IDRequirement Role)
             '[ '( 'IDRequirement User,
                   AddRequiredInner
                     (Lookup
                        ('IDRequirement User)
                        '[ '( 'IDRequirement Guild, 'Satisfied),
                           '( 'IDRequirement Guild, 'Required)])),
                '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Role, 'Satisfied),
         '( 'IDRequirement User, 'Satisfied),
         '( 'IDRequirement Role,
            AddRequiredInner
              (Lookup
                 ('IDRequirement Role)
                 '[ '( 'IDRequirement User,
                       AddRequiredInner
                         (Lookup
                            ('IDRequirement User)
                            '[ '( 'IDRequirement Guild, 'Satisfied),
                               '( 'IDRequirement Guild, 'Required)])),
                    '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement User,
            AddRequiredInner
              (Lookup
                 ('IDRequirement User)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Role, 'Satisfied),
     '( 'IDRequirement User, 'Satisfied),
     '( 'IDRequirement Role,
        AddRequiredInner
          (Lookup
             ('IDRequirement Role)
             '[ '( 'IDRequirement User,
                   AddRequiredInner
                     (Lookup
                        ('IDRequirement User)
                        '[ '( 'IDRequirement Guild, 'Satisfied),
                           '( 'IDRequirement Guild, 'Required)])),
                '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (RemoveGuildMemberRole (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall b a. HasID b a => a -> Snowflake b
getID @User -> Snowflake User
uid) (forall b a. HasID b a => a -> Snowflake b
getID @Role -> Snowflake Role
rid)) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"members" RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> ID User
-> ConsRes
     (ID User)
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// forall a. ID a
forall {k} (a :: k). ID a
ID @User RouteBuilder
  '[ '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"roles" RouteBuilder
  '[ '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> ID Role
-> ConsRes
     (ID Role)
     '[ '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// forall a. ID a
forall {k} (a :: k). ID a
ID @Role
      RouteBuilder
  '[ '( 'IDRequirement Role,
        AddRequiredInner
          (Lookup
             ('IDRequirement Role)
             '[ '( 'IDRequirement User,
                   AddRequiredInner
                     (Lookup
                        ('IDRequirement User)
                        '[ '( 'IDRequirement Guild, 'Satisfied),
                           '( 'IDRequirement Guild, 'Required)])),
                '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Role,
            AddRequiredInner
              (Lookup
                 ('IDRequirement Role)
                 '[ '( 'IDRequirement User,
                       AddRequiredInner
                         (Lookup
                            ('IDRequirement User)
                            '[ '( 'IDRequirement Guild, 'Satisfied),
                               '( 'IDRequirement Guild, 'Required)])),
                    '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement User,
            AddRequiredInner
              (Lookup
                 ('IDRequirement User)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> RouteBuilder
         '[ '( 'IDRequirement User, 'Satisfied),
            '( 'IDRequirement Role,
               AddRequiredInner
                 (Lookup
                    ('IDRequirement Role)
                    '[ '( 'IDRequirement User,
                          AddRequiredInner
                            (Lookup
                               ('IDRequirement User)
                               '[ '( 'IDRequirement Guild, 'Satisfied),
                                  '( 'IDRequirement Guild, 'Required)])),
                       '( 'IDRequirement Guild, 'Satisfied),
                       '( 'IDRequirement Guild, 'Required)])),
            '( 'IDRequirement User,
               AddRequiredInner
                 (Lookup
                    ('IDRequirement User)
                    '[ '( 'IDRequirement Guild, 'Satisfied),
                       '( 'IDRequirement Guild, 'Required)])),
            '( 'IDRequirement Guild, 'Satisfied),
            '( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
     '[ '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement Role,
           AddRequiredInner
             (Lookup
                ('IDRequirement Role)
                '[ '( 'IDRequirement User,
                      AddRequiredInner
                        (Lookup
                           ('IDRequirement User)
                           '[ '( 'IDRequirement Guild, 'Satisfied),
                              '( 'IDRequirement Guild, 'Required)])),
                   '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
     '[ '( 'IDRequirement Role,
           AddRequiredInner
             (Lookup
                ('IDRequirement Role)
                '[ '( 'IDRequirement User,
                      AddRequiredInner
                        (Lookup
                           ('IDRequirement User)
                           '[ '( 'IDRequirement Guild, 'Satisfied),
                              '( 'IDRequirement Guild, 'Required)])),
                   '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
     '[ '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement Role,
           AddRequiredInner
             (Lookup
                ('IDRequirement Role)
                '[ '( 'IDRequirement User,
                      AddRequiredInner
                        (Lookup
                           ('IDRequirement User)
                           '[ '( 'IDRequirement Guild, 'Satisfied),
                              '( 'IDRequirement Guild, 'Required)])),
                   '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall t (reqs :: [(RequirementType, RouteRequirement)]).
Typeable t =>
Snowflake t
-> RouteBuilder reqs
-> RouteBuilder ('( 'IDRequirement t, 'Satisfied) : reqs)
giveID Snowflake User
uid
      RouteBuilder
  '[ '( 'IDRequirement User, 'Satisfied),
     '( 'IDRequirement Role,
        AddRequiredInner
          (Lookup
             ('IDRequirement Role)
             '[ '( 'IDRequirement User,
                   AddRequiredInner
                     (Lookup
                        ('IDRequirement User)
                        '[ '( 'IDRequirement Guild, 'Satisfied),
                           '( 'IDRequirement Guild, 'Required)])),
                '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement User, 'Satisfied),
         '( 'IDRequirement Role,
            AddRequiredInner
              (Lookup
                 ('IDRequirement Role)
                 '[ '( 'IDRequirement User,
                       AddRequiredInner
                         (Lookup
                            ('IDRequirement User)
                            '[ '( 'IDRequirement Guild, 'Satisfied),
                               '( 'IDRequirement Guild, 'Required)])),
                    '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement User,
            AddRequiredInner
              (Lookup
                 ('IDRequirement User)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> RouteBuilder
         '[ '( 'IDRequirement Role, 'Satisfied),
            '( 'IDRequirement User, 'Satisfied),
            '( 'IDRequirement Role,
               AddRequiredInner
                 (Lookup
                    ('IDRequirement Role)
                    '[ '( 'IDRequirement User,
                          AddRequiredInner
                            (Lookup
                               ('IDRequirement User)
                               '[ '( 'IDRequirement Guild, 'Satisfied),
                                  '( 'IDRequirement Guild, 'Required)])),
                       '( 'IDRequirement Guild, 'Satisfied),
                       '( 'IDRequirement Guild, 'Required)])),
            '( 'IDRequirement User,
               AddRequiredInner
                 (Lookup
                    ('IDRequirement User)
                    '[ '( 'IDRequirement Guild, 'Satisfied),
                       '( 'IDRequirement Guild, 'Required)])),
            '( 'IDRequirement Guild, 'Satisfied),
            '( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
     '[ '( 'IDRequirement Role, 'Satisfied),
        '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement Role,
           AddRequiredInner
             (Lookup
                ('IDRequirement Role)
                '[ '( 'IDRequirement User,
                      AddRequiredInner
                        (Lookup
                           ('IDRequirement User)
                           '[ '( 'IDRequirement Guild, 'Satisfied),
                              '( 'IDRequirement Guild, 'Required)])),
                   '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake Role
-> RouteBuilder
     '[ '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement Role,
           AddRequiredInner
             (Lookup
                ('IDRequirement Role)
                '[ '( 'IDRequirement User,
                      AddRequiredInner
                        (Lookup
                           ('IDRequirement User)
                           '[ '( 'IDRequirement Guild, 'Satisfied),
                              '( 'IDRequirement Guild, 'Required)])),
                   '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
     '[ '( 'IDRequirement Role, 'Satisfied),
        '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement Role,
           AddRequiredInner
             (Lookup
                ('IDRequirement Role)
                '[ '( 'IDRequirement User,
                      AddRequiredInner
                        (Lookup
                           ('IDRequirement User)
                           '[ '( 'IDRequirement Guild, 'Satisfied),
                              '( 'IDRequirement Guild, 'Required)])),
                   '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall t (reqs :: [(RequirementType, RouteRequirement)]).
Typeable t =>
Snowflake t
-> RouteBuilder reqs
-> RouteBuilder ('( 'IDRequirement t, 'Satisfied) : reqs)
giveID Snowflake Role
rid
      RouteBuilder
  '[ '( 'IDRequirement Role, 'Satisfied),
     '( 'IDRequirement User, 'Satisfied),
     '( 'IDRequirement Role,
        AddRequiredInner
          (Lookup
             ('IDRequirement Role)
             '[ '( 'IDRequirement User,
                   AddRequiredInner
                     (Lookup
                        ('IDRequirement User)
                        '[ '( 'IDRequirement Guild, 'Satisfied),
                           '( 'IDRequirement Guild, 'Required)])),
                '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Role, 'Satisfied),
         '( 'IDRequirement User, 'Satisfied),
         '( 'IDRequirement Role,
            AddRequiredInner
              (Lookup
                 ('IDRequirement Role)
                 '[ '( 'IDRequirement User,
                       AddRequiredInner
                         (Lookup
                            ('IDRequirement User)
                            '[ '( 'IDRequirement Guild, 'Satisfied),
                               '( 'IDRequirement Guild, 'Required)])),
                    '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement User,
            AddRequiredInner
              (Lookup
                 ('IDRequirement User)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Role, 'Satisfied),
     '( 'IDRequirement User, 'Satisfied),
     '( 'IDRequirement Role,
        AddRequiredInner
          (Lookup
             ('IDRequirement Role)
             '[ '( 'IDRequirement User,
                   AddRequiredInner
                     (Lookup
                        ('IDRequirement User)
                        '[ '( 'IDRequirement Guild, 'Satisfied),
                           '( 'IDRequirement Guild, 'Required)])),
                '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (RemoveGuildMember (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall b a. HasID b a => a -> Snowflake b
getID @User -> Snowflake User
uid)) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"members" RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> ID User
-> ConsRes
     (ID User)
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// forall a. ID a
forall {k} (a :: k). ID a
ID @User
      RouteBuilder
  '[ '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement User,
            AddRequiredInner
              (Lookup
                 ('IDRequirement User)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> RouteBuilder
         '[ '( 'IDRequirement User, 'Satisfied),
            '( 'IDRequirement User,
               AddRequiredInner
                 (Lookup
                    ('IDRequirement User)
                    '[ '( 'IDRequirement Guild, 'Satisfied),
                       '( 'IDRequirement Guild, 'Required)])),
            '( 'IDRequirement Guild, 'Satisfied),
            '( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
     '[ '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
     '[ '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
     '[ '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall t (reqs :: [(RequirementType, RouteRequirement)]).
Typeable t =>
Snowflake t
-> RouteBuilder reqs
-> RouteBuilder ('( 'IDRequirement t, 'Satisfied) : reqs)
giveID Snowflake User
uid
      RouteBuilder
  '[ '( 'IDRequirement User, 'Satisfied),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement User, 'Satisfied),
         '( 'IDRequirement User,
            AddRequiredInner
              (Lookup
                 ('IDRequirement User)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement User, 'Satisfied),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (GetGuildBans (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) GetGuildBansOptions
_) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"bans"
      RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (GetGuildBan (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall b a. HasID b a => a -> Snowflake b
getID @User -> Snowflake User
uid)) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"bans" RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> ID User
-> ConsRes
     (ID User)
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// forall a. ID a
forall {k} (a :: k). ID a
ID @User
      RouteBuilder
  '[ '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement User,
            AddRequiredInner
              (Lookup
                 ('IDRequirement User)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> RouteBuilder
         '[ '( 'IDRequirement User, 'Satisfied),
            '( 'IDRequirement User,
               AddRequiredInner
                 (Lookup
                    ('IDRequirement User)
                    '[ '( 'IDRequirement Guild, 'Satisfied),
                       '( 'IDRequirement Guild, 'Required)])),
            '( 'IDRequirement Guild, 'Satisfied),
            '( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
     '[ '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
     '[ '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
     '[ '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall t (reqs :: [(RequirementType, RouteRequirement)]).
Typeable t =>
Snowflake t
-> RouteBuilder reqs
-> RouteBuilder ('( 'IDRequirement t, 'Satisfied) : reqs)
giveID Snowflake User
uid
      RouteBuilder
  '[ '( 'IDRequirement User, 'Satisfied),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement User, 'Satisfied),
         '( 'IDRequirement User,
            AddRequiredInner
              (Lookup
                 ('IDRequirement User)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement User, 'Satisfied),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (CreateGuildBan (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall b a. HasID b a => a -> Snowflake b
getID @User -> Snowflake User
uid) CreateGuildBanData
_) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"bans" RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> ID User
-> ConsRes
     (ID User)
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// forall a. ID a
forall {k} (a :: k). ID a
ID @User
      RouteBuilder
  '[ '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement User,
            AddRequiredInner
              (Lookup
                 ('IDRequirement User)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> RouteBuilder
         '[ '( 'IDRequirement User, 'Satisfied),
            '( 'IDRequirement User,
               AddRequiredInner
                 (Lookup
                    ('IDRequirement User)
                    '[ '( 'IDRequirement Guild, 'Satisfied),
                       '( 'IDRequirement Guild, 'Required)])),
            '( 'IDRequirement Guild, 'Satisfied),
            '( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
     '[ '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
     '[ '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
     '[ '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall t (reqs :: [(RequirementType, RouteRequirement)]).
Typeable t =>
Snowflake t
-> RouteBuilder reqs
-> RouteBuilder ('( 'IDRequirement t, 'Satisfied) : reqs)
giveID Snowflake User
uid
      RouteBuilder
  '[ '( 'IDRequirement User, 'Satisfied),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement User, 'Satisfied),
         '( 'IDRequirement User,
            AddRequiredInner
              (Lookup
                 ('IDRequirement User)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement User, 'Satisfied),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (RemoveGuildBan (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall b a. HasID b a => a -> Snowflake b
getID @User -> Snowflake User
uid)) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"bans" RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> ID User
-> ConsRes
     (ID User)
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// forall a. ID a
forall {k} (a :: k). ID a
ID @User
      RouteBuilder
  '[ '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement User,
            AddRequiredInner
              (Lookup
                 ('IDRequirement User)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> RouteBuilder
         '[ '( 'IDRequirement User, 'Satisfied),
            '( 'IDRequirement User,
               AddRequiredInner
                 (Lookup
                    ('IDRequirement User)
                    '[ '( 'IDRequirement Guild, 'Satisfied),
                       '( 'IDRequirement Guild, 'Required)])),
            '( 'IDRequirement Guild, 'Satisfied),
            '( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
     '[ '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
     '[ '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
     '[ '( 'IDRequirement User, 'Satisfied),
        '( 'IDRequirement User,
           AddRequiredInner
             (Lookup
                ('IDRequirement User)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall t (reqs :: [(RequirementType, RouteRequirement)]).
Typeable t =>
Snowflake t
-> RouteBuilder reqs
-> RouteBuilder ('( 'IDRequirement t, 'Satisfied) : reqs)
giveID Snowflake User
uid
      RouteBuilder
  '[ '( 'IDRequirement User, 'Satisfied),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement User, 'Satisfied),
         '( 'IDRequirement User,
            AddRequiredInner
              (Lookup
                 ('IDRequirement User)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement User, 'Satisfied),
     '( 'IDRequirement User,
        AddRequiredInner
          (Lookup
             ('IDRequirement User)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (GetGuildRoles (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid)) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"roles"
      RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (CreateGuildRole (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) ModifyGuildRoleData
_) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"roles"
      RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (ModifyGuildRolePositions (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) ModifyGuildRolePositionsData
_) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"roles"
      RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (ModifyGuildRole (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall b a. HasID b a => a -> Snowflake b
getID @Role -> Snowflake Role
rid) ModifyGuildRoleData
_) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"roles" RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> ID Role
-> ConsRes
     (ID Role)
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// forall a. ID a
forall {k} (a :: k). ID a
ID @Role
      RouteBuilder
  '[ '( 'IDRequirement Role,
        AddRequiredInner
          (Lookup
             ('IDRequirement Role)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Role,
            AddRequiredInner
              (Lookup
                 ('IDRequirement Role)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> RouteBuilder
         '[ '( 'IDRequirement Role, 'Satisfied),
            '( 'IDRequirement Role,
               AddRequiredInner
                 (Lookup
                    ('IDRequirement Role)
                    '[ '( 'IDRequirement Guild, 'Satisfied),
                       '( 'IDRequirement Guild, 'Required)])),
            '( 'IDRequirement Guild, 'Satisfied),
            '( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
     '[ '( 'IDRequirement Role, 'Satisfied),
        '( 'IDRequirement Role,
           AddRequiredInner
             (Lookup
                ('IDRequirement Role)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake Role
-> RouteBuilder
     '[ '( 'IDRequirement Role,
           AddRequiredInner
             (Lookup
                ('IDRequirement Role)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
     '[ '( 'IDRequirement Role, 'Satisfied),
        '( 'IDRequirement Role,
           AddRequiredInner
             (Lookup
                ('IDRequirement Role)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall t (reqs :: [(RequirementType, RouteRequirement)]).
Typeable t =>
Snowflake t
-> RouteBuilder reqs
-> RouteBuilder ('( 'IDRequirement t, 'Satisfied) : reqs)
giveID Snowflake Role
rid
      RouteBuilder
  '[ '( 'IDRequirement Role, 'Satisfied),
     '( 'IDRequirement Role,
        AddRequiredInner
          (Lookup
             ('IDRequirement Role)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Role, 'Satisfied),
         '( 'IDRequirement Role,
            AddRequiredInner
              (Lookup
                 ('IDRequirement Role)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Role, 'Satisfied),
     '( 'IDRequirement Role,
        AddRequiredInner
          (Lookup
             ('IDRequirement Role)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (DeleteGuildRole (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall b a. HasID b a => a -> Snowflake b
getID @Role -> Snowflake Role
rid)) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"roles" RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> ID Role
-> ConsRes
     (ID Role)
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// forall a. ID a
forall {k} (a :: k). ID a
ID @Role
      RouteBuilder
  '[ '( 'IDRequirement Role,
        AddRequiredInner
          (Lookup
             ('IDRequirement Role)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Role,
            AddRequiredInner
              (Lookup
                 ('IDRequirement Role)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> RouteBuilder
         '[ '( 'IDRequirement Role, 'Satisfied),
            '( 'IDRequirement Role,
               AddRequiredInner
                 (Lookup
                    ('IDRequirement Role)
                    '[ '( 'IDRequirement Guild, 'Satisfied),
                       '( 'IDRequirement Guild, 'Required)])),
            '( 'IDRequirement Guild, 'Satisfied),
            '( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
     '[ '( 'IDRequirement Role, 'Satisfied),
        '( 'IDRequirement Role,
           AddRequiredInner
             (Lookup
                ('IDRequirement Role)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake Role
-> RouteBuilder
     '[ '( 'IDRequirement Role,
           AddRequiredInner
             (Lookup
                ('IDRequirement Role)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
     '[ '( 'IDRequirement Role, 'Satisfied),
        '( 'IDRequirement Role,
           AddRequiredInner
             (Lookup
                ('IDRequirement Role)
                '[ '( 'IDRequirement Guild, 'Satisfied),
                   '( 'IDRequirement Guild, 'Required)])),
        '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall t (reqs :: [(RequirementType, RouteRequirement)]).
Typeable t =>
Snowflake t
-> RouteBuilder reqs
-> RouteBuilder ('( 'IDRequirement t, 'Satisfied) : reqs)
giveID Snowflake Role
rid
      RouteBuilder
  '[ '( 'IDRequirement Role, 'Satisfied),
     '( 'IDRequirement Role,
        AddRequiredInner
          (Lookup
             ('IDRequirement Role)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Role, 'Satisfied),
         '( 'IDRequirement Role,
            AddRequiredInner
              (Lookup
                 ('IDRequirement Role)
                 '[ '( 'IDRequirement Guild, 'Satisfied),
                    '( 'IDRequirement Guild, 'Required)])),
         '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Role, 'Satisfied),
     '( 'IDRequirement Role,
        AddRequiredInner
          (Lookup
             ('IDRequirement Role)
             '[ '( 'IDRequirement Guild, 'Satisfied),
                '( 'IDRequirement Guild, 'Required)])),
     '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (GetGuildPruneCount (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) Integer
_) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"prune"
      RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (BeginGuildPrune (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) Integer
_ Bool
_) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"prune"
      RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (GetGuildVoiceRegions (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid)) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"regions"
      RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute
  route (GetGuildInvites (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid)) =
    Snowflake Guild
-> RouteBuilder
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
     S
     '[ '( 'IDRequirement Guild, 'Satisfied),
        '( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// Text -> S
S Text
"invites"
      RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
      '[ '( 'IDRequirement Guild, 'Satisfied),
         '( 'IDRequirement Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '( 'IDRequirement Guild, 'Satisfied),
     '( 'IDRequirement Guild, 'Required)]
-> Route
forall (reqs :: [(RequirementType, RouteRequirement)]).
EnsureFulfilled reqs =>
RouteBuilder reqs -> Route
buildRoute

  action :: GuildRequest a -> Url 'Https -> Option 'Https -> Req LbsResponse
action (CreateGuild CreateGuildData
o) = ReqBodyJson CreateGuildData
-> Url 'Https -> Option 'Https -> Req LbsResponse
forall a.
HttpBody a =>
a -> Url 'Https -> Option 'Https -> Req LbsResponse
postWith' (CreateGuildData -> ReqBodyJson CreateGuildData
forall a. a -> ReqBodyJson a
ReqBodyJson CreateGuildData
o)
  action (GetGuild g
_) = Url 'Https -> Option 'Https -> Req LbsResponse
getWith
  action (ModifyGuild g
_ ModifyGuildData
o) = ReqBodyJson ModifyGuildData
-> Url 'Https -> Option 'Https -> Req LbsResponse
forall a.
HttpBody a =>
a -> Url 'Https -> Option 'Https -> Req LbsResponse
patchWith' (ModifyGuildData -> ReqBodyJson ModifyGuildData
forall a. a -> ReqBodyJson a
ReqBodyJson ModifyGuildData
o)
  action (DeleteGuild g
_) = Url 'Https -> Option 'Https -> Req LbsResponse
deleteWith
  action (GetGuildChannels g
_) = Url 'Https -> Option 'Https -> Req LbsResponse
getWith
  action (CreateGuildChannel g
_ ChannelCreateData
o) = ReqBodyJson ChannelCreateData
-> Url 'Https -> Option 'Https -> Req LbsResponse
forall a.
HttpBody a =>
a -> Url 'Https -> Option 'Https -> Req LbsResponse
postWith' (ChannelCreateData -> ReqBodyJson ChannelCreateData
forall a. a -> ReqBodyJson a
ReqBodyJson ChannelCreateData
o)
  action (ModifyGuildChannelPositions g
_ [ChannelPosition]
o) = ReqBodyJson [ChannelPosition]
-> Url 'Https -> Option 'Https -> Req LbsResponse
forall a.
HttpBody a =>
a -> Url 'Https -> Option 'Https -> Req LbsResponse
postWith' ([ChannelPosition] -> ReqBodyJson [ChannelPosition]
forall a. a -> ReqBodyJson a
ReqBodyJson [ChannelPosition]
o)
  action (GetGuildMember g
_ u
_) = Url 'Https -> Option 'Https -> Req LbsResponse
getWith
  action (ListGuildMembers g
_ ListMembersOptions {Maybe Integer
$sel:limit:ListMembersOptions :: ListMembersOptions -> Maybe Integer
limit :: Maybe Integer
limit, Maybe (Snowflake User)
$sel:after:ListMembersOptions :: ListMembersOptions -> Maybe (Snowflake User)
after :: Maybe (Snowflake User)
after}) =
    Option 'Https -> Url 'Https -> Option 'Https -> Req LbsResponse
getWithP
      (Text
"limit" Text -> Maybe Integer -> Option 'Https
forall a. ToHttpApiData a => Text -> Maybe a -> Option 'Https
=:? Maybe Integer
limit Option 'Https -> Option 'Https -> Option 'Https
forall a. Semigroup a => a -> a -> a
<> Text
"after" Text -> Maybe Word64 -> Option 'Https
forall a. ToHttpApiData a => Text -> Maybe a -> Option 'Https
=:? (Snowflake User -> Word64
forall t. Snowflake t -> Word64
fromSnowflake (Snowflake User -> Word64)
-> Maybe (Snowflake User) -> Maybe Word64
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Maybe (Snowflake User)
after))
  action (SearchGuildMembers g
_ SearchMembersOptions {Maybe Integer
$sel:limit:SearchMembersOptions :: SearchMembersOptions -> Maybe Integer
limit :: Maybe Integer
limit, Text
$sel:query:SearchMembersOptions :: SearchMembersOptions -> Text
query :: Text
query}) =
    Option 'Https -> Url 'Https -> Option 'Https -> Req LbsResponse
getWithP
      (Text
"limit" Text -> Maybe Integer -> Option 'Https
forall a. ToHttpApiData a => Text -> Maybe a -> Option 'Https
=:? Maybe Integer
limit Option 'Https -> Option 'Https -> Option 'Https
forall a. Semigroup a => a -> a -> a
<> Text
"query" Text -> Text -> Option 'Https
forall param a.
(QueryParam param, ToHttpApiData a) =>
Text -> a -> param
=: Text
query)
  action (AddGuildMember g
_ u
_ AddGuildMemberData
o) = ReqBodyJson AddGuildMemberData
-> Url 'Https -> Option 'Https -> Req LbsResponse
forall a.
HttpBody a =>
a -> Url 'Https -> Option 'Https -> Req LbsResponse
putWith' (AddGuildMemberData -> ReqBodyJson AddGuildMemberData
forall a. a -> ReqBodyJson a
ReqBodyJson AddGuildMemberData
o)
  action (ModifyGuildMember g
_ u
_ ModifyGuildMemberData
o) = ReqBodyJson ModifyGuildMemberData
-> Url 'Https -> Option 'Https -> Req LbsResponse
forall a.
HttpBody a =>
a -> Url 'Https -> Option 'Https -> Req LbsResponse
patchWith' (ModifyGuildMemberData -> ReqBodyJson ModifyGuildMemberData
forall a. a -> ReqBodyJson a
ReqBodyJson ModifyGuildMemberData
o)
  action (ModifyCurrentUserNick g
_ Maybe Text
nick) = ReqBodyJson Value -> Url 'Https -> Option 'Https -> Req LbsResponse
forall a.
HttpBody a =>
a -> Url 'Https -> Option 'Https -> Req LbsResponse
patchWith' (Value -> ReqBodyJson Value
forall a. a -> ReqBodyJson a
ReqBodyJson (Value -> ReqBodyJson Value) -> Value -> ReqBodyJson Value
forall a b. (a -> b) -> a -> b
$ [(Key, Value)] -> Value
Aeson.object [Key
"nick" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
forall v. ToJSON v => Key -> v -> (Key, Value)
Aeson..= Maybe Text
nick])
  action AddGuildMemberRole {} = Url 'Https -> Option 'Https -> Req LbsResponse
putEmpty
  action RemoveGuildMemberRole {} = Url 'Https -> Option 'Https -> Req LbsResponse
deleteWith
  action (RemoveGuildMember g
_ u
_) = Url 'Https -> Option 'Https -> Req LbsResponse
deleteWith
  action (GetGuildBans g
_ GetGuildBansOptions {Maybe Int
$sel:limit:GetGuildBansOptions :: GetGuildBansOptions -> Maybe Int
limit :: Maybe Int
limit, Maybe Int
$sel:before:GetGuildBansOptions :: GetGuildBansOptions -> Maybe Int
before :: Maybe Int
before, Maybe Int
$sel:after:GetGuildBansOptions :: GetGuildBansOptions -> Maybe Int
after :: Maybe Int
after}) =
    Option 'Https -> Url 'Https -> Option 'Https -> Req LbsResponse
getWithP
      (Text
"limit" Text -> Maybe Int -> Option 'Https
forall a. ToHttpApiData a => Text -> Maybe a -> Option 'Https
=:? Maybe Int
limit Option 'Https -> Option 'Https -> Option 'Https
forall a. Semigroup a => a -> a -> a
<> Text
"before" Text -> Maybe Int -> Option 'Https
forall a. ToHttpApiData a => Text -> Maybe a -> Option 'Https
=:? Maybe Int
before Option 'Https -> Option 'Https -> Option 'Https
forall a. Semigroup a => a -> a -> a
<> Text
"after" Text -> Maybe Int -> Option 'Https
forall a. ToHttpApiData a => Text -> Maybe a -> Option 'Https
=:? Maybe Int
after)
  action (GetGuildBan g
_ u
_) = Url 'Https -> Option 'Https -> Req LbsResponse
getWith
  action (CreateGuildBan g
_ u
_ CreateGuildBanData {Maybe Integer
$sel:deleteMessageDays:CreateGuildBanData :: CreateGuildBanData -> Maybe Integer
deleteMessageDays :: Maybe Integer
deleteMessageDays}) =
    Option 'Https -> Url 'Https -> Option 'Https -> Req LbsResponse
putEmptyP
      (Text
"delete_message_days" Text -> Maybe Integer -> Option 'Https
forall a. ToHttpApiData a => Text -> Maybe a -> Option 'Https
=:? Maybe Integer
deleteMessageDays)
  action (RemoveGuildBan g
_ u
_) = Url 'Https -> Option 'Https -> Req LbsResponse
deleteWith
  action (GetGuildRoles g
_) = Url 'Https -> Option 'Https -> Req LbsResponse
getWith
  action (CreateGuildRole g
_ ModifyGuildRoleData
o) = ReqBodyJson ModifyGuildRoleData
-> Url 'Https -> Option 'Https -> Req LbsResponse
forall a.
HttpBody a =>
a -> Url 'Https -> Option 'Https -> Req LbsResponse
postWith' (ModifyGuildRoleData -> ReqBodyJson ModifyGuildRoleData
forall a. a -> ReqBodyJson a
ReqBodyJson ModifyGuildRoleData
o)
  action (ModifyGuildRolePositions g
_ ModifyGuildRolePositionsData
o) = ReqBodyJson ModifyGuildRolePositionsData
-> Url 'Https -> Option 'Https -> Req LbsResponse
forall a.
HttpBody a =>
a -> Url 'Https -> Option 'Https -> Req LbsResponse
patchWith' (ModifyGuildRolePositionsData
-> ReqBodyJson ModifyGuildRolePositionsData
forall a. a -> ReqBodyJson a
ReqBodyJson ModifyGuildRolePositionsData
o)
  action (ModifyGuildRole g
_ r
_ ModifyGuildRoleData
o) = ReqBodyJson ModifyGuildRoleData
-> Url 'Https -> Option 'Https -> Req LbsResponse
forall a.
HttpBody a =>
a -> Url 'Https -> Option 'Https -> Req LbsResponse
patchWith' (ModifyGuildRoleData -> ReqBodyJson ModifyGuildRoleData
forall a. a -> ReqBodyJson a
ReqBodyJson ModifyGuildRoleData
o)
  action (DeleteGuildRole g
_ r
_) = Url 'Https -> Option 'Https -> Req LbsResponse
deleteWith
  action (GetGuildPruneCount g
_ Integer
d) = Option 'Https -> Url 'Https -> Option 'Https -> Req LbsResponse
getWithP (Text
"days" Text -> Integer -> Option 'Https
forall param a.
(QueryParam param, ToHttpApiData a) =>
Text -> a -> param
=: Integer
d)
  action (BeginGuildPrune g
_ Integer
d Bool
r) = Option 'Https -> Url 'Https -> Option 'Https -> Req LbsResponse
postEmptyP (Text
"days" Text -> Integer -> Option 'Https
forall param a.
(QueryParam param, ToHttpApiData a) =>
Text -> a -> param
=: Integer
d Option 'Https -> Option 'Https -> Option 'Https
forall a. Semigroup a => a -> a -> a
<> Text
"compute_prune_count" Text -> Bool -> Option 'Https
forall param a.
(QueryParam param, ToHttpApiData a) =>
Text -> a -> param
=: Bool
r)
  action (GetGuildVoiceRegions g
_) = Url 'Https -> Option 'Https -> Req LbsResponse
getWith
  action (GetGuildInvites g
_) = Url 'Https -> Option 'Https -> Req LbsResponse
getWith

  -- this is a bit of a hack
  -- TODO: add something to allow for contextual parsing
  modifyResponse :: GuildRequest a -> Value -> Value
modifyResponse GuildRequest a
_ = Value -> Value
forall a. a -> a
Prelude.id

$(makeFieldLabelsNoPrefix ''CreateGuildData)
$(makeFieldLabelsNoPrefix ''ModifyGuildData)
$(makeFieldLabelsNoPrefix ''ChannelCreateData)
$(makeFieldLabelsNoPrefix ''ChannelPosition)
$(makeFieldLabelsNoPrefix ''ListMembersOptions)
$(makeFieldLabelsNoPrefix ''AddGuildMemberData)
$(makeFieldLabelsNoPrefix ''ModifyGuildRolePositionsData)
$(makeFieldLabelsNoPrefix ''CreateGuildBanData)