discord-haskell-0.8.3: 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 :: 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 Guild

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.

RemoveGuildMember :: GuildId -> UserId -> 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 => GuildId -> UserId -> o -> GuildRequest GuildMember | Modify attributes of a guild Member. Fires a Guild Member Update Event. todo ModifyGuildMember :: ToJSON o => GuildId -> UserId -> o -> GuildRequest () | Remove a member from a guild. Requires KICK_MEMBER permission. Fires a Guild Member Remove Event.

GetGuildBans :: GuildId -> GuildRequest [User]

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

CreateGuildBan :: GuildId -> UserId -> 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 :: 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

DeleteGuildRole :: GuildId -> RoleId -> 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 => GuildId -> [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 => GuildId -> RoleId -> o -> GuildRequest Role | 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.

DeleteGuildIntegration :: GuildId -> IntegrationId -> 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 => GuildId -> 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 => GuildId -> IntegrationId -> o -> 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.