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.AesonThings
import Calamity.Internal.IntColour
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.Lens hiding ((.=))
import Data.Aeson
import qualified Data.Aeson.KeyMap as K
import Data.Aeson.Lens
import Data.Colour (Colour)
import Data.Default.Class
import Data.Text (Text)
import GHC.Generics
import Network.HTTP.Req
import TextShow
data CreateGuildData = CreateGuildData
{ CreateGuildData -> Text
name :: Text
, CreateGuildData -> Text
region :: Text
, CreateGuildData -> Text
icon :: Text
, CreateGuildData -> Integer
verificationLevel :: Integer
, 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
, 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 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
showList :: [SearchMembersOptions] -> ShowS
$cshowList :: [SearchMembersOptions] -> ShowS
show :: SearchMembersOptions -> String
$cshow :: SearchMembersOptions -> String
showsPrec :: Int -> SearchMembersOptions -> ShowS
$cshowsPrec :: Int -> SearchMembersOptions -> ShowS
Show, (forall x. SearchMembersOptions -> Rep SearchMembersOptions x)
-> (forall x. Rep SearchMembersOptions x -> SearchMembersOptions)
-> Generic SearchMembersOptions
forall x. Rep SearchMembersOptions x -> SearchMembersOptions
forall x. SearchMembersOptions -> Rep SearchMembersOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SearchMembersOptions x -> SearchMembersOptions
$cfrom :: forall x. SearchMembersOptions -> Rep SearchMembersOptions x
Generic)
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
newtype ModifyGuildMemberData = ModifyGuildMemberData Object
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)
deriving newtype ([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, b -> ModifyGuildMemberData -> ModifyGuildMemberData
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
stimes :: b -> ModifyGuildMemberData -> ModifyGuildMemberData
$cstimes :: forall b.
Integral b =>
b -> ModifyGuildMemberData -> ModifyGuildMemberData
sconcat :: NonEmpty ModifyGuildMemberData -> ModifyGuildMemberData
$csconcat :: NonEmpty ModifyGuildMemberData -> ModifyGuildMemberData
<> :: ModifyGuildMemberData
-> ModifyGuildMemberData -> ModifyGuildMemberData
$c<> :: ModifyGuildMemberData
-> 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
mconcat :: [ModifyGuildMemberData] -> ModifyGuildMemberData
$cmconcat :: [ModifyGuildMemberData] -> ModifyGuildMemberData
mappend :: ModifyGuildMemberData
-> ModifyGuildMemberData -> ModifyGuildMemberData
$cmappend :: ModifyGuildMemberData
-> ModifyGuildMemberData -> ModifyGuildMemberData
mempty :: ModifyGuildMemberData
$cmempty :: ModifyGuildMemberData
$cp1Monoid :: Semigroup 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
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
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
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
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
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
showList :: [GetGuildBansOptions] -> ShowS
$cshowList :: [GetGuildBansOptions] -> ShowS
show :: GetGuildBansOptions -> String
$cshow :: GetGuildBansOptions -> String
showsPrec :: Int -> GetGuildBansOptions -> ShowS
$cshowsPrec :: Int -> GetGuildBansOptions -> ShowS
Show, (forall x. GetGuildBansOptions -> Rep GetGuildBansOptions x)
-> (forall x. Rep GetGuildBansOptions x -> GetGuildBansOptions)
-> Generic GetGuildBansOptions
forall x. Rep GetGuildBansOptions x -> GetGuildBansOptions
forall x. GetGuildBansOptions -> Rep GetGuildBansOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetGuildBansOptions x -> GetGuildBansOptions
$cfrom :: forall x. GetGuildBansOptions -> Rep GetGuildBansOptions x
Generic, GetGuildBansOptions
GetGuildBansOptions -> Default GetGuildBansOptions
forall a. a -> Default a
def :: GetGuildBansOptions
$cdef :: GetGuildBansOptions
Default)
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)
newtype ModifyGuildRoleData = ModifyGuildRoleData Object
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)
deriving newtype ([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, b -> ModifyGuildRoleData -> ModifyGuildRoleData
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
stimes :: b -> ModifyGuildRoleData -> ModifyGuildRoleData
$cstimes :: forall b.
Integral b =>
b -> ModifyGuildRoleData -> ModifyGuildRoleData
sconcat :: NonEmpty ModifyGuildRoleData -> ModifyGuildRoleData
$csconcat :: NonEmpty ModifyGuildRoleData -> ModifyGuildRoleData
<> :: ModifyGuildRoleData -> ModifyGuildRoleData -> ModifyGuildRoleData
$c<> :: ModifyGuildRoleData -> 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
mconcat :: [ModifyGuildRoleData] -> ModifyGuildRoleData
$cmconcat :: [ModifyGuildRoleData] -> ModifyGuildRoleData
mappend :: ModifyGuildRoleData -> ModifyGuildRoleData -> ModifyGuildRoleData
$cmappend :: ModifyGuildRoleData -> ModifyGuildRoleData -> ModifyGuildRoleData
mempty :: ModifyGuildRoleData
$cmempty :: ModifyGuildRoleData
$cp1Monoid :: Semigroup 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
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
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
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
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
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
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]
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, 'Required)]
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
// ID Guild
forall k (a :: k). ID a
ID @Guild
RouteBuilder '[ '( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder '[ '( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
'[ '( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake Guild
-> RouteBuilder '[ '( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
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 a. HasID User a => a -> Snowflake User
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
// ID User
forall k (a :: k). ID a
ID @User
RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, '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, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, '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 a. HasID User a => a -> Snowflake User
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
// ID User
forall k (a :: k). ID a
ID @User
RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, '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, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, '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 a. HasID User a => a -> Snowflake User
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
// ID User
forall k (a :: k). ID a
ID @User
RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, '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, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, '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 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
'[ '( '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
// ID User
forall k (a :: k). ID a
ID @User RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
S
'[ '( 'IDRequirement User, '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, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> ID Role
-> ConsRes
(ID Role)
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// ID Role
forall k (a :: k). ID a
ID @Role
RouteBuilder
'[ '( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
'[ '( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, '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, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement Role, 'Satisfied),
'( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
'[ '( 'IDRequirement Role, 'Satisfied),
'( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake Role
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement Role, 'Satisfied),
'( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, '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, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement Role, 'Satisfied),
'( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, '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, 'Required),
'( 'IDRequirement User, '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 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
'[ '( '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
// ID User
forall k (a :: k). ID a
ID @User RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> S
-> ConsRes
S
'[ '( 'IDRequirement User, '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, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> ID Role
-> ConsRes
(ID Role)
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
forall a (reqs :: [(RequirementType, RouteRequirement)]).
RouteFragmentable a reqs =>
RouteBuilder reqs -> a -> ConsRes a reqs
// ID Role
forall k (a :: k). ID a
ID @Role
RouteBuilder
'[ '( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
'[ '( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, '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, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement Role, 'Satisfied),
'( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
'[ '( 'IDRequirement Role, 'Satisfied),
'( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake Role
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement Role, 'Satisfied),
'( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, '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, 'Required),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement Role, 'Satisfied),
'( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement User, '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, 'Required),
'( 'IDRequirement User, '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 a. HasID User a => a -> Snowflake User
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
// ID User
forall k (a :: k). ID a
ID @User
RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, '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, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, '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 a. HasID User a => a -> Snowflake User
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
// ID User
forall k (a :: k). ID a
ID @User
RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, '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, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, '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 a. HasID User a => a -> Snowflake User
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
// ID User
forall k (a :: k). ID a
ID @User
RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, '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, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, '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 a. HasID User a => a -> Snowflake User
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
// ID User
forall k (a :: k). ID a
ID @User
RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake User
-> RouteBuilder
'[ '( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, '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, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
'[ '( 'IDRequirement User, 'Satisfied),
'( 'IDRequirement User, '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 a. HasID Role a => a -> Snowflake Role
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
// ID Role
forall k (a :: k). ID a
ID @Role
RouteBuilder
'[ '( 'IDRequirement Role, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement Role, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement Role, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
'[ '( 'IDRequirement Role, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake Role
-> RouteBuilder
'[ '( 'IDRequirement Role, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement Role, 'Satisfied),
'( 'IDRequirement Role, '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, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement Role, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
'[ '( 'IDRequirement Role, 'Satisfied),
'( 'IDRequirement Role, '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 a. HasID Role a => a -> Snowflake Role
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
// ID Role
forall k (a :: k). ID a
ID @Role
RouteBuilder
'[ '( 'IDRequirement Role, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement Role, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement Role, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)])
-> RouteBuilder
'[ '( 'IDRequirement Role, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
forall a b. a -> (a -> b) -> b
& Snowflake Role
-> RouteBuilder
'[ '( 'IDRequirement Role, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> RouteBuilder
'[ '( 'IDRequirement Role, 'Satisfied),
'( 'IDRequirement Role, '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, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> (RouteBuilder
'[ '( 'IDRequirement Role, 'Satisfied),
'( 'IDRequirement Role, 'Required),
'( 'IDRequirement Guild, 'Satisfied),
'( 'IDRequirement Guild, 'Required)]
-> Route)
-> Route
forall a b. a -> (a -> b) -> b
& RouteBuilder
'[ '( 'IDRequirement Role, 'Satisfied),
'( 'IDRequirement Role, '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
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}) =
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
limit :: Maybe Integer
$sel:limit:SearchMembersOptions :: SearchMembersOptions -> Maybe Integer
limit, Text
query :: Text
$sel:query:SearchMembersOptions :: SearchMembersOptions -> 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
object [Key
"nick" Key -> Maybe Text -> (Key, Value)
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= 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
limit :: Maybe Int
$sel:limit:GetGuildBansOptions :: GetGuildBansOptions -> Maybe Int
limit, Maybe Int
before :: Maybe Int
$sel:before:GetGuildBansOptions :: GetGuildBansOptions -> Maybe Int
before, Maybe Int
after :: Maybe Int
$sel:after:GetGuildBansOptions :: GetGuildBansOptions -> 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
deleteMessageDays :: Maybe Integer
$sel:deleteMessageDays:CreateGuildBanData :: CreateGuildBanData -> 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
modifyResponse :: GuildRequest a -> Value -> Value
modifyResponse GuildRequest a
_ = Value -> Value
forall a. a -> a
Prelude.id