-- | Guild endpoints
module Calamity.HTTP.Guild
    ( GuildRequest(..)
    , CreateGuildData(..)
    , ModifyGuildData(..)
    , ChannelCreateData(..)
    , ChannelPosition(..)
    , ListMembersOptions(..)
    , AddGuildMemberData(..)
    , ModifyGuildMemberData(..)
    , CreateGuildBanData(..)
    , ModifyGuildRoleData(..)
    , ModifyGuildRolePositionsData(..) ) where

import           Calamity.HTTP.Internal.Request
import           Calamity.HTTP.Internal.Route
import           Calamity.Internal.AesonThings
import           Calamity.Internal.IntColour    ()
import           Calamity.Internal.Utils        ()
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           Control.Arrow
import           Control.Lens                   hiding ( (.=) )

import           Data.Aeson
import           Data.Colour                    ( Colour )
import           Data.Default.Class
import           Data.Maybe
import           Data.Text                      ( Text )

import           GHC.Generics

import           Network.Wreq

import           TextShow

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
showList :: [CreateGuildData] -> ShowS
$cshowList :: [CreateGuildData] -> ShowS
show :: CreateGuildData -> String
$cshow :: CreateGuildData -> String
showsPrec :: Int -> CreateGuildData -> ShowS
$cshowsPrec :: Int -> CreateGuildData -> ShowS
Show, (forall x. CreateGuildData -> Rep CreateGuildData x)
-> (forall x. Rep CreateGuildData x -> CreateGuildData)
-> Generic CreateGuildData
forall x. Rep CreateGuildData x -> CreateGuildData
forall x. CreateGuildData -> Rep CreateGuildData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateGuildData x -> CreateGuildData
$cfrom :: forall x. CreateGuildData -> Rep CreateGuildData x
Generic )
  deriving ( [CreateGuildData] -> Encoding
[CreateGuildData] -> Value
CreateGuildData -> Encoding
CreateGuildData -> Value
(CreateGuildData -> Value)
-> (CreateGuildData -> Encoding)
-> ([CreateGuildData] -> Value)
-> ([CreateGuildData] -> Encoding)
-> ToJSON CreateGuildData
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [CreateGuildData] -> Encoding
$ctoEncodingList :: [CreateGuildData] -> Encoding
toJSONList :: [CreateGuildData] -> Value
$ctoJSONList :: [CreateGuildData] -> Value
toEncoding :: CreateGuildData -> Encoding
$ctoEncoding :: CreateGuildData -> Encoding
toJSON :: CreateGuildData -> Value
$ctoJSON :: CreateGuildData -> Value
ToJSON ) via CalamityJSON CreateGuildData

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
showList :: [ModifyGuildData] -> ShowS
$cshowList :: [ModifyGuildData] -> ShowS
show :: ModifyGuildData -> String
$cshow :: ModifyGuildData -> String
showsPrec :: Int -> ModifyGuildData -> ShowS
$cshowsPrec :: Int -> ModifyGuildData -> ShowS
Show, (forall x. ModifyGuildData -> Rep ModifyGuildData x)
-> (forall x. Rep ModifyGuildData x -> ModifyGuildData)
-> Generic ModifyGuildData
forall x. Rep ModifyGuildData x -> ModifyGuildData
forall x. ModifyGuildData -> Rep ModifyGuildData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModifyGuildData x -> ModifyGuildData
$cfrom :: forall x. ModifyGuildData -> Rep ModifyGuildData x
Generic, ModifyGuildData
ModifyGuildData -> Default ModifyGuildData
forall a. a -> Default a
def :: ModifyGuildData
$cdef :: ModifyGuildData
Default )
  deriving ( [ModifyGuildData] -> Encoding
[ModifyGuildData] -> Value
ModifyGuildData -> Encoding
ModifyGuildData -> Value
(ModifyGuildData -> Value)
-> (ModifyGuildData -> Encoding)
-> ([ModifyGuildData] -> Value)
-> ([ModifyGuildData] -> Encoding)
-> ToJSON ModifyGuildData
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [ModifyGuildData] -> Encoding
$ctoEncodingList :: [ModifyGuildData] -> Encoding
toJSONList :: [ModifyGuildData] -> Value
$ctoJSONList :: [ModifyGuildData] -> Value
toEncoding :: ModifyGuildData -> Encoding
$ctoEncoding :: ModifyGuildData -> Encoding
toJSON :: ModifyGuildData -> Value
$ctoJSON :: ModifyGuildData -> Value
ToJSON ) via CalamityJSON ModifyGuildData

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
showList :: [ChannelCreateData] -> ShowS
$cshowList :: [ChannelCreateData] -> ShowS
show :: ChannelCreateData -> String
$cshow :: ChannelCreateData -> String
showsPrec :: Int -> ChannelCreateData -> ShowS
$cshowsPrec :: Int -> ChannelCreateData -> ShowS
Show, (forall x. ChannelCreateData -> Rep ChannelCreateData x)
-> (forall x. Rep ChannelCreateData x -> ChannelCreateData)
-> Generic ChannelCreateData
forall x. Rep ChannelCreateData x -> ChannelCreateData
forall x. ChannelCreateData -> Rep ChannelCreateData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ChannelCreateData x -> ChannelCreateData
$cfrom :: forall x. ChannelCreateData -> Rep ChannelCreateData x
Generic )
  deriving ( [ChannelCreateData] -> Encoding
[ChannelCreateData] -> Value
ChannelCreateData -> Encoding
ChannelCreateData -> Value
(ChannelCreateData -> Value)
-> (ChannelCreateData -> Encoding)
-> ([ChannelCreateData] -> Value)
-> ([ChannelCreateData] -> Encoding)
-> ToJSON ChannelCreateData
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [ChannelCreateData] -> Encoding
$ctoEncodingList :: [ChannelCreateData] -> Encoding
toJSONList :: [ChannelCreateData] -> Value
$ctoJSONList :: [ChannelCreateData] -> Value
toEncoding :: ChannelCreateData -> Encoding
$ctoEncoding :: ChannelCreateData -> Encoding
toJSON :: ChannelCreateData -> Value
$ctoJSON :: ChannelCreateData -> Value
ToJSON ) via CalamityJSON ChannelCreateData

