Safe Haskell | None |
---|---|
Language | Haskell2010 |
Provides actions for Channel API interactions
Synopsis
- data UserRequest a where
- GetCurrentUser :: UserRequest User
- GetUser :: UserId -> UserRequest User
- ModifyCurrentUser :: Text -> CurrentUserAvatar -> UserRequest User
- GetCurrentUserGuilds :: UserRequest [PartialGuild]
- LeaveGuild :: GuildId -> UserRequest ()
- GetUserDMs :: UserRequest [Channel]
- CreateDM :: UserId -> UserRequest Channel
- GetUserConnections :: UserRequest [ConnectionObject]
- parseCurrentUserAvatar :: ByteString -> Either Text CurrentUserAvatar
- data CurrentUserAvatar
Documentation
data UserRequest a where Source #
Data constructor for requests. See API
GetCurrentUser :: UserRequest User | Returns the |
GetUser :: UserId -> UserRequest User | Returns a |
ModifyCurrentUser :: Text -> CurrentUserAvatar -> UserRequest User | Modify user's username & avatar pic |
GetCurrentUserGuilds :: UserRequest [PartialGuild] | Returns a list of user |
LeaveGuild :: GuildId -> UserRequest () | Leave a guild. |
GetUserDMs :: UserRequest [Channel] | Returns a list of DM |
CreateDM :: UserId -> UserRequest Channel | Create a new DM channel with a user. Returns a DM |
GetUserConnections :: UserRequest [ConnectionObject] |
Instances
Request (UserRequest a) Source # | |
Defined in Discord.Internal.Rest.User majorRoute :: UserRequest a -> String Source # jsonRequest :: UserRequest a -> JsonRequest Source # |
data CurrentUserAvatar Source #
Formatted avatar data https://discord.com/developers/docs/resources/user#avatar-data
Instances
Eq CurrentUserAvatar Source # | |
Defined in Discord.Internal.Rest.User (==) :: CurrentUserAvatar -> CurrentUserAvatar -> Bool # (/=) :: CurrentUserAvatar -> CurrentUserAvatar -> Bool # | |
Ord CurrentUserAvatar Source # | |
Defined in Discord.Internal.Rest.User compare :: CurrentUserAvatar -> CurrentUserAvatar -> Ordering # (<) :: CurrentUserAvatar -> CurrentUserAvatar -> Bool # (<=) :: CurrentUserAvatar -> CurrentUserAvatar -> Bool # (>) :: CurrentUserAvatar -> CurrentUserAvatar -> Bool # (>=) :: CurrentUserAvatar -> CurrentUserAvatar -> Bool # max :: CurrentUserAvatar -> CurrentUserAvatar -> CurrentUserAvatar # min :: CurrentUserAvatar -> CurrentUserAvatar -> CurrentUserAvatar # | |
Read CurrentUserAvatar Source # | |
Defined in Discord.Internal.Rest.User | |
Show CurrentUserAvatar Source # | |
Defined in Discord.Internal.Rest.User showsPrec :: Int -> CurrentUserAvatar -> ShowS # show :: CurrentUserAvatar -> String # showList :: [CurrentUserAvatar] -> ShowS # |