calamity-0.1.9.2: A library for writing discord bots
Safe HaskellNone
LanguageHaskell2010

Calamity.HTTP.Guild

Description

Guild endpoints

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] 
AddGuildMember :: (HasID Guild g, HasID User u) => g -> u -> AddGuildMemberData -> GuildRequest (Maybe Member) 
ModifyGuildMember :: (HasID Guild g, HasID User u) => g -> u -> ModifyGuildMemberData -> GuildRequest () 
ModifyCurrentUserNick :: HasID Guild g => g -> Maybe Text -> GuildRequest () 
AddGuildMemberRole :: (HasID Guild g, HasID User u, HasID Role r) => g -> u -> r -> GuildRequest () 
RemoveGuildMemberRole :: (HasID Guild g, HasID User u, HasID Role r) => g -> u -> r -> GuildRequest () 
RemoveGuildMember :: (HasID Guild g, HasID User u) => g -> u -> GuildRequest () 
GetGuildBans :: HasID Guild g => g -> GuildRequest [BanData] 
GetGuildBan :: (HasID Guild g, HasID User u) => g -> u -> GuildRequest BanData 
CreateGuildBan :: (HasID Guild g, HasID User u) => g -> u -> CreateGuildBanData -> GuildRequest () 
RemoveGuildBan :: (HasID Guild g, HasID User u) => g -> u -> GuildRequest () 
GetGuildRoles :: HasID Guild g => g -> GuildRequest [Role] 
CreateGuildRole :: HasID Guild g => g -> ModifyGuildRoleData -> GuildRequest Role 
ModifyGuildRolePositions :: HasID Guild g => g -> ModifyGuildRolePositionsData -> GuildRequest [Role] 
ModifyGuildRole :: (HasID Guild g, HasID Role r) => g -> r -> ModifyGuildRoleData -> GuildRequest Role 
DeleteGuildRole :: (HasID Guild g, HasID Role r) => g -> r -> GuildRequest () 
GetGuildPruneCount :: HasID Guild g => g -> Integer -> GuildRequest Integer 
BeginGuildPrune :: HasID Guild g => g -> Integer -> Bool -> GuildRequest (Maybe Integer) 
GetGuildVoiceRegions :: HasID Guild g => g -> GuildRequest [VoiceRegion] 
GetGuildInvites :: HasID Guild g => g -> GuildRequest [Invite] 

Instances

Instances details
Request (GuildRequest a) Source # 
Instance details

Defined in Calamity.HTTP.Guild

Associated Types

type Result (GuildRequest a) Source #

Methods

route :: GuildRequest a -> Route Source #

action :: GuildRequest a -> Options -> String -> IO (Response ByteString) Source #

invoke :: forall (r :: [(Type -> Type) -> Type -> Type]). (BotC r, FromJSON (Result (GuildRequest a))) => GuildRequest a -> Sem r (Either RestError (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

Methods

toJSON :: CreateGuildData -> Value

toEncoding :: CreateGuildData -> Encoding

toJSONList :: [CreateGuildData] -> Value

toEncodingList :: [CreateGuildData] -> Encoding

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

Methods

toJSON :: ModifyGuildData -> Value

toEncoding :: ModifyGuildData -> Encoding

toJSONList :: [ModifyGuildData] -> Value

toEncodingList :: [ModifyGuildData] -> Encoding

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.1.9.2-inplace" 'False) (C1 ('MetaCons "ModifyGuildData" 'PrefixI 'True) (((S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "region") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "icon") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))) :*: (S1 ('MetaSel ('Just "verificationLevel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Integer)) :*: (S1 ('MetaSel ('Just "defaultMessageNotifications") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "explicitContentFilter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Integer))))) :*: ((S1 ('MetaSel ('Just "afkChannelID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Snowflake GuildChannel))) :*: (S1 ('MetaSel ('Just "afkTimeout") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "ownerID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Snowflake User))))) :*: (S1 ('MetaSel ('Just "splash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "banner") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "systemChannelID") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (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 ChannelPosition Source #

Instances

Instances details
Show ChannelPosition Source # 
Instance details

Defined in Calamity.HTTP.Guild

Generic ChannelPosition Source # 
Instance details

Defined in Calamity.HTTP.Guild

Associated Types

type Rep ChannelPosition :: Type -> Type #

ToJSON ChannelPosition Source # 
Instance details

Defined in Calamity.HTTP.Guild

Methods

toJSON :: ChannelPosition -> Value

toEncoding :: ChannelPosition -> Encoding

toJSONList :: [ChannelPosition] -> Value

toEncodingList :: [ChannelPosition] -> Encoding

type Rep ChannelPosition Source # 
Instance details

Defined in Calamity.HTTP.Guild

type Rep ChannelPosition = D1 ('MetaData "ChannelPosition" "Calamity.HTTP.Guild" "calamity-0.1.9.2-inplace" 'False) (C1 ('MetaCons "ChannelPosition" 'PrefixI 'True) (S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Snowflake GuildChannel)) :*: S1 ('MetaSel ('Just "position") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Integer))))

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.1.9.2-inplace" 'False) (C1 ('MetaCons "ListMembersOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "limit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "after") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (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

data ModifyGuildMemberData Source #

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 #

ToJSON ModifyGuildMemberData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Default ModifyGuildMemberData Source # 
Instance details

Defined in Calamity.HTTP.Guild

type Rep ModifyGuildMemberData Source # 
Instance details

Defined in Calamity.HTTP.Guild

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.1.9.2-inplace" 'False) (C1 ('MetaCons "CreateGuildBanData" 'PrefixI 'True) (S1 ('MetaSel ('Just "deleteMessageDays") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Integer)) :*: S1 ('MetaSel ('Just "reason") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text))))

data ModifyGuildRoleData Source #

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 #

ToJSON ModifyGuildRoleData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Default ModifyGuildRoleData Source # 
Instance details

Defined in Calamity.HTTP.Guild

type Rep ModifyGuildRoleData Source # 
Instance details

Defined in Calamity.HTTP.Guild

data ModifyGuildRolePositionsData Source #