Safe Haskell | None |
---|---|
Language | Haskell2010 |
Provides actions for Channel API interactions
- data ChannelRequest a where
- GetChannel :: Snowflake -> ChannelRequest Channel
- ModifyChannel :: ToJSON a => Snowflake -> a -> ChannelRequest Channel
- DeleteChannel :: Snowflake -> ChannelRequest Channel
- GetChannelMessages :: Snowflake -> [(Text, Text)] -> ChannelRequest [Message]
- GetChannelMessage :: Snowflake -> Snowflake -> ChannelRequest Message
- CreateMessage :: Snowflake -> Text -> Maybe Embed -> ChannelRequest Message
- UploadFile :: Snowflake -> Text -> ByteString -> ChannelRequest Message
- EditMessage :: Message -> Text -> Maybe Embed -> ChannelRequest Message
- DeleteMessage :: Message -> ChannelRequest ()
- BulkDeleteMessage :: Snowflake -> [Message] -> ChannelRequest ()
- EditChannelPermissions :: ToJSON a => Snowflake -> Snowflake -> a -> ChannelRequest ()
- GetChannelInvites :: Snowflake -> ChannelRequest Object
- CreateChannelInvite :: ToJSON a => Snowflake -> a -> ChannelRequest Object
- DeleteChannelPermission :: Snowflake -> Snowflake -> ChannelRequest ()
- TriggerTypingIndicator :: Snowflake -> ChannelRequest ()
- GetPinnedMessages :: Snowflake -> ChannelRequest [Message]
- AddPinnedMessage :: Snowflake -> Snowflake -> ChannelRequest ()
- DeletePinnedMessage :: Snowflake -> Snowflake -> ChannelRequest ()
Documentation
data ChannelRequest a where Source #
Data constructor for Channel requests. See Channel API
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. |
Eq (ChannelRequest a) Source # | |
Hashable (ChannelRequest a) Source # | |
FromJSON a => DoFetch (ChannelRequest a) Source # | |
RateLimit (ChannelRequest a) Source # | |