Safe Haskell | None |
---|---|
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 {}
- newtype ModifyGuildMemberData = ModifyGuildMemberData Object
- 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 {}
- newtype ModifyGuildRoleData = ModifyGuildRoleData Object
- 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
Show ListMembersOptions Source # | |
Defined in Calamity.HTTP.Guild showsPrec :: Int -> ListMembersOptions -> ShowS # show :: ListMembersOptions -> String # showList :: [ListMembersOptions] -> ShowS # | |
Generic ListMembersOptions Source # | |
Defined in Calamity.HTTP.Guild type Rep ListMembersOptions :: Type -> Type # from :: ListMembersOptions -> Rep ListMembersOptions x # to :: Rep ListMembersOptions x -> ListMembersOptions # | |
Default ListMembersOptions Source # | |
Defined in Calamity.HTTP.Guild | |
type Rep ListMembersOptions Source # | |
Defined in Calamity.HTTP.Guild type Rep ListMembersOptions = D1 ('MetaData "ListMembersOptions" "Calamity.HTTP.Guild" "calamity-0.3.0.0-inplace" 'False) (C1 ('MetaCons "ListMembersOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "limit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "after") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Snowflake User))))) |
data AddGuildMemberData Source #
Instances
newtype 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 union the values.
Examples
>>>
encode $ modifyGuildMemberNick (Just "test") <> modifyGuildMemberDeaf Nothing
"{\"nick\":\"test\",\"deaf\":null}"
Instances
data CreateGuildBanData Source #
Instances
Show CreateGuildBanData Source # | |
Defined in Calamity.HTTP.Guild showsPrec :: Int -> CreateGuildBanData -> ShowS # show :: CreateGuildBanData -> String # showList :: [CreateGuildBanData] -> ShowS # | |
Generic CreateGuildBanData Source # | |
Defined in Calamity.HTTP.Guild type Rep CreateGuildBanData :: Type -> Type # from :: CreateGuildBanData -> Rep CreateGuildBanData x # to :: Rep CreateGuildBanData x -> CreateGuildBanData # | |
Default CreateGuildBanData Source # | |
Defined in Calamity.HTTP.Guild | |
type Rep CreateGuildBanData Source # | |
Defined in Calamity.HTTP.Guild type Rep CreateGuildBanData = D1 ('MetaData "CreateGuildBanData" "Calamity.HTTP.Guild" "calamity-0.3.0.0-inplace" 'False) (C1 ('MetaCons "CreateGuildBanData" 'PrefixI 'True) (S1 ('MetaSel ('Just "deleteMessageDays") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "reason") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) |
newtype 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 union the values.
Examples
>>>
encode $ modifyGuildRoleName (Just "test") <> modifyGuildRolePermissions Nothing
"{\"name\":\"test\",\"permissions\":null}"
Instances
data ModifyGuildRolePositionsData Source #
Instances
Show ModifyGuildRolePositionsData Source # | |
Defined in Calamity.HTTP.Guild showsPrec :: Int -> ModifyGuildRolePositionsData -> ShowS # show :: ModifyGuildRolePositionsData -> String # showList :: [ModifyGuildRolePositionsData] -> ShowS # | |
Generic ModifyGuildRolePositionsData Source # | |
Defined in Calamity.HTTP.Guild type Rep ModifyGuildRolePositionsData :: Type -> Type # | |
ToJSON ModifyGuildRolePositionsData Source # | |
Defined in Calamity.HTTP.Guild | |
type Rep ModifyGuildRolePositionsData Source # | |
Defined in Calamity.HTTP.Guild type Rep ModifyGuildRolePositionsData = D1 ('MetaData "ModifyGuildRolePositionsData" "Calamity.HTTP.Guild" "calamity-0.3.0.0-inplace" 'False) (C1 ('MetaCons "ModifyGuildRolePositionsData" 'PrefixI 'True) (S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Snowflake Role)) :*: S1 ('MetaSel ('Just "position") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)))) |