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

Safe HaskellNone
LanguageHaskell2010

Discord.Rest.Guild

Description

Provides actions for Channel API interactions

Synopsis

Documentation

data GuildRequest a where Source #

Data constructor for requests. See API

Constructors

GetGuild :: Snowflake -> GuildRequest Guild

Returns the new Guild object for the given id

DeleteGuild :: Snowflake -> GuildRequest Guild

Modify a guild's settings. Returns the updated Guild object on success. Fires a Guild Update Event. todo ModifyGuild :: ToJSON o => Snowflake -> o -> 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

GetGuildMember :: Snowflake -> Snowflake -> GuildRequest GuildMember

Create a new Channel object for the guild. Requires MANAGE_CHANNELS permission. Returns the new Channel object on success. Fires a Channel Create Event todo CreateGuildChannel :: ToJSON o => Snowflake -> o -> 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. todo ModifyChanPosition :: ToJSON o => Snowflake -> o -> GuildRequest [Channel] | Returns a guild Member object for the specified user

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

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

RemoveGuildMember :: Snowflake -> Snowflake -> 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. todo AddGuildMember :: ToJSON o => Snowflake -> Snowflake -> o -> GuildRequest GuildMember | Modify attributes of a guild Member. Fires a Guild Member Update Event. todo ModifyGuildMember :: ToJSON o => Snowflake -> Snowflake -> o -> 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.

DeleteGuildRole :: Snowflake -> Snowflake -> 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. todo ModifyGuildRolePositions :: ToJSON o => Snowflake -> [o] -> GuildRequest [Role] | Modify a guild role. Requires the MANAGE_ROLES permission. Returns the updated Role on success. Fires a Guild Role Update Events. todo ModifyGuildRole :: ToJSON o => Snowflake -> Snowflake -> o -> 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.

DeleteGuildIntegration :: Snowflake -> Snowflake -> GuildRequest ()

Attach an Integration object from the current user to the guild. Requires the MANAGE_GUILD permission. Fires a Guild Integrations Update Event. todo CreateGuildIntegration :: ToJSON o => Snowflake -> o -> GuildRequest () | Modify the behavior and settings of a Integration object for the guild. Requires the MANAGE_GUILD permission. Fires a Guild Integrations Update Event. todo ModifyGuildIntegration :: ToJSON o => Snowflake -> Snowflake -> o -> 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.