discord-haskell-0.5.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 :: Snowflake -> UserRequest User

Returns a User for a given user ID

GetCurrentUserGuilds :: UserRequest [PartialGuild]

Modify the requestors user account settings. Returns a User object on success. todo ModifyCurrentUser :: ToJSON o => o -> UserRequest User | 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.