data ChannelPosition = ChannelPosition
  { ChannelPosition -> Snowflake GuildChannel
id       :: Snowflake GuildChannel
  , ChannelPosition -> Maybe Integer
position :: Maybe Integer
  }
  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
showList :: [ChannelPosition] -> ShowS
$cshowList :: [ChannelPosition] -> ShowS
show :: ChannelPosition -> String
$cshow :: ChannelPosition -> String
showsPrec :: Int -> ChannelPosition -> ShowS
$cshowsPrec :: Int -> ChannelPosition -> ShowS
Show, (forall x. ChannelPosition -> Rep ChannelPosition x)
-> (forall x. Rep ChannelPosition x -> ChannelPosition)
-> Generic ChannelPosition
forall x. Rep ChannelPosition x -> ChannelPosition
forall x. ChannelPosition -> Rep ChannelPosition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ChannelPosition x -> ChannelPosition
$cfrom :: forall x. ChannelPosition -> Rep ChannelPosition x
Generic )
  deriving ( [ChannelPosition] -> Encoding
[ChannelPosition] -> Value
ChannelPosition -> Encoding
ChannelPosition -> Value
(ChannelPosition -> Value)
-> (ChannelPosition -> Encoding)
-> ([ChannelPosition] -> Value)
-> ([ChannelPosition] -> Encoding)
-> ToJSON ChannelPosition
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [ChannelPosition] -> Encoding
$ctoEncodingList :: [ChannelPosition] -> Encoding
toJSONList :: [ChannelPosition] -> Value
$ctoJSONList :: [ChannelPosition] -> Value
toEncoding :: ChannelPosition -> Encoding
$ctoEncoding :: ChannelPosition -> Encoding
toJSON :: ChannelPosition -> Value
$ctoJSON :: ChannelPosition -> Value
ToJSON ) via CalamityJSON ChannelPosition

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
showList :: [ListMembersOptions] -> ShowS
$cshowList :: [ListMembersOptions] -> ShowS
show :: ListMembersOptions -> String
$cshow :: ListMembersOptions -> String
showsPrec :: Int -> ListMembersOptions -> ShowS
$cshowsPrec :: Int -> ListMembersOptions -> ShowS
Show, (forall x. ListMembersOptions -> Rep ListMembersOptions x)
-> (forall x. Rep ListMembersOptions x -> ListMembersOptions)
-> Generic ListMembersOptions
forall x. Rep ListMembersOptions x -> ListMembersOptions
forall x. ListMembersOptions -> Rep ListMembersOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListMembersOptions x -> ListMembersOptions
$cfrom :: forall x. ListMembersOptions -> Rep ListMembersOptions x
Generic, ListMembersOptions
ListMembersOptions -> Default ListMembersOptions
forall a. a -> Default a
def :: ListMembersOptions
$cdef :: ListMembersOptions
Default )

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
showList :: [AddGuildMemberData] -> ShowS
$cshowList :: [AddGuildMemberData] -> ShowS
show :: AddGuildMemberData -> String
$cshow :: AddGuildMemberData -> String
showsPrec :: Int -> AddGuildMemberData -> ShowS
$cshowsPrec :: Int -> AddGuildMemberData -> ShowS
Show, (forall x. AddGuildMemberData -> Rep AddGuildMemberData x)
-> (forall x. Rep AddGuildMemberData x -> AddGuildMemberData)
-> Generic AddGuildMemberData
forall x. Rep AddGuildMemberData x -> AddGuildMemberData
forall x. AddGuildMemberData -> Rep AddGuildMemberData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AddGuildMemberData x -> AddGuildMemberData
$cfrom :: forall x. AddGuildMemberData -> Rep AddGuildMemberData x
Generic )
  deriving ( [AddGuildMemberData] -> Encoding
[AddGuildMemberData] -> Value
AddGuildMemberData -> Encoding
AddGuildMemberData -> Value
(AddGuildMemberData -> Value)
-> (AddGuildMemberData -> Encoding)
-> ([AddGuildMemberData] -> Value)
-> ([AddGuildMemberData] -> Encoding)
-> ToJSON AddGuildMemberData
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [AddGuildMemberData] -> Encoding
$ctoEncodingList :: [AddGuildMemberData] -> Encoding
toJSONList :: [AddGuildMemberData] -> Value
$ctoJSONList :: [AddGuildMemberData] -> Value
toEncoding :: AddGuildMemberData -> Encoding
$ctoEncoding :: AddGuildMemberData -> Encoding
toJSON :: AddGuildMemberData -> Value
$ctoJSON :: AddGuildMemberData -> Value
ToJSON ) via CalamityJSON AddGuildMemberData

