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

Safe HaskellNone



Provides actions for Channel API interactions



data UserRequest a where Source #

Data constructor for requests. See API


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.

Request (UserRequest a) Source # 
Instance details

Defined in Discord.Rest.User