discord-hs-0.1.3: An API wrapper for Discord in Haskell

Safe HaskellNone
LanguageHaskell2010

Network.Discord.Rest.Channel

Description

Provides actions for Channel API interactions

Synopsis

Documentation

data ChannelRequest a where Source #

Data constructor for Channel requests. See Channel API

Constructors

GetChannel :: Snowflake -> ChannelRequest Channel

Gets a channel by its id.

ModifyChannel :: ToJSON a => Snowflake -> a -> 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 -> [(Text, Text)] -> 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 -> Text -> ByteString -> ChannelRequest Message

Sends a message with a file to a channel.

EditMessage :: Message -> Text -> Maybe Embed -> ChannelRequest Message

Edits a message content.

DeleteMessage :: Message -> ChannelRequest ()

Deletes a message.

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

Deletes a group of messages.

EditChannelPermissions :: ToJSON a => Snowflake -> Snowflake -> a -> ChannelRequest ()

Edits a permission overrides for a channel.

GetChannelInvites :: Snowflake -> ChannelRequest Object

Gets all instant invites to a channel.

CreateChannelInvite :: ToJSON a => Snowflake -> a -> ChannelRequest Object

Creates an instant invite 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.