data ModifyGuildMemberData = ModifyGuildMemberData
  { ModifyGuildMemberData -> Maybe Text
nick      :: Maybe Text
  , ModifyGuildMemberData -> Maybe [Snowflake Role]
roles     :: Maybe [Snowflake Role]
  , ModifyGuildMemberData -> Maybe Bool
mute      :: Maybe Bool
  , ModifyGuildMemberData -> Maybe Bool
deaf      :: Maybe Bool
  , ModifyGuildMemberData -> Maybe (Snowflake VoiceChannel)
channelID :: Maybe (Snowflake VoiceChannel)
  }
  deriving ( 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
showList :: [ModifyGuildMemberData] -> ShowS
$cshowList :: [ModifyGuildMemberData] -> ShowS
show :: ModifyGuildMemberData -> String
$cshow :: ModifyGuildMemberData -> String
showsPrec :: Int -> ModifyGuildMemberData -> ShowS
$cshowsPrec :: Int -> ModifyGuildMemberData -> ShowS
Show, (forall x. ModifyGuildMemberData -> Rep ModifyGuildMemberData x)
-> (forall x. Rep ModifyGuildMemberData x -> ModifyGuildMemberData)
-> Generic ModifyGuildMemberData
forall x. Rep ModifyGuildMemberData x -> ModifyGuildMemberData
forall x. ModifyGuildMemberData -> Rep ModifyGuildMemberData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModifyGuildMemberData x -> ModifyGuildMemberData
$cfrom :: forall x. ModifyGuildMemberData -> Rep ModifyGuildMemberData x
Generic, ModifyGuildMemberData
ModifyGuildMemberData -> Default ModifyGuildMemberData
forall a. a -> Default a
def :: ModifyGuildMemberData
$cdef :: ModifyGuildMemberData
Default )
  deriving ( [ModifyGuildMemberData] -> Encoding
[ModifyGuildMemberData] -> Value
ModifyGuildMemberData -> Encoding
ModifyGuildMemberData -> Value
(ModifyGuildMemberData -> Value)
-> (ModifyGuildMemberData -> Encoding)
-> ([ModifyGuildMemberData] -> Value)
-> ([ModifyGuildMemberData] -> Encoding)
-> ToJSON ModifyGuildMemberData
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [ModifyGuildMemberData] -> Encoding
$ctoEncodingList :: [ModifyGuildMemberData] -> Encoding
toJSONList :: [ModifyGuildMemberData] -> Value
$ctoJSONList :: [ModifyGuildMemberData] -> Value
toEncoding :: ModifyGuildMemberData -> Encoding
$ctoEncoding :: ModifyGuildMemberData -> Encoding
toJSON :: ModifyGuildMemberData -> Value
$ctoJSON :: ModifyGuildMemberData -> Value
ToJSON ) via CalamityJSON ModifyGuildMemberData

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
showList :: [CreateGuildBanData] -> ShowS
$cshowList :: [CreateGuildBanData] -> ShowS
show :: CreateGuildBanData -> String
$cshow :: CreateGuildBanData -> String
showsPrec :: Int -> CreateGuildBanData -> ShowS
$cshowsPrec :: Int -> CreateGuildBanData -> ShowS
Show, (forall x. CreateGuildBanData -> Rep CreateGuildBanData x)
-> (forall x. Rep CreateGuildBanData x -> CreateGuildBanData)
-> Generic CreateGuildBanData
forall x. Rep CreateGuildBanData x -> CreateGuildBanData
forall x. CreateGuildBanData -> Rep CreateGuildBanData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateGuildBanData x -> CreateGuildBanData
$cfrom :: forall x. CreateGuildBanData -> Rep CreateGuildBanData x
Generic, CreateGuildBanData
CreateGuildBanData -> Default CreateGuildBanData
forall a. a -> Default a
def :: CreateGuildBanData
$cdef :: CreateGuildBanData
Default )

data ModifyGuildRoleData = ModifyGuildRoleData
  { ModifyGuildRoleData -> Maybe Text
name        :: Maybe Text
  , ModifyGuildRoleData -> Maybe Permissions
permissions :: Maybe Permissions
  , ModifyGuildRoleData -> Maybe (Colour Double)
color       :: Maybe (Colour Double)
  , ModifyGuildRoleData -> Maybe Bool
hoist       :: Maybe Bool
  , ModifyGuildRoleData -> Maybe Bool
mentionable :: Maybe Bool
  }
  deriving ( 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
showList :: [ModifyGuildRoleData] -> ShowS
$cshowList :: [ModifyGuildRoleData] -> ShowS
show :: ModifyGuildRoleData -> String
$cshow :: ModifyGuildRoleData -> String
showsPrec :: Int -> ModifyGuildRoleData -> ShowS
$cshowsPrec :: Int -> ModifyGuildRoleData -> ShowS
Show, (forall x. ModifyGuildRoleData -> Rep ModifyGuildRoleData x)
-> (forall x. Rep ModifyGuildRoleData x -> ModifyGuildRoleData)
-> Generic ModifyGuildRoleData
forall x. Rep ModifyGuildRoleData x -> ModifyGuildRoleData
forall x. ModifyGuildRoleData -> Rep ModifyGuildRoleData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModifyGuildRoleData x -> ModifyGuildRoleData
$cfrom :: forall x. ModifyGuildRoleData -> Rep ModifyGuildRoleData x
Generic, ModifyGuildRoleData
ModifyGuildRoleData -> Default ModifyGuildRoleData
forall a. a -> Default a
def :: ModifyGuildRoleData
$cdef :: ModifyGuildRoleData
Default )
  deriving ( [ModifyGuildRoleData] -> Encoding
[ModifyGuildRoleData] -> Value
ModifyGuildRoleData -> Encoding
ModifyGuildRoleData -> Value
(ModifyGuildRoleData -> Value)
-> (ModifyGuildRoleData -> Encoding)
-> ([ModifyGuildRoleData] -> Value)
-> ([ModifyGuildRoleData] -> Encoding)
-> ToJSON ModifyGuildRoleData
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [ModifyGuildRoleData] -> Encoding
$ctoEncodingList :: [ModifyGuildRoleData] -> Encoding
toJSONList :: [ModifyGuildRoleData] -> Value
$ctoJSONList :: [ModifyGuildRoleData] -> Value
toEncoding :: ModifyGuildRoleData -> Encoding
$ctoEncoding :: ModifyGuildRoleData -> Encoding
toJSON :: ModifyGuildRoleData -> Value
$ctoJSON :: ModifyGuildRoleData -> Value
ToJSON ) via CalamityJSON ModifyGuildRoleData

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
showList :: [ModifyGuildRolePositionsData] -> ShowS
$cshowList :: [ModifyGuildRolePositionsData] -> ShowS
show :: ModifyGuildRolePositionsData -> String
$cshow :: ModifyGuildRolePositionsData -> String
showsPrec :: Int -> ModifyGuildRolePositionsData -> ShowS
$cshowsPrec :: Int -> ModifyGuildRolePositionsData -> ShowS
Show, (forall x.
 ModifyGuildRolePositionsData -> Rep ModifyGuildRolePositionsData x)
