calamity-0.8.0.0: A library for writing discord bots in haskell
Safe HaskellSafe-Inferred
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
ToJSON CreateGuildData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Show CreateGuildData Source # 
Instance details

Defined in Calamity.HTTP.Guild

CalamityToJSON' CreateGuildData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Methods

toPairs :: KeyValue kv => CreateGuildData -> [Maybe kv] Source #

(k ~ A_Lens, a ~ [Partial Channel], b ~ [Partial Channel]) => LabelOptic "channels" k CreateGuildData CreateGuildData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Integer, b ~ Integer) => LabelOptic "defaultMessageNotifications" k CreateGuildData CreateGuildData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Integer, b ~ Integer) => LabelOptic "explicitContentFilter" k CreateGuildData CreateGuildData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Text, b ~ Text) => LabelOptic "icon" k CreateGuildData CreateGuildData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Text, b ~ Text) => LabelOptic "name" k CreateGuildData CreateGuildData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Text, b ~ Text) => LabelOptic "region" k CreateGuildData CreateGuildData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ [Role], b ~ [Role]) => LabelOptic "roles" k CreateGuildData CreateGuildData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Integer, b ~ Integer) => LabelOptic "verificationLevel" k CreateGuildData CreateGuildData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

data ModifyGuildData Source #

Instances

Instances details
ToJSON ModifyGuildData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Show ModifyGuildData Source # 
Instance details

Defined in Calamity.HTTP.Guild

CalamityToJSON' ModifyGuildData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Methods

toPairs :: KeyValue kv => ModifyGuildData -> [Maybe kv] Source #

Default ModifyGuildData Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe (Snowflake GuildChannel), b ~ Maybe (Snowflake GuildChannel)) => LabelOptic "afkChannelID" k ModifyGuildData ModifyGuildData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe Integer, b ~ Maybe Integer) => LabelOptic "afkTimeout" k ModifyGuildData ModifyGuildData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "banner" k ModifyGuildData ModifyGuildData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe Integer, b ~ Maybe Integer) => LabelOptic "defaultMessageNotifications" k ModifyGuildData ModifyGuildData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe Integer, b ~ Maybe Integer) => LabelOptic "explicitContentFilter" k ModifyGuildData ModifyGuildData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "icon" k ModifyGuildData ModifyGuildData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "name" k ModifyGuildData ModifyGuildData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe (Snowflake User), b ~ Maybe (Snowflake User)) => LabelOptic "ownerID" k ModifyGuildData ModifyGuildData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "region" k ModifyGuildData ModifyGuildData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "splash" k ModifyGuildData ModifyGuildData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe (Snowflake GuildChannel), b ~ Maybe (Snowflake GuildChannel)) => LabelOptic "systemChannelID" k ModifyGuildData ModifyGuildData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe Integer, b ~ Maybe Integer) => LabelOptic "verificationLevel" k ModifyGuildData ModifyGuildData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

data ChannelCreateData Source #

Instances

Instances details
ToJSON ChannelCreateData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Show ChannelCreateData Source # 
Instance details

Defined in Calamity.HTTP.Guild

CalamityToJSON' ChannelCreateData Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe Integer, b ~ Maybe Integer) => LabelOptic "bitrate" k ChannelCreateData ChannelCreateData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Text, b ~ Text) => LabelOptic "name" k ChannelCreateData ChannelCreateData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe Bool, b ~ Maybe Bool) => LabelOptic "nsfw" k ChannelCreateData ChannelCreateData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe (Snowflake Category), b ~ Maybe (Snowflake Category)) => LabelOptic "parentID" k ChannelCreateData ChannelCreateData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe [Overwrite], b ~ Maybe [Overwrite]) => LabelOptic "permissionOverwrites" k ChannelCreateData ChannelCreateData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe Integer, b ~ Maybe Integer) => LabelOptic "position" k ChannelCreateData ChannelCreateData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe Integer, b ~ Maybe Integer) => LabelOptic "rateLimitPerUser" k ChannelCreateData ChannelCreateData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "topic" k ChannelCreateData ChannelCreateData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe ChannelType, b ~ Maybe ChannelType) => LabelOptic "type_" k ChannelCreateData ChannelCreateData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe Integer, b ~ Maybe Integer) => LabelOptic "userLimit" k ChannelCreateData ChannelCreateData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

data ChannelPosition Source #

Instances

Instances details
ToJSON ChannelPosition Source # 
Instance details

Defined in Calamity.HTTP.Guild

Show ChannelPosition Source # 
Instance details

Defined in Calamity.HTTP.Guild

CalamityToJSON' ChannelPosition Source # 
Instance details

Defined in Calamity.HTTP.Guild

Methods

toPairs :: KeyValue kv => ChannelPosition -> [Maybe kv] Source #

(k ~ A_Lens, a ~ Snowflake GuildChannel, b ~ Snowflake GuildChannel) => LabelOptic "id" k ChannelPosition ChannelPosition a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe Bool, b ~ Maybe Bool) => LabelOptic "lockPermissions" k ChannelPosition ChannelPosition a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Snowflake GuildChannel, b ~ Snowflake GuildChannel) => LabelOptic "parentID" k ChannelPosition ChannelPosition a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe Integer, b ~ Maybe Integer) => LabelOptic "position" k ChannelPosition ChannelPosition a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

data AddGuildMemberData Source #

Instances

Instances details
ToJSON AddGuildMemberData Source # 
Instance details

Defined in Calamity.HTTP.Guild

Show AddGuildMemberData Source # 
Instance details

Defined in Calamity.HTTP.Guild

CalamityToJSON' AddGuildMemberData Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Text, b ~ Text) => LabelOptic "accessToken" k AddGuildMemberData AddGuildMemberData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe Bool, b ~ Maybe Bool) => LabelOptic "deaf" k AddGuildMemberData AddGuildMemberData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe Bool, b ~ Maybe Bool) => LabelOptic "mute" k AddGuildMemberData AddGuildMemberData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe Text, b ~ Maybe Text) => LabelOptic "nick" k AddGuildMemberData AddGuildMemberData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

(k ~ A_Lens, a ~ Maybe [Snowflake Role], b ~ Maybe [Snowflake Role]) => LabelOptic "roles" k AddGuildMemberData AddGuildMemberData a b Source # 
Instance details

Defined in Calamity.HTTP.Guild

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}"

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}"

data ModifyGuildRolePositionsData Source #