Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Guild endpoints
Synopsis
- 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]
- data CreateGuildData = CreateGuildData {}
- data ModifyGuildData = ModifyGuildData {
- name :: Maybe Text
- region :: Maybe Text
- icon :: Maybe Text
- verificationLevel :: Maybe Integer
- defaultMessageNotifications :: Maybe Integer
- explicitContentFilter :: Maybe Integer
- afkChannelID :: Maybe (Snowflake GuildChannel)
- afkTimeout :: Maybe Integer
- ownerID :: Maybe (Snowflake User)
- splash :: Maybe Text
- banner :: Maybe Text
- systemChannelID :: Maybe (Snowflake GuildChannel)
- data ChannelCreateData = ChannelCreateData {}
- data ChannelPosition = ChannelPosition {}
- data ListMembersOptions = ListMembersOptions {}
- data AddGuildMemberData = AddGuildMemberData {}
- data ModifyGuildMemberData
- modifyGuildMemberNick :: Maybe Text -> ModifyGuildMemberData
- modifyGuildMemberRoles :: Maybe [Snowflake Role] -> ModifyGuildMemberData
- modifyGuildMemberMute :: Maybe Bool -> ModifyGuildMemberData
- modifyGuildMemberDeaf :: Maybe Bool -> ModifyGuildMemberData
- modifyGuildMemberChannelID :: Maybe (Snowflake VoiceChannel) -> ModifyGuildMemberData
- data CreateGuildBanData = CreateGuildBanData {}
- data ModifyGuildRoleData
- modifyGuildRoleName :: Maybe Text -> ModifyGuildRoleData
- modifyGuildRolePermissions :: Maybe Permissions -> ModifyGuildRoleData
- modifyGuildRoleColour :: Maybe (Colour Double) -> ModifyGuildRoleData
- modifyGuildRoleHoist :: Maybe Bool -> ModifyGuildRoleData
- modifyGuildRoleMentionable :: Maybe Bool -> ModifyGuildRoleData
- data ModifyGuildRolePositionsData = ModifyGuildRolePositionsData {}
Documentation
data GuildRequest a where Source #
Instances
Request (GuildRequest a) Source # | |
Defined in Calamity.HTTP.Guild type Result (GuildRequest a) Source # route :: GuildRequest a -> Route Source # action :: GuildRequest a -> Url 'Https -> Option 'Https -> Req LbsResponse Source # modifyResponse :: GuildRequest a -> Value -> Value Source # | |
type Result (GuildRequest a) Source # | |
Defined in Calamity.HTTP.Guild |
data CreateGuildData Source #
Instances
data ModifyGuildData Source #
ModifyGuildData | |
|
Instances
data ChannelCreateData Source #
Instances
data ChannelPosition Source #
Instances
data ListMembersOptions Source #
Instances
data AddGuildMemberData Source #
Instances
data ModifyGuildMemberData Source #
Parameters to the Modify Guild Member endpoint.
Use the provided methods (modifyGuildMemberX
) to create a value with the
field set, use the Semigroup instance to combine modifications.
Examples
>>>
encode $ modifyGuildMemberNick (Just "test") <> modifyGuildMemberDeaf Nothing
"{\"nick\":\"test\",\"deaf\":null}"
Instances
ToJSON ModifyGuildMemberData Source # | |
Defined in Calamity.HTTP.Guild toJSON :: ModifyGuildMemberData -> Value # toEncoding :: ModifyGuildMemberData -> Encoding # toJSONList :: [ModifyGuildMemberData] -> Value # toEncodingList :: [ModifyGuildMemberData] -> Encoding # | |
Monoid ModifyGuildMemberData Source # | |
Semigroup ModifyGuildMemberData Source # | |
Defined in Calamity.HTTP.Guild | |
Show ModifyGuildMemberData Source # | |
Defined in Calamity.HTTP.Guild showsPrec :: Int -> ModifyGuildMemberData -> ShowS # show :: ModifyGuildMemberData -> String # showList :: [ModifyGuildMemberData] -> ShowS # |
data CreateGuildBanData Source #
Instances
Show CreateGuildBanData Source # | |
Defined in Calamity.HTTP.Guild showsPrec :: Int -> CreateGuildBanData -> ShowS # show :: CreateGuildBanData -> String # showList :: [CreateGuildBanData] -> ShowS # | |
Default CreateGuildBanData Source # | |
Defined in Calamity.HTTP.Guild | |
(k ~ A_Lens, a ~ Maybe Integer, b ~ Maybe Integer) => LabelOptic "deleteMessageDays" k CreateGuildBanData CreateGuildBanData a b Source # | |
Defined in Calamity.HTTP.Guild labelOptic :: Optic k NoIx CreateGuildBanData CreateGuildBanData a b # | |
(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "reason" k CreateGuildBanData CreateGuildBanData a b Source # | |
Defined in Calamity.HTTP.Guild labelOptic :: Optic k NoIx CreateGuildBanData CreateGuildBanData a b # |
data ModifyGuildRoleData Source #
Parameters to the Modify Guild Role endpoint.
Use the provided methods (modifyGuildRoleX
) to create a value with the
field set, use the Semigroup instance to combine parameters.
Examples
>>>
encode $ modifyGuildRoleName (Just "test") <> modifyGuildRolePermissions Nothing
"{\"name\":\"test\",\"permissions\":null}"
Instances
ToJSON ModifyGuildRoleData Source # | |
Defined in Calamity.HTTP.Guild toJSON :: ModifyGuildRoleData -> Value # toEncoding :: ModifyGuildRoleData -> Encoding # toJSONList :: [ModifyGuildRoleData] -> Value # toEncodingList :: [ModifyGuildRoleData] -> Encoding # | |
Monoid ModifyGuildRoleData Source # | |
Defined in Calamity.HTTP.Guild | |
Semigroup ModifyGuildRoleData Source # | |
Defined in Calamity.HTTP.Guild (<>) :: ModifyGuildRoleData -> ModifyGuildRoleData -> ModifyGuildRoleData # sconcat :: NonEmpty ModifyGuildRoleData -> ModifyGuildRoleData # stimes :: Integral b => b -> ModifyGuildRoleData -> ModifyGuildRoleData # | |
Show ModifyGuildRoleData Source # | |
Defined in Calamity.HTTP.Guild showsPrec :: Int -> ModifyGuildRoleData -> ShowS # show :: ModifyGuildRoleData -> String # showList :: [ModifyGuildRoleData] -> ShowS # |
data ModifyGuildRolePositionsData Source #
Instances
ToJSON ModifyGuildRolePositionsData Source # | |
Defined in Calamity.HTTP.Guild | |
Show ModifyGuildRolePositionsData Source # | |
Defined in Calamity.HTTP.Guild showsPrec :: Int -> ModifyGuildRolePositionsData -> ShowS # show :: ModifyGuildRolePositionsData -> String # showList :: [ModifyGuildRolePositionsData] -> ShowS # | |
CalamityToJSON' ModifyGuildRolePositionsData Source # | |
Defined in Calamity.HTTP.Guild | |
(k ~ A_Lens, a ~ Snowflake Role, b ~ Snowflake Role) => LabelOptic "id" k ModifyGuildRolePositionsData ModifyGuildRolePositionsData a b Source # | |
Defined in Calamity.HTTP.Guild | |
(k ~ A_Lens, a ~ Maybe Integer, b ~ Maybe Integer) => LabelOptic "position" k ModifyGuildRolePositionsData ModifyGuildRolePositionsData a b Source # | |
Defined in Calamity.HTTP.Guild |