-> (forall x.
    Rep ModifyGuildRolePositionsData x -> ModifyGuildRolePositionsData)
-> Generic ModifyGuildRolePositionsData
forall x.
Rep ModifyGuildRolePositionsData x -> ModifyGuildRolePositionsData
forall x.
ModifyGuildRolePositionsData -> Rep ModifyGuildRolePositionsData x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyGuildRolePositionsData x -> ModifyGuildRolePositionsData
$cfrom :: forall x.
ModifyGuildRolePositionsData -> Rep ModifyGuildRolePositionsData x
Generic )
  deriving ( [ModifyGuildRolePositionsData] -> Encoding
[ModifyGuildRolePositionsData] -> Value
ModifyGuildRolePositionsData -> Encoding
ModifyGuildRolePositionsData -> Value
(ModifyGuildRolePositionsData -> Value)
-> (ModifyGuildRolePositionsData -> Encoding)
-> ([ModifyGuildRolePositionsData] -> Value)
-> ([ModifyGuildRolePositionsData] -> Encoding)
-> ToJSON ModifyGuildRolePositionsData
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [ModifyGuildRolePositionsData] -> Encoding
$ctoEncodingList :: [ModifyGuildRolePositionsData] -> Encoding
toJSONList :: [ModifyGuildRolePositionsData] -> Value
$ctoJSONList :: [ModifyGuildRolePositionsData] -> Value
toEncoding :: ModifyGuildRolePositionsData -> Encoding
$ctoEncoding :: ModifyGuildRolePositionsData -> Encoding
toJSON :: ModifyGuildRolePositionsData -> Value
$ctoJSON :: ModifyGuildRolePositionsData -> Value
ToJSON ) via CalamityJSON ModifyGuildRolePositionsData

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]
  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 ->                                 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 '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute id :: Snowflake Guild
id = RouteBuilder '[]
mkRouteBuilder RouteBuilder '[] -> S -> ConsRes S '[]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "guilds" RouteBuilder '[] -> ID Guild -> ConsRes (ID Guild) '[]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// ID Guild
forall k (a :: k). ID a
ID @Guild
  RouteBuilder '[ '(Guild, 'Required)]
-> (RouteBuilder '[ '(Guild, 'Required)]
    -> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)])
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Required)]
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall k (ids :: [(*, RouteRequirement)]).
Typeable k =>
Snowflake k
-> RouteBuilder ids -> RouteBuilder ('(k, 'Satisfied) : ids)
giveID Snowflake Guild
id

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

  route :: GuildRequest a -> Route
route (CreateGuild _) = RouteBuilder '[]
mkRouteBuilder RouteBuilder '[] -> S -> ConsRes S '[]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "guilds"
    RouteBuilder '[] -> (RouteBuilder '[] -> Route) -> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder '[] -> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (GetGuild (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid)) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid
    RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)] -> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (ModifyGuild (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) _) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid
    RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)] -> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (DeleteGuild (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid)) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid
    RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)] -> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (GetGuildChannels (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid)) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "channels"
    RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)] -> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (CreateGuildChannel (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) _) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "channels"
    RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)] -> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (ModifyGuildChannelPositions (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) _) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "channels"
    RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)] -> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (GetGuildMember (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall a. HasID User a => a -> Snowflake User
forall b a. HasID b a => a -> Snowflake b
getID @User -> Snowflake User
uid)) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "members" RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> ID User
-> ConsRes (ID User) '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// ID User
forall k (a :: k). ID a
ID @User
    RouteBuilder
  '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> RouteBuilder
         '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
            '(Guild, 'Required)])
-> RouteBuilder
     '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
        '(Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
     '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> RouteBuilder
     '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
        '(Guild, 'Required)]
forall k (ids :: [(*, RouteRequirement)]).
Typeable k =>
Snowflake k
-> RouteBuilder ids -> RouteBuilder ('(k, 'Satisfied) : ids)
giveID Snowflake User
uid
    RouteBuilder
  '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
     '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
         '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
     '(Guild, 'Required)]
-> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (ListGuildMembers (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) _) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "members"
    RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)] -> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (AddGuildMember (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall a. HasID User a => a -> Snowflake User
forall b a. HasID b a => a -> Snowflake b
getID @User -> Snowflake User
uid) _) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "members" RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> ID User
-> ConsRes (ID User) '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// ID User
forall k (a :: k). ID a
ID @User
    RouteBuilder
  '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> RouteBuilder
         '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
            '(Guild, 'Required)])
-> RouteBuilder
     '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
        '(Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
     '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> RouteBuilder
     '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
        '(Guild, 'Required)]
forall k (ids :: [(*, RouteRequirement)]).
Typeable k =>
Snowflake k
-> RouteBuilder ids -> RouteBuilder ('(k, 'Satisfied) : ids)
giveID Snowflake User
uid
    RouteBuilder
  '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
     '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
         '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
     '(Guild, 'Required)]
-> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (ModifyGuildMember (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall a. HasID User a => a -> Snowflake User
forall b a. HasID b a => a -> Snowflake b
getID @User -> Snowflake User
uid) _) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "members" RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> ID User
-> ConsRes (ID User) '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// ID User
forall k (a :: k). ID a
ID @User
    RouteBuilder
  '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> RouteBuilder
         '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
            '(Guild, 'Required)])
-> RouteBuilder
     '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
        '(Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
     '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> RouteBuilder
     '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
        '(Guild, 'Required)]
forall k (ids :: [(*, RouteRequirement)]).
Typeable k =>
Snowflake k
-> RouteBuilder ids -> RouteBuilder ('(k, 'Satisfied) : ids)
giveID Snowflake User
uid
    RouteBuilder
  '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
     '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
         '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
     '(Guild, 'Required)]
-> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (ModifyCurrentUserNick (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) _) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "members" RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "@me" RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "nick"
    RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)] -> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (AddGuildMemberRole (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall a. HasID User a => a -> Snowflake User
forall b a. HasID b a => a -> Snowflake b
getID @User -> Snowflake User
uid) (forall a. HasID Role a => a -> Snowflake Role
forall b a. HasID b a => a -> Snowflake b
getID @Role -> Snowflake Role
rid)) =
    Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "members" RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> ID User
-> ConsRes (ID User) '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// ID User
forall k (a :: k). ID a
ID @User RouteBuilder
  '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S
-> ConsRes
     S '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "roles" RouteBuilder
  '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> ID Role
-> ConsRes
     (ID Role)
     '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// ID Role
forall k (a :: k). ID a
ID @Role
    RouteBuilder
  '[ '(Role, 'Required), '(User, 'Required), '(Guild, 'Satisfied),
     '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(Role, 'Required), '(User, 'Required), '(Guild, 'Satisfied),
         '(Guild, 'Required)]
    -> RouteBuilder
         '[ '(User, 'Satisfied), '(Role, 'Required), '(User, 'Required),
            '(Guild, 'Satisfied), '(Guild, 'Required)])
-> RouteBuilder
     '[ '(User, 'Satisfied), '(Role, 'Required), '(User, 'Required),
        '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
     '[ '(Role, 'Required), '(User, 'Required), '(Guild, 'Satisfied),
        '(Guild, 'Required)]
-> RouteBuilder
     '[ '(User, 'Satisfied), '(Role, 'Required), '(User, 'Required),
        '(Guild, 'Satisfied), '(Guild, 'Required)]
forall k (ids :: [(*, RouteRequirement)]).
Typeable k =>
Snowflake k
-> RouteBuilder ids -> RouteBuilder ('(k, 'Satisfied) : ids)
giveID Snowflake User
uid
    RouteBuilder
  '[ '(User, 'Satisfied), '(Role, 'Required), '(User, 'Required),
     '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(User, 'Satisfied), '(Role, 'Required), '(User, 'Required),
         '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> RouteBuilder
         '[ '(Role, 'Satisfied), '(User, 'Satisfied), '(Role, 'Required),
            '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)])
-> RouteBuilder
     '[ '(Role, 'Satisfied), '(User, 'Satisfied), '(Role, 'Required),
        '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake Role
-> RouteBuilder
     '[ '(User, 'Satisfied), '(Role, 'Required), '(User, 'Required),
        '(Guild, 'Satisfied), '(Guild, 'Required)]
-> RouteBuilder
     '[ '(Role, 'Satisfied), '(User, 'Satisfied), '(Role, 'Required),
        '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
forall k (ids :: [(*, RouteRequirement)]).
Typeable k =>
Snowflake k
-> RouteBuilder ids -> RouteBuilder ('(k, 'Satisfied) : ids)
giveID Snowflake Role
rid
    RouteBuilder
  '[ '(Role, 'Satisfied), '(User, 'Satisfied), '(Role, 'Required),
     '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(Role, 'Satisfied), '(User, 'Satisfied), '(Role, 'Required),
         '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '(Role, 'Satisfied), '(User, 'Satisfied), '(Role, 'Required),
     '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (RemoveGuildMemberRole (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall a. HasID User a => a -> Snowflake User
forall b a. HasID b a => a -> Snowflake b
getID @User -> Snowflake User
uid) (forall a. HasID Role a => a -> Snowflake Role
forall b a. HasID b a => a -> Snowflake b
getID @Role -> Snowflake Role
rid)) =
    Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "members" RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> ID User
-> ConsRes (ID User) '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// ID User
forall k (a :: k). ID a
ID @User RouteBuilder
  '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S
-> ConsRes
     S '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "roles" RouteBuilder
  '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> ID Role
-> ConsRes
     (ID Role)
     '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// ID Role
forall k (a :: k). ID a
ID @Role
    RouteBuilder
  '[ '(Role, 'Required), '(User, 'Required), '(Guild, 'Satisfied),
     '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(Role, 'Required), '(User, 'Required), '(Guild, 'Satisfied),
         '(Guild, 'Required)]
    -> RouteBuilder
         '[ '(User, 'Satisfied), '(Role, 'Required), '(User, 'Required),
            '(Guild, 'Satisfied), '(Guild, 'Required)])
-> RouteBuilder
     '[ '(User, 'Satisfied), '(Role, 'Required), '(User, 'Required),
        '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
     '[ '(Role, 'Required), '(User, 'Required), '(Guild, 'Satisfied),
        '(Guild, 'Required)]
-> RouteBuilder
     '[ '(User, 'Satisfied), '(Role, 'Required), '(User, 'Required),
        '(Guild, 'Satisfied), '(Guild, 'Required)]
forall k (ids :: [(*, RouteRequirement)]).
Typeable k =>
Snowflake k
-> RouteBuilder ids -> RouteBuilder ('(k, 'Satisfied) : ids)
giveID Snowflake User
uid
    RouteBuilder
  '[ '(User, 'Satisfied), '(Role, 'Required), '(User, 'Required),
     '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(User, 'Satisfied), '(Role, 'Required), '(User, 'Required),
         '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> RouteBuilder
         '[ '(Role, 'Satisfied), '(User, 'Satisfied), '(Role, 'Required),
            '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)])
-> RouteBuilder
     '[ '(Role, 'Satisfied), '(User, 'Satisfied), '(Role, 'Required),
        '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake Role
-> RouteBuilder
     '[ '(User, 'Satisfied), '(Role, 'Required), '(User, 'Required),
        '(Guild, 'Satisfied), '(Guild, 'Required)]
-> RouteBuilder
     '[ '(Role, 'Satisfied), '(User, 'Satisfied), '(Role, 'Required),
        '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
forall k (ids :: [(*, RouteRequirement)]).
Typeable k =>
Snowflake k
-> RouteBuilder ids -> RouteBuilder ('(k, 'Satisfied) : ids)
giveID Snowflake Role
rid
    RouteBuilder
  '[ '(Role, 'Satisfied), '(User, 'Satisfied), '(Role, 'Required),
     '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(Role, 'Satisfied), '(User, 'Satisfied), '(Role, 'Required),
         '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '(Role, 'Satisfied), '(User, 'Satisfied), '(Role, 'Required),
     '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (RemoveGuildMember (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall a. HasID User a => a -> Snowflake User
forall b a. HasID b a => a -> Snowflake b
getID @User -> Snowflake User
uid)) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "members" RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> ID User
-> ConsRes (ID User) '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// ID User
forall k (a :: k). ID a
ID @User
    RouteBuilder
  '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> RouteBuilder
         '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
            '(Guild, 'Required)])
-> RouteBuilder
     '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
        '(Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
     '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> RouteBuilder
     '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
        '(Guild, 'Required)]
forall k (ids :: [(*, RouteRequirement)]).
Typeable k =>
Snowflake k
-> RouteBuilder ids -> RouteBuilder ('(k, 'Satisfied) : ids)
giveID Snowflake User
uid
    RouteBuilder
  '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
     '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
         '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
     '(Guild, 'Required)]
-> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (GetGuildBans (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid)) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "bans"
    RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)] -> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (GetGuildBan (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall a. HasID User a => a -> Snowflake User
forall b a. HasID b a => a -> Snowflake b
getID @User -> Snowflake User
uid)) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "bans" RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> ID User
-> ConsRes (ID User) '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// ID User
forall k (a :: k). ID a
ID @User
    RouteBuilder
  '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> RouteBuilder
         '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
            '(Guild, 'Required)])
-> RouteBuilder
     '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
        '(Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
     '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> RouteBuilder
     '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
        '(Guild, 'Required)]
forall k (ids :: [(*, RouteRequirement)]).
Typeable k =>
Snowflake k
-> RouteBuilder ids -> RouteBuilder ('(k, 'Satisfied) : ids)
giveID Snowflake User
uid
    RouteBuilder
  '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
     '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
         '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
     '(Guild, 'Required)]
-> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (CreateGuildBan (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall a. HasID User a => a -> Snowflake User
forall b a. HasID b a => a -> Snowflake b
getID @User -> Snowflake User
uid) _) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "bans" RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> ID User
-> ConsRes (ID User) '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// ID User
forall k (a :: k). ID a
ID @User
    RouteBuilder
  '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> RouteBuilder
         '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
            '(Guild, 'Required)])
-> RouteBuilder
     '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
        '(Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
     '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> RouteBuilder
     '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
        '(Guild, 'Required)]
forall k (ids :: [(*, RouteRequirement)]).
Typeable k =>
Snowflake k
-> RouteBuilder ids -> RouteBuilder ('(k, 'Satisfied) : ids)
giveID Snowflake User
uid
    RouteBuilder
  '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
     '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
         '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
     '(Guild, 'Required)]
-> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (RemoveGuildBan (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall a. HasID User a => a -> Snowflake User
forall b a. HasID b a => a -> Snowflake b
getID @User -> Snowflake User
uid)) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "bans" RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> ID User
-> ConsRes (ID User) '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// ID User
forall k (a :: k). ID a
ID @User
    RouteBuilder
  '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> RouteBuilder
         '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
            '(Guild, 'Required)])
-> RouteBuilder
     '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
        '(Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
     '[ '(User, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> RouteBuilder
     '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
        '(Guild, 'Required)]
forall k (ids :: [(*, RouteRequirement)]).
Typeable k =>
Snowflake k
-> RouteBuilder ids -> RouteBuilder ('(k, 'Satisfied) : ids)
giveID Snowflake User
uid
    RouteBuilder
  '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
     '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
         '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '(User, 'Satisfied), '(User, 'Required), '(Guild, 'Satisfied),
     '(Guild, 'Required)]
-> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (GetGuildRoles (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid)) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "roles"
    RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)] -> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (CreateGuildRole (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) _) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "roles"
    RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)] -> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (ModifyGuildRolePositions (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) _) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "roles"
    RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)] -> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (ModifyGuildRole (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall a. HasID Role a => a -> Snowflake Role
forall b a. HasID b a => a -> Snowflake b
getID @Role -> Snowflake Role
rid) _) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "roles" RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> ID Role
-> ConsRes (ID Role) '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// ID Role
forall k (a :: k). ID a
ID @Role
    RouteBuilder
  '[ '(Role, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(Role, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> RouteBuilder
         '[ '(Role, 'Satisfied), '(Role, 'Required), '(Guild, 'Satisfied),
            '(Guild, 'Required)])
-> RouteBuilder
     '[ '(Role, 'Satisfied), '(Role, 'Required), '(Guild, 'Satisfied),
        '(Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake Role
-> RouteBuilder
     '[ '(Role, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> RouteBuilder
     '[ '(Role, 'Satisfied), '(Role, 'Required), '(Guild, 'Satisfied),
        '(Guild, 'Required)]
forall k (ids :: [(*, RouteRequirement)]).
Typeable k =>
Snowflake k
-> RouteBuilder ids -> RouteBuilder ('(k, 'Satisfied) : ids)
giveID Snowflake Role
rid
    RouteBuilder
  '[ '(Role, 'Satisfied), '(Role, 'Required), '(Guild, 'Satisfied),
     '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(Role, 'Satisfied), '(Role, 'Required), '(Guild, 'Satisfied),
         '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '(Role, 'Satisfied), '(Role, 'Required), '(Guild, 'Satisfied),
     '(Guild, 'Required)]
-> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (DeleteGuildRole (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) (forall a. HasID Role a => a -> Snowflake Role
forall b a. HasID b a => a -> Snowflake b
getID @Role -> Snowflake Role
rid)) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "roles" RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> ID Role
-> ConsRes (ID Role) '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// ID Role
forall k (a :: k). ID a
ID @Role
    RouteBuilder
  '[ '(Role, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(Role, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> RouteBuilder
         '[ '(Role, 'Satisfied), '(Role, 'Required), '(Guild, 'Satisfied),
            '(Guild, 'Required)])
-> RouteBuilder
     '[ '(Role, 'Satisfied), '(Role, 'Required), '(Guild, 'Satisfied),
        '(Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake Role
-> RouteBuilder
     '[ '(Role, 'Required), '(Guild, 'Satisfied), '(Guild, 'Required)]
-> RouteBuilder
     '[ '(Role, 'Satisfied), '(Role, 'Required), '(Guild, 'Satisfied),
        '(Guild, 'Required)]
forall k (ids :: [(*, RouteRequirement)]).
Typeable k =>
Snowflake k
-> RouteBuilder ids -> RouteBuilder ('(k, 'Satisfied) : ids)
giveID Snowflake Role
rid
    RouteBuilder
  '[ '(Role, 'Satisfied), '(Role, 'Required), '(Guild, 'Satisfied),
     '(Guild, 'Required)]
-> (RouteBuilder
      '[ '(Role, 'Satisfied), '(Role, 'Required), '(Guild, 'Satisfied),
         '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
  '[ '(Role, 'Satisfied), '(Role, 'Required), '(Guild, 'Satisfied),
     '(Guild, 'Required)]
-> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (GetGuildPruneCount (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) _) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "prune"
    RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)] -> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (BeginGuildPrune (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid) _ _) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "prune"
    RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)] -> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (GetGuildVoiceRegions (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid)) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "regions"
    RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)] -> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute
  route (GetGuildInvites (g -> Snowflake Guild
forall b a. HasID b a => a -> Snowflake b
getID -> Snowflake Guild
gid)) = Snowflake Guild
-> RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
baseRoute Snowflake Guild
gid RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> S -> ConsRes S '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
forall a (ids :: [(*, RouteRequirement)]).
RouteFragmentable a ids =>
RouteBuilder ids -> a -> ConsRes a ids
// Text -> S
S "invites"
    RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
-> (RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)]
    -> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder '[ '(Guild, 'Satisfied), '(Guild, 'Required)] -> Route
forall (ids :: [(*, RouteRequirement)]).
EnsureFulfilled ids =>
RouteBuilder ids -> Route
buildRoute

  action :: GuildRequest a -> Options -> String -> IO (Response ByteString)
action (CreateGuild o :: CreateGuildData
o) = Value -> Options -> String -> IO (Response ByteString)
forall a.
Postable a =>
a -> Options -> String -> IO (Response ByteString)
postWith' (CreateGuildData -> Value
forall a. ToJSON a => a -> Value
toJSON CreateGuildData
o)
  action (GetGuild _) = Options -> String -> IO (Response ByteString)
getWith
  action (ModifyGuild _ o :: ModifyGuildData
o) = Value -> Options -> String -> IO (Response ByteString)
forall a.
Patchable a =>
a -> Options -> String -> IO (Response ByteString)
patchWith' (ModifyGuildData -> Value
forall a. ToJSON a => a -> Value
toJSON ModifyGuildData
o)
  action (DeleteGuild _) = Options -> String -> IO (Response ByteString)
deleteWith
  action (GetGuildChannels _) = Options -> String -> IO (Response ByteString)
getWith
  action (CreateGuildChannel _ o :: ChannelCreateData
o) = Value -> Options -> String -> IO (Response ByteString)
forall a.
Postable a =>
a -> Options -> String -> IO (Response ByteString)
postWith' (ChannelCreateData -> Value
forall a. ToJSON a => a -> Value
toJSON ChannelCreateData
o)
  action (ModifyGuildChannelPositions _ o :: [ChannelPosition]
o) = Value -> Options -> String -> IO (Response ByteString)
forall a.
Postable a =>
a -> Options -> String -> IO (Response ByteString)
postWith' ([ChannelPosition] -> Value
forall a. ToJSON a => a -> Value
toJSON [ChannelPosition]
o)
  action (GetGuildMember _ _) = Options -> String -> IO (Response ByteString)
getWith
  action (ListGuildMembers _ ListMembersOptions { Maybe Integer
limit :: Maybe Integer
$sel:limit:ListMembersOptions :: ListMembersOptions -> Maybe Integer
limit, Maybe (Snowflake User)
after :: Maybe (Snowflake User)
$sel:after:ListMembersOptions :: ListMembersOptions -> Maybe (Snowflake User)
after }) = (Options -> Options)
-> Options -> String -> IO (Response ByteString)
getWithP
    (Text -> Lens' Options [Text]
param "limit" (([Text] -> Identity [Text]) -> Options -> Identity Options)
-> [Text] -> Options -> Options
forall s t a b. ASetter s t a b -> b -> s -> t
.~ Maybe Text -> [Text]
forall a. Maybe a -> [a]
maybeToList (Integer -> Text
forall a. TextShow a => a -> Text
showt (Integer -> Text) -> Maybe Integer -> Maybe Text
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Maybe Integer
limit) (Options -> Options) -> (Options -> Options) -> Options -> Options
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> Text -> Lens' Options [Text]
param "after" (([Text] -> Identity [Text]) -> Options -> Identity Options)
-> [Text] -> Options -> Options
forall s t a b. ASetter s t a b -> b -> s -> t
.~ Maybe Text -> [Text]
forall a. Maybe a -> [a]
maybeToList (Snowflake User -> Text
forall a. TextShow a => a -> Text
showt (Snowflake User -> Text) -> Maybe (Snowflake User) -> Maybe Text
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Maybe (Snowflake User)
after))
  action (AddGuildMember _ _ o :: AddGuildMemberData
o) = Value -> Options -> String -> IO (Response ByteString)
forall a.
Putable a =>
a -> Options -> String -> IO (Response ByteString)
putWith' (AddGuildMemberData -> Value
forall a. ToJSON a => a -> Value
toJSON AddGuildMemberData
o)
  action (ModifyGuildMember _ _ o :: ModifyGuildMemberData
o) = Value -> Options -> String -> IO (Response ByteString)
forall a.
Patchable a =>
a -> Options -> String -> IO (Response ByteString)
patchWith' (ModifyGuildMemberData -> Value
forall a. ToJSON a => a -> Value
toJSON ModifyGuildMemberData
o)
  action (ModifyCurrentUserNick _ nick :: Maybe Text
nick) = Value -> Options -> String -> IO (Response ByteString)
forall a.
Patchable a =>
a -> Options -> String -> IO (Response ByteString)
patchWith' ([Pair] -> Value
object ["nick" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
.= Maybe Text
nick])
  action (AddGuildMemberRole {}) = Options -> String -> IO (Response ByteString)
putEmpty
  action (RemoveGuildMemberRole {}) = Options -> String -> IO (Response ByteString)
deleteWith
  action (RemoveGuildMember _ _) = Options -> String -> IO (Response ByteString)
deleteWith
  action (GetGuildBans _) = Options -> String -> IO (Response ByteString)
getWith
  action (GetGuildBan _ _) = Options -> String -> IO (Response ByteString)
getWith
  action (CreateGuildBan _ _ CreateGuildBanData { Maybe Integer
deleteMessageDays :: Maybe Integer
$sel:deleteMessageDays:CreateGuildBanData :: CreateGuildBanData -> Maybe Integer
deleteMessageDays, Maybe Text
reason :: Maybe Text
$sel:reason:CreateGuildBanData :: CreateGuildBanData -> Maybe Text
reason }) = (Options -> Options)
-> Options -> String -> IO (Response ByteString)
putEmptyP
    (Text -> Lens' Options [Text]
param "delete-message-days" (([Text] -> Identity [Text]) -> Options -> Identity Options)
-> [Text] -> Options -> Options
forall s t a b. ASetter s t a b -> b -> s -> t
.~ Maybe Text -> [Text]
forall a. Maybe a -> [a]
maybeToList (Integer -> Text
forall a. TextShow a => a -> Text
showt (Integer -> Text) -> Maybe Integer -> Maybe Text
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Maybe Integer
deleteMessageDays) (Options -> Options) -> (Options -> Options) -> Options -> Options
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> Text -> Lens' Options [Text]
param "reason" (([Text] -> Identity [Text]) -> Options -> Identity Options)
-> [Text] -> Options -> Options
forall s t a b. ASetter s t a b -> b -> s -> t
.~ Maybe Text -> [Text]
forall a. Maybe a -> [a]
maybeToList
     (Text -> Text
forall a. TextShow a => a -> Text
showt (Text -> Text) -> Maybe Text -> Maybe Text
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Maybe Text
reason))
  action (RemoveGuildBan _ _) = Options -> String -> IO (Response ByteString)
deleteWith
  action (GetGuildRoles _) = Options -> String -> IO (Response ByteString)
getWith
  action (CreateGuildRole _ o :: ModifyGuildRoleData
o) = Value -> Options -> String -> IO (Response ByteString)
forall a.
Postable a =>
a -> Options -> String -> IO (Response ByteString)
postWith' (ModifyGuildRoleData -> Value
forall a. ToJSON a => a -> Value
toJSON ModifyGuildRoleData
o)
  action (ModifyGuildRolePositions _ o :: ModifyGuildRolePositionsData
o) = Value -> Options -> String -> IO (Response ByteString)
forall a.
Patchable a =>
a -> Options -> String -> IO (Response ByteString)
patchWith' (ModifyGuildRolePositionsData -> Value
forall a. ToJSON a => a -> Value
toJSON ModifyGuildRolePositionsData
o)
  action (ModifyGuildRole _ _ o :: ModifyGuildRoleData
o) = Value -> Options -> String -> IO (Response ByteString)
forall a.
Patchable a =>
a -> Options -> String -> IO (Response ByteString)
patchWith' (ModifyGuildRoleData -> Value
forall a. ToJSON a => a -> Value
toJSON ModifyGuildRoleData
o)
  action (DeleteGuildRole _ _) = Options -> String -> IO (Response ByteString)
deleteWith
  action (GetGuildPruneCount _ d :: Integer
d) = (Options -> Options)
-> Options -> String -> IO (Response ByteString)
getWithP (Text -> Lens' Options [Text]
param "days" (([Text] -> Identity [Text]) -> Options -> Identity Options)
-> [Text] -> Options -> Options
forall s t a b. ASetter s t a b -> b -> s -> t
.~ [Integer -> Text
forall a. TextShow a => a -> Text
showt Integer
d])
  action (BeginGuildPrune _ d :: Integer
d r :: Bool
r) = (Options -> Options)
-> Options -> String -> IO (Response ByteString)
postEmptyP (Text -> Lens' Options [Text]
param "days" (([Text] -> Identity [Text]) -> Options -> Identity Options)
-> [Text] -> Options -> Options
forall s t a b. ASetter s t a b -> b -> s -> t
.~ [Integer -> Text
forall a. TextShow a => a -> Text
showt Integer
d] (Options -> Options) -> (Options -> Options) -> Options -> Options
forall k (cat :: k -> k -> *) (a :: k) (b :: k) (c :: k).
Category cat =>
cat a b -> cat b c -> cat a c
>>> Text -> Lens' Options [Text]
param "compute_prune_count" (([Text] -> Identity [Text]) -> Options -> Identity Options)
-> [Text] -> Options -> Options
forall s t a b. ASetter s t a b -> b -> s -> t
.~ [Bool -> Text
forall a. TextShow a => a -> Text
showt Bool
r])
  action (GetGuildVoiceRegions _) = Options -> String -> IO (Response ByteString)
getWith
  action (GetGuildInvites _) = Options -> String -> IO (Response ByteString)
getWith