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
- parseCurrentUserAvatar :: ByteString -> Either String 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 |
Instances
Request (UserRequest a) Source # | |
Defined in Discord.Rest.User majorRoute :: UserRequest a -> String Source # jsonRequest :: UserRequest a -> JsonRequest Source # |
data CurrentUserAvatar Source #
Formatted avatar data https://discordapp.com/developers/docs/resources/user#avatar-data