discord-haskell-1.2.0: Write bots for Discord in Haskell

Safe HaskellNone
LanguageHaskell2010

Discord.Internal.Rest.User

Description

Provides actions for Channel API interactions

Synopsis

Documentation

data UserRequest a where Source #

Data constructor for requests. See 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 :: UserId -> UserRequest User

Returns a User for a given user ID

ModifyCurrentUser :: Text -> CurrentUserAvatar -> UserRequest User

Modify user's username & avatar pic

GetCurrentUserGuilds :: UserRequest [PartialGuild]

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

LeaveGuild :: GuildId -> UserRequest ()

Leave a guild.

GetUserDMs :: UserRequest [Channel]

Returns a list of DM Channel objects

CreateDM :: UserId -> UserRequest Channel

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

GetUserConnections :: UserRequest [ConnectionObject]