discord-rest-0.2.2: An API wrapper for Discord in Haskell

Safe HaskellNone
LanguageHaskell2010

Network.Discord.Rest.Guild

Description

Provides actions for Guild API interactions.

Synopsis

Documentation

data GuildRequest a where Source #

Data constructor for Guild requests. See Guild API

Constructors

GetGuild :: Snowflake -> GuildRequest Guild

Returns the new Guild object for the given id

ModifyGuild :: ToJSON a => Snowflake -> a -> GuildRequest Guild

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

DeleteGuild :: Snowflake -> GuildRequest Guild

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

GetGuildChannels :: Snowflake -> GuildRequest [Channel]

Returns a list of guild Channel objects

CreateGuildChannel :: ToJSON a => Snowflake -> a -> 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

ModifyChanPosition :: ToJSON a => Snowflake -> a -> 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 :: Snowflake -> Snowflake -> GuildRequest Member

Returns a guild Member object for the specified user

ListGuildMembers :: Snowflake -> Range -> GuildRequest [Member]

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

AddGuildMember :: ToJSON a => Snowflake -> Snowflake -> a -> GuildRequest Member

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 :: ToJSON a => Snowflake -> Snowflake -> a -> GuildRequest ()

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

RemoveGuildMember :: Snowflake -> Snowflake -> GuildRequest ()

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

GetGuildBans :: Snowflake -> GuildRequest [User]

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

CreateGuildBan :: Snowflake -> Snowflake -> Integer -> 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 :: Snowflake -> Snowflake -> GuildRequest ()

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

GetGuildRoles :: Snowflake -> GuildRequest [Role]

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

CreateGuildRole :: Snowflake -> 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 :: ToJSON a => Snowflake -> [a] -> 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 :: ToJSON a => Snowflake -> Snowflake -> a -> GuildRequest Role

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

DeleteGuildRole :: Snowflake -> Snowflake -> GuildRequest Role

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

GetGuildPruneCount :: Snowflake -> 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 :: Snowflake -> 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 :: Snowflake -> 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 :: Snowflake -> GuildRequest [Invite]

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

GetGuildIntegrations :: Snowflake -> GuildRequest [Integration]

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

CreateGuildIntegration :: ToJSON a => Snowflake -> a -> GuildRequest ()

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

ModifyGuildIntegration :: ToJSON a => Snowflake -> Snowflake -> a -> 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 :: Snowflake -> Snowflake -> GuildRequest ()

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

SyncGuildIntegration :: Snowflake -> Snowflake -> GuildRequest ()

Sync an Integration. Requires the MANAGE_GUILD permission.

GetGuildEmbed :: Snowflake -> GuildRequest GuildEmbed

Returns the GuildEmbed object. Requires the MANAGE_GUILD permission.

ModifyGuildEmbed :: Snowflake -> 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.