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

Safe HaskellNone
LanguageHaskell2010

Discord.Rest.Channel

Description

Provides actions for Channel API interactions

Synopsis

Documentation

data ChannelRequest a where Source #

Data constructor for requests. See API

Constructors

GetChannel :: ChannelId -> ChannelRequest Channel

Gets a channel by its id.

ModifyChannel :: ChannelId -> ModifyChannelOpts -> ChannelRequest Channel

Edits channels options.

DeleteChannel :: ChannelId -> ChannelRequest Channel

Deletes a channel if its id doesn't equal to the id of guild.

GetChannelMessages :: ChannelId -> (Int, MessageTiming) -> ChannelRequest [Message]

Gets a messages from a channel with limit of 100 per request.

GetChannelMessage :: (ChannelId, MessageId) -> ChannelRequest Message

Gets a message in a channel by its id.

CreateMessage :: ChannelId -> Text -> ChannelRequest Message

Sends a message to a channel.

CreateMessageEmbed :: ChannelId -> Text -> Embed -> ChannelRequest Message

Sends a message with an Embed to a channel.

CreateMessageUploadFile :: ChannelId -> Text -> ByteString -> ChannelRequest Message

Sends a message with a file to a channel.

CreateReaction :: (ChannelId, MessageId) -> Text -> ChannelRequest ()

Add an emoji reaction to a message. ID must be present for custom emoji

DeleteOwnReaction :: (ChannelId, MessageId) -> Text -> ChannelRequest ()

Remove a Reaction this bot added

DeleteUserReaction :: (ChannelId, MessageId) -> UserId -> Text -> ChannelRequest ()

Remove a Reaction someone else added

GetReactions :: (ChannelId, MessageId) -> Text -> (Int, ReactionTiming) -> ChannelRequest ()

List of users that reacted with this emoji

DeleteAllReactions :: (ChannelId, MessageId) -> ChannelRequest ()

Delete all reactions on a message

EditMessage :: (ChannelId, MessageId) -> Text -> Maybe Embed -> ChannelRequest Message

Edits a message content.

DeleteMessage :: (ChannelId, MessageId) -> ChannelRequest ()

Deletes a message.

BulkDeleteMessage :: (ChannelId, [MessageId]) -> ChannelRequest ()

Deletes a group of messages.

EditChannelPermissions :: ChannelId -> OverwriteId -> ChannelPermissionsOpts -> ChannelRequest ()

Edits a permission overrides for a channel.

GetChannelInvites :: ChannelId -> ChannelRequest Object

Gets all instant invites to a channel.

CreateChannelInvite :: ChannelId -> ChannelInviteOpts -> ChannelRequest Invite

Creates an instant invite to a channel.

DeleteChannelPermission :: ChannelId -> OverwriteId -> ChannelRequest ()

Deletes a permission override from a channel.

TriggerTypingIndicator :: ChannelId -> ChannelRequest ()

Sends a typing indicator a channel which lasts 10 seconds.

GetPinnedMessages :: ChannelId -> ChannelRequest [Message]

Gets all pinned messages of a channel.

AddPinnedMessage :: (ChannelId, MessageId) -> ChannelRequest ()

Pins a message.

DeletePinnedMessage :: (ChannelId, MessageId) -> ChannelRequest ()

Unpins a message.

GroupDMAddRecipient :: ChannelId -> GroupDMAddRecipientOpts -> ChannelRequest ()

Adds a recipient to a Group DM using their access token

GroupDMRemoveRecipient :: ChannelId -> UserId -> ChannelRequest ()

Removes a recipient from a Group DM

data ReactionTiming Source #

Data constructor for GetReaction requests