calamity-0.3.0.0: A library for writing discord bots in haskell
Safe HaskellNone
LanguageHaskell2010

Calamity.HTTP.Guild

Description

Guild endpoints

Synopsis

Documentation

data GuildRequest a where Source #

Constructors

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] 

Instances

Instances details
Request (GuildRequest a) Source # 
Instance details

Defined in Calamity.HTTP.Guild

Associated Types

type Result (GuildRequest a) Source #

type Result (GuildRequest a) Source # 
Instance details

Defined in Calamity.HTTP.Guild

type Result (GuildRequest a) = a

data CreateGuildData Source #

Instances

Instances details
Show CreateGuildData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Generic CreateGuildData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Associated Types

type Rep CreateGuildData :: Type -> Type #

ToJSON CreateGuildData Source # 
Instance details

Defined in Calamity.HTTP.Guild

type Rep CreateGuildData Source # 
Instance details

Defined in Calamity.HTTP.Guild

data ModifyGuildData Source #

Instances

Instances details
Show ModifyGuildData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Generic ModifyGuildData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Associated Types

type Rep ModifyGuildData :: Type -> Type #

ToJSON ModifyGuildData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Default ModifyGuildData Source # 
Instance details

Defined in Calamity.HTTP.Guild

type Rep ModifyGuildData Source # 
Instance details

Defined in Calamity.HTTP.Guild

type Rep ModifyGuildData = D1 ('MetaData "ModifyGuildData" "Calamity.HTTP.Guild" "calamity-0.3.0.0-inplace" 'False) (C1 ('MetaCons "ModifyGuildData" 'PrefixI 'True) (((S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "region") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "icon") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 ('MetaSel ('Just "verificationLevel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: (S1 ('MetaSel ('Just "defaultMessageNotifications") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "explicitContentFilter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer))))) :*: ((S1 ('MetaSel ('Just "afkChannelID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Snowflake GuildChannel))) :*: (S1 ('MetaSel ('Just "afkTimeout") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "ownerID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Snowflake User))))) :*: (S1 ('MetaSel ('Just "splash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "banner") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "systemChannelID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Snowflake GuildChannel))))))))

data ChannelCreateData Source #

Instances

Instances details
Show ChannelCreateData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Generic ChannelCreateData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Associated Types

type Rep ChannelCreateData :: Type -> Type #

ToJSON ChannelCreateData Source # 
Instance details

Defined in Calamity.HTTP.Guild

type Rep ChannelCreateData Source # 
Instance details

Defined in Calamity.HTTP.Guild

data ListMembersOptions Source #

Instances

Instances details
Show ListMembersOptions Source # 
Instance details

Defined in Calamity.HTTP.Guild

Generic ListMembersOptions Source # 
Instance details

Defined in Calamity.HTTP.Guild

Associated Types

type Rep ListMembersOptions :: Type -> Type #

Default ListMembersOptions Source # 
Instance details

Defined in Calamity.HTTP.Guild

type Rep ListMembersOptions Source # 
Instance details

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

Instances details
Show AddGuildMemberData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Generic AddGuildMemberData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Associated Types

type Rep AddGuildMemberData :: Type -> Type #

ToJSON AddGuildMemberData Source # 
Instance details

Defined in Calamity.HTTP.Guild

type Rep AddGuildMemberData Source # 
Instance details

Defined in Calamity.HTTP.Guild

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

Instances details
Show ModifyGuildMemberData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Generic ModifyGuildMemberData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Associated Types

type Rep ModifyGuildMemberData :: Type -> Type #

Semigroup ModifyGuildMemberData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Monoid ModifyGuildMemberData Source # 
Instance details

Defined in Calamity.HTTP.Guild

ToJSON ModifyGuildMemberData Source # 
Instance details

Defined in Calamity.HTTP.Guild

type Rep ModifyGuildMemberData Source # 
Instance details

Defined in Calamity.HTTP.Guild

type Rep ModifyGuildMemberData = D1 ('MetaData "ModifyGuildMemberData" "Calamity.HTTP.Guild" "calamity-0.3.0.0-inplace" 'True) (C1 ('MetaCons "ModifyGuildMemberData" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Object)))

data CreateGuildBanData Source #

Instances

Instances details
Show CreateGuildBanData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Generic CreateGuildBanData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Associated Types

type Rep CreateGuildBanData :: Type -> Type #

Default CreateGuildBanData Source # 
Instance details

Defined in Calamity.HTTP.Guild

type Rep CreateGuildBanData Source # 
Instance details

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

Instances details
Show ModifyGuildRoleData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Generic ModifyGuildRoleData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Associated Types

type Rep ModifyGuildRoleData :: Type -> Type #

Semigroup ModifyGuildRoleData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Monoid ModifyGuildRoleData Source # 
Instance details

Defined in Calamity.HTTP.Guild

ToJSON ModifyGuildRoleData Source # 
Instance details

Defined in Calamity.HTTP.Guild

type Rep ModifyGuildRoleData Source # 
Instance details

Defined in Calamity.HTTP.Guild

type Rep ModifyGuildRoleData = D1 ('MetaData "ModifyGuildRoleData" "Calamity.HTTP.Guild" "calamity-0.3.0.0-inplace" 'True) (C1 ('MetaCons "ModifyGuildRoleData" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Object)))

data ModifyGuildRolePositionsData Source #