discord-haskell-1.6.1: Write bots for Discord in Haskell

Safe HaskellNone
LanguageHaskell2010

Discord.Internal.Rest.Guild

Description

Provides actions for Channel API interactions

Synopsis

Documentation

data GuildRequest a where Source #

Data constructor for requests. See API

Constructors

CreateGuild :: CreateGuildOpts -> GuildRequest Guild 
GetGuild :: GuildId -> GuildRequest Guild

Returns the new Guild object for the given id

ModifyGuild :: GuildId -> ModifyGuildOpts -> GuildRequest Guild

Modify a guild's settings. Returns the updated Guild object on success. Fires a Guild Update Event.

DeleteGuild :: GuildId -> GuildRequest ()

Delete a guild permanently. User must be owner. Fires a Guild Delete Event.

GetGuildChannels :: GuildId -> GuildRequest [Channel]

Returns a list of guild Channel objects

CreateGuildChannel :: GuildId -> Text -> [Overwrite] -> CreateGuildChannelOpts -> GuildRequest Channel

Create a new Channel object for the guild. Requires MANAGE_CHANNELS permission. Returns the new Channel object on success. Fires a Channel Create Event

ModifyGuildChannelPositions :: GuildId -> [(ChannelId, Int)] -> GuildRequest [Channel]

Modify the positions of a set of channel objects for the guild. Requires MANAGE_CHANNELS permission. Returns a list of all of the guild's Channel objects on success. Fires multiple Channel Update Events.

GetGuildMember :: GuildId -> UserId -> GuildRequest GuildMember

Returns a guild Member object for the specified user

ListGuildMembers :: GuildId -> GuildMembersTiming -> GuildRequest [GuildMember]

Returns a list of guild Member objects that are members of the guild.

AddGuildMember :: GuildId -> UserId -> AddGuildMemberOpts -> GuildRequest ()

Adds a user to the guild, provided you have a valid oauth2 access token for the user with the guilds.join scope. Returns the guild Member as the body. Fires a Guild Member Add Event. Requires the bot to have the CREATE_INSTANT_INVITE permission.

ModifyGuildMember :: GuildId -> UserId -> ModifyGuildMemberOpts -> GuildRequest ()

Modify attributes of a guild Member. Fires a Guild Member Update Event.

ModifyCurrentUserNick :: GuildId -> Text -> GuildRequest ()

Modify the nickname of the current user

AddGuildMemberRole :: GuildId -> UserId -> RoleId -> GuildRequest ()

Add a member to a guild role. Requires MANAGE_ROLES permission.

RemoveGuildMemberRole :: GuildId -> UserId -> RoleId -> GuildRequest ()

Remove a member from a guild role. Requires MANAGE_ROLES permission.

RemoveGuildMember :: GuildId -> UserId -> GuildRequest ()

Remove a member from a guild. Requires KICK_MEMBER permission. Fires a Guild Member Remove Event.

GetGuildBans :: GuildId -> GuildRequest [GuildBan]

Returns a list of Ban objects for users that are banned from this guild. Requires the BAN_MEMBERS permission

GetGuildBan :: GuildId -> UserId -> GuildRequest GuildBan

Returns a Ban object for the user banned from this guild. Requires the BAN_MEMBERS permission

CreateGuildBan :: GuildId -> UserId -> CreateGuildBanOpts -> GuildRequest ()

Create a guild ban, and optionally Delete previous messages sent by the banned user. Requires the BAN_MEMBERS permission. Fires a Guild Ban Add Event.

RemoveGuildBan :: GuildId -> UserId -> GuildRequest ()

Remove the ban for a user. Requires the BAN_MEMBERS permissions. Fires a Guild Ban Remove Event.

GetGuildRoles :: GuildId -> GuildRequest [Role]

Returns a list of Role objects for the guild. Requires the MANAGE_ROLES permission

CreateGuildRole :: GuildId -> ModifyGuildRoleOpts -> GuildRequest Role

Create a new Role for the guild. Requires the MANAGE_ROLES permission. Returns the new role object on success. Fires a Guild Role Create Event.

ModifyGuildRolePositions :: GuildId -> [(RoleId, Integer)] -> GuildRequest [Role]

Modify the positions of a set of role objects for the guild. Requires the MANAGE_ROLES permission. Returns a list of all of the guild's Role objects on success. Fires multiple Guild Role Update Events.

ModifyGuildRole :: GuildId -> RoleId -> ModifyGuildRoleOpts -> GuildRequest Role

Modify a guild role. Requires the MANAGE_ROLES permission. Returns the updated Role on success. Fires a Guild Role Update Events.

DeleteGuildRole :: GuildId -> RoleId -> GuildRequest ()

Delete a guild role. Requires the MANAGE_ROLES permission. Fires a Guild Role Delete Event.

GetGuildPruneCount :: GuildId -> Integer -> GuildRequest Object

Returns an object with one pruned key indicating the number of members that would be removed in a prune operation. Requires the KICK_MEMBERS permission.

BeginGuildPrune :: GuildId -> Integer -> GuildRequest Object

Begin a prune operation. Requires the KICK_MEMBERS permission. Returns an object with one pruned key indicating the number of members that were removed in the prune operation. Fires multiple Guild Member Remove Events.

GetGuildVoiceRegions :: GuildId -> GuildRequest [VoiceRegion]

Returns a list of VoiceRegion objects for the guild. Unlike the similar /voice route, this returns VIP servers when the guild is VIP-enabled.

GetGuildInvites :: GuildId -> GuildRequest [Invite]

Returns a list of Invite objects for the guild. Requires the MANAGE_GUILD permission.

GetGuildIntegrations :: GuildId -> GuildRequest [Integration]

Return a list of Integration objects for the guild. Requires the MANAGE_GUILD permission.

CreateGuildIntegration :: GuildId -> IntegrationId -> CreateGuildIntegrationOpts -> GuildRequest ()

Attach an Integration object from the current user to the guild. Requires the MANAGE_GUILD permission. Fires a Guild Integrations Update Event.

ModifyGuildIntegration :: GuildId -> IntegrationId -> ModifyGuildIntegrationOpts -> GuildRequest ()

Modify the behavior and settings of a Integration object for the guild. Requires the MANAGE_GUILD permission. Fires a Guild Integrations Update Event.

DeleteGuildIntegration :: GuildId -> IntegrationId -> GuildRequest ()

Delete the attached Integration object for the guild. Requires the MANAGE_GUILD permission. Fires a Guild Integrations Update Event.

SyncGuildIntegration :: GuildId -> IntegrationId -> GuildRequest ()

Sync an Integration. Requires the MANAGE_GUILD permission.

GetGuildEmbed :: GuildId -> GuildRequest GuildEmbed

Returns the GuildEmbed object. Requires the MANAGE_GUILD permission.

ModifyGuildEmbed :: GuildId -> GuildEmbed -> GuildRequest GuildEmbed

Modify a GuildEmbed object for the guild. All attributes may be passed in with JSON and modified. Requires the MANAGE_GUILD permission. Returns the updated GuildEmbed object.

GetGuildVanityURL :: GuildId -> GuildRequest Text

Vanity URL

data CreateGuildChannelOpts Source #

data AddGuildMemberOpts Source #

data ModifyGuildMemberOpts Source #

data ModifyGuildRoleOpts Source #

data CreateGuildIntegrationOpts Source #

Instances
Eq CreateGuildIntegrationOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Guild

Ord CreateGuildIntegrationOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Guild

Show CreateGuildIntegrationOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Guild

ToJSON CreateGuildIntegrationOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Guild

data ModifyGuildIntegrationOpts Source #

Instances
Eq ModifyGuildIntegrationOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Guild

Ord ModifyGuildIntegrationOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Guild

Show ModifyGuildIntegrationOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Guild

ToJSON ModifyGuildIntegrationOpts Source # 
Instance details

Defined in Discord.Internal.Rest.Guild