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

Safe HaskellNone
LanguageHaskell2010

Network.Discord.Rest.User

Description

Provide actions for User API interactions.

Synopsis

Documentation

data UserRequest a where Source #

Data constructor for User requests. See User API

Constructors

GetCurrentUser :: UserRequest User

Returns the User object of the requester's account. For OAuth2, this requires the identify scope, which will return the object without an email, and optionally the email scope, which returns the object with an email.

GetUser :: Snowflake -> UserRequest User

Returns a User for a given user ID

ModifyCurrentUser :: ToJSON a => a -> UserRequest User

Modify the requestors user account settings. Returns a User object on success.

GetCurrentUserGuilds :: Range -> UserRequest Guild

Returns a list of user Guild objects the current user is a member of. Requires the guilds OAuth2 scope.

LeaveGuild :: Snowflake -> UserRequest ()

Leave a guild.

GetUserDMs :: UserRequest [Channel]

Returns a list of DM Channel objects

CreateDM :: Snowflake -> UserRequest Channel

Create a new DM channel with a user. Returns a DM Channel object.