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

Safe HaskellNone



Provides actions for Channel API interactions



data ChannelRequest a where Source #

Data constructor for requests. See API


GetChannel :: Snowflake -> ChannelRequest Channel

Gets a channel by its id.

ModifyChannel :: Snowflake -> ModifyChannelOptions -> ChannelRequest Channel

Edits channels options.

DeleteChannel :: Snowflake -> ChannelRequest Channel

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

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

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

GetChannelMessage :: (Snowflake, Snowflake) -> ChannelRequest Message

Gets a message in a channel by its id.

CreateMessage :: Snowflake -> Text -> Maybe Embed -> ChannelRequest Message

Sends a message to a channel.

UploadFile :: Snowflake -> FilePath -> ByteString -> ChannelRequest Message

Sends a message with a file to a channel.

CreateReaction :: (Snowflake, Snowflake) -> (Text, Maybe Snowflake) -> ChannelRequest ()

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

DeleteOwnReaction :: (Snowflake, Snowflake) -> (Text, Maybe Snowflake) -> ChannelRequest ()

Remove a Reaction this bot added

DeleteUserReaction :: (Snowflake, Snowflake) -> (Text, Maybe Snowflake) -> Snowflake -> ChannelRequest ()

Remove a Reaction someone else added

GetReactions :: (Snowflake, Snowflake) -> (Text, Maybe Snowflake) -> (Int, ReactionTiming) -> ChannelRequest ()

List of users that reacted with this emoji

DeleteAllReactions :: (Snowflake, Snowflake) -> ChannelRequest ()

Delete all reactions on a message

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

Edits a message content.

DeleteMessage :: (Snowflake, Snowflake) -> ChannelRequest ()

Deletes a message.

BulkDeleteMessage :: (Snowflake, [Snowflake]) -> ChannelRequest ()

Deletes a group of messages.

GetChannelInvites :: Snowflake -> ChannelRequest Object

Gets all instant invites to a channel.

DeleteChannelPermission :: Snowflake -> Snowflake -> ChannelRequest ()

Deletes a permission override from a channel.

TriggerTypingIndicator :: Snowflake -> ChannelRequest ()

Sends a typing indicator a channel which lasts 10 seconds.

GetPinnedMessages :: Snowflake -> ChannelRequest [Message]

Gets all pinned messages of a channel.

AddPinnedMessage :: (Snowflake, Snowflake) -> ChannelRequest ()

Pins a message.

DeletePinnedMessage :: (Snowflake, Snowflake) -> ChannelRequest ()

Unpins a message.

data ReactionTiming Source #

Data constructor for GetReaction requests