discord-haskell-1.9.2: Write bots for Discord in Haskell
Safe HaskellNone
LanguageHaskell2010

Discord.Types

Synopsis

Documentation

data UTCTime #

This is the simplest representation of UTC. It consists of the day number, and a time offset from midnight. Note that if a day has a leap second added to it, it will have 86401 seconds.

Constructors

UTCTime 

Fields

Instances

Instances details
Eq UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Methods

(==) :: UTCTime -> UTCTime -> Bool #

(/=) :: UTCTime -> UTCTime -> Bool #

Data UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UTCTime -> c UTCTime #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UTCTime #

toConstr :: UTCTime -> Constr #

dataTypeOf :: UTCTime -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UTCTime) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UTCTime) #

gmapT :: (forall b. Data b => b -> b) -> UTCTime -> UTCTime #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UTCTime -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UTCTime -> r #

gmapQ :: (forall d. Data d => d -> u) -> UTCTime -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> UTCTime -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UTCTime -> m UTCTime #

Ord UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

ToJSON UTCTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey UTCTime 
Instance details

Defined in Data.Aeson.Types.ToJSON

FromJSON UTCTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey UTCTime 
Instance details

Defined in Data.Aeson.Types.FromJSON

NFData UTCTime 
Instance details

Defined in Data.Time.Clock.Internal.UTCTime

Methods

rnf :: UTCTime -> () #

ToHttpApiData UTCTime
>>> toUrlPiece $ UTCTime (fromGregorian 2015 10 03) 864.5
"2015-10-03T00:14:24.5Z"
Instance details

Defined in Web.Internal.HttpApiData

FromHttpApiData UTCTime
>>> parseUrlPiece "2015-10-03T00:14:24Z" :: Either Text UTCTime
Right 2015-10-03 00:14:24 UTC
Instance details

Defined in Web.Internal.HttpApiData

type Object = KeyMap Value #

A JSON "object" (key/value map).

newtype Snowflake Source #

A unique integer identifier. Can be used to calculate the creation date of an entity.

Constructors

Snowflake Word64 

Instances

Instances details
Enum Snowflake Source # 
Instance details

Defined in Discord.Internal.Types.Prelude

Eq Snowflake Source # 
Instance details

Defined in Discord.Internal.Types.Prelude

Integral Snowflake Source # 
Instance details

Defined in Discord.Internal.Types.Prelude

Num Snowflake Source # 
Instance details

Defined in Discord.Internal.Types.Prelude

Ord Snowflake Source # 
Instance details

Defined in Discord.Internal.Types.Prelude

Read Snowflake Source # 
Instance details

Defined in Discord.Internal.Types.Prelude

Real Snowflake Source # 
Instance details

Defined in Discord.Internal.Types.Prelude

Show Snowflake Source # 
Instance details

Defined in Discord.Internal.Types.Prelude

ToJSON Snowflake Source # 
Instance details

Defined in Discord.Internal.Types.Prelude

FromJSON Snowflake Source # 
Instance details

Defined in Discord.Internal.Types.Prelude

Bits Snowflake Source # 
Instance details

Defined in Discord.Internal.Types.Prelude

data Auth Source #

Authorization token for the Discord API

Constructors

Auth Text 

Instances

Instances details
Eq Auth Source # 
Instance details

Defined in Discord.Internal.Types.Prelude

Methods

(==) :: Auth -> Auth -> Bool #

(/=) :: Auth -> Auth -> Bool #

Ord Auth Source # 
Instance details

Defined in Discord.Internal.Types.Prelude

Methods

compare :: Auth -> Auth -> Ordering #

(<) :: Auth -> Auth -> Bool #

(<=) :: Auth -> Auth -> Bool #

(>) :: Auth -> Auth -> Bool #

(>=) :: Auth -> Auth -> Bool #

max :: Auth -> Auth -> Auth #

min :: Auth -> Auth -> Auth #

Show Auth Source # 
Instance details

Defined in Discord.Internal.Types.Prelude

Methods

showsPrec :: Int -> Auth -> ShowS #

show :: Auth -> String #

showList :: [Auth] -> ShowS #

authToken :: Auth -> Text Source #

Get the raw token formatted for use with the websocket gateway

snowflakeCreationDate :: Snowflake -> UTCTime Source #

Gets a creation date from a snowflake.

epochTime :: UTCTime Source #

Default timestamp

data EmbedThumbnail Source #

data Embed Source #

An embed attached to a message.

Constructors

Embed 

Fields

Instances

Instances details
Eq Embed Source # 
Instance details

Defined in Discord.Internal.Types.Embed

Methods

(==) :: Embed -> Embed -> Bool #

(/=) :: Embed -> Embed -> Bool #

Ord Embed Source # 
Instance details

Defined in Discord.Internal.Types.Embed

Methods

compare :: Embed -> Embed -> Ordering #

(<) :: Embed -> Embed -> Bool #

(<=) :: Embed -> Embed -> Bool #

(>) :: Embed -> Embed -> Bool #

(>=) :: Embed -> Embed -> Bool #

max :: Embed -> Embed -> Embed #

min :: Embed -> Embed -> Embed #

Show Embed Source # 
Instance details

Defined in Discord.Internal.Types.Embed

Methods

showsPrec :: Int -> Embed -> ShowS #

show :: Embed -> String #

showList :: [Embed] -> ShowS #

ToJSON Embed Source # 
Instance details

Defined in Discord.Internal.Types.Embed

FromJSON Embed Source # 
Instance details

Defined in Discord.Internal.Types.Embed

data ConnectionObject Source #

data Webhook Source #

Instances

Instances details
Eq Webhook Source # 
Instance details

Defined in Discord.Internal.Types.User

Methods

(==) :: Webhook -> Webhook -> Bool #

(/=) :: Webhook -> Webhook -> Bool #

Ord Webhook Source # 
Instance details

Defined in Discord.Internal.Types.User

Show Webhook Source # 
Instance details

Defined in Discord.Internal.Types.User

FromJSON Webhook Source # 
Instance details

Defined in Discord.Internal.Types.User

data User Source #

Represents information about a user.

Constructors

User 

Fields

Instances

Instances details
Eq User Source # 
Instance details

Defined in Discord.Internal.Types.User

Methods

(==) :: User -> User -> Bool #

(/=) :: User -> User -> Bool #

Ord User Source # 
Instance details

Defined in Discord.Internal.Types.User

Methods

compare :: User -> User -> Ordering #

(<) :: User -> User -> Bool #

(<=) :: User -> User -> Bool #

(>) :: User -> User -> Bool #

(>=) :: User -> User -> Bool #

max :: User -> User -> User #

min :: User -> User -> User #

Show User Source # 
Instance details

Defined in Discord.Internal.Types.User

Methods

showsPrec :: Int -> User -> ShowS #

show :: User -> String #

showList :: [User] -> ShowS #

ToJSON User Source # 
Instance details

Defined in Discord.Internal.Types.User

FromJSON User Source # 
Instance details

Defined in Discord.Internal.Types.User

data MessageReference Source #

Represents a Message Reference

Constructors

MessageReference 

Fields

Instances

Instances details
Eq MessageReference Source # 
Instance details

Defined in Discord.Internal.Types.Channel

Ord MessageReference Source # 
Instance details

Defined in Discord.Internal.Types.Channel

Show MessageReference Source # 
Instance details

Defined in Discord.Internal.Types.Channel

ToJSON MessageReference Source # 
Instance details

Defined in Discord.Internal.Types.Channel

FromJSON MessageReference Source # 
Instance details

Defined in Discord.Internal.Types.Channel

Default MessageReference Source # 
Instance details

Defined in Discord.Internal.Types.Channel

newtype Nonce Source #

Constructors

Nonce Text 

Instances

Instances details
Eq Nonce Source # 
Instance details

Defined in Discord.Internal.Types.Channel

Methods

(==) :: Nonce -> Nonce -> Bool #

(/=) :: Nonce -> Nonce -> Bool #

Ord Nonce Source # 
Instance details

Defined in Discord.Internal.Types.Channel

Methods

compare :: Nonce -> Nonce -> Ordering #

(<) :: Nonce -> Nonce -> Bool #

(<=) :: Nonce -> Nonce -> Bool #

(>) :: Nonce -> Nonce -> Bool #

(>=) :: Nonce -> Nonce -> Bool #

max :: Nonce -> Nonce -> Nonce #

min :: Nonce -> Nonce -> Nonce #

Show Nonce Source # 
Instance details

Defined in Discord.Internal.Types.Channel

Methods

showsPrec :: Int -> Nonce -> ShowS #

show :: Nonce -> String #

showList :: [Nonce] -> ShowS #

FromJSON Nonce Source # 
Instance details

Defined in Discord.Internal.Types.Channel

data Attachment Source #

Represents an attached to a message file.

Constructors

Attachment 

Fields

data Emoji Source #

Represents an emoticon (emoji)

Constructors

Emoji 

Fields

Instances

Instances details
Eq Emoji Source # 
Instance details

Defined in Discord.Internal.Types.Channel

Methods

(==) :: Emoji -> Emoji -> Bool #

(/=) :: Emoji -> Emoji -> Bool #

Ord Emoji Source # 
Instance details

Defined in Discord.Internal.Types.Channel

Methods

compare :: Emoji -> Emoji -> Ordering #

(<) :: Emoji -> Emoji -> Bool #

(<=) :: Emoji -> Emoji -> Bool #

(>) :: Emoji -> Emoji -> Bool #

(>=) :: Emoji -> Emoji -> Bool #

max :: Emoji -> Emoji -> Emoji #

min :: Emoji -> Emoji -> Emoji #

Show Emoji Source # 
Instance details

Defined in Discord.Internal.Types.Channel

Methods

showsPrec :: Int -> Emoji -> ShowS #

show :: Emoji -> String #

showList :: [Emoji] -> ShowS #

FromJSON Emoji Source # 
Instance details

Defined in Discord.Internal.Types.Channel

data Message Source #

Represents information about a message in a Discord channel.

Constructors

Message 

Fields

Instances

Instances details
Eq Message Source # 
Instance details

Defined in Discord.Internal.Types.Channel

Methods

(==) :: Message -> Message -> Bool #

(/=) :: Message -> Message -> Bool #

Ord Message Source # 
Instance details

Defined in Discord.Internal.Types.Channel

Show Message Source # 
Instance details

Defined in Discord.Internal.Types.Channel

FromJSON Message Source # 
Instance details

Defined in Discord.Internal.Types.Channel

data Overwrite Source #

Permission overwrites for a channel.

Constructors

Overwrite 

Fields

data Channel Source #

Guild channels represent an isolated set of users and messages in a Guild (Server)

Constructors

ChannelText

A text channel in a guild.

Fields

ChannelNews 

Fields

ChannelStorePage 

Fields

ChannelVoice

A voice channel in a guild.

Fields

ChannelDirectMessage

DM Channels represent a one-to-one conversation between two users, outside the scope of guilds

Fields

ChannelGroupDM 

Fields

ChannelGuildCategory 

Fields

ChannelStage 

Fields

ChannelUnknownType 

Fields

channelIsInGuild :: Channel -> Bool Source #

If the channel is part of a guild (has a guild id field)

data GuildEmbed Source #

Represents an image to be used in third party sites to link to a discord channel

Constructors

GuildEmbed 

Fields

data Integration Source #

Represents the behavior of a third party account link.

Constructors

Integration 

Fields

data InviteMeta Source #

Additional metadata about an invite.

Constructors

InviteMeta 

Fields

data InviteWithMeta Source #

Invite code with additional metadata

Instances

Instances details
FromJSON InviteWithMeta Source # 
Instance details

Defined in Discord.Internal.Types.Guild

data Invite Source #

Represents a code to add a user to a guild

Constructors

Invite 

Fields

Instances

Instances details
Eq Invite Source # 
Instance details

Defined in Discord.Internal.Types.Guild

Methods

(==) :: Invite -> Invite -> Bool #

(/=) :: Invite -> Invite -> Bool #

Ord Invite Source # 
Instance details

Defined in Discord.Internal.Types.Guild

Show Invite Source # 
Instance details

Defined in Discord.Internal.Types.Guild

FromJSON Invite Source # 
Instance details

Defined in Discord.Internal.Types.Guild

data GuildBan Source #

Info about a Ban

Constructors

GuildBan 

data VoiceRegion Source #

VoiceRegion is only refrenced in Guild endpoints, will be moved when voice support is added

Constructors

VoiceRegion 

Fields

data Role Source #

Roles represent a set of permissions attached to a group of users. Roles have unique names, colors, and can be "pinned" to the side bar, causing their members to be listed separately. Roles are unique per guild, and can have separate permission profiles for the global context (guild) and channel context.

Constructors

Role 

Fields

Instances

Instances details
Eq Role Source # 
Instance details

Defined in Discord.Internal.Types.Guild

Methods

(==) :: Role -> Role -> Bool #

(/=) :: Role -> Role -> Bool #

Ord Role Source # 
Instance details

Defined in Discord.Internal.Types.Guild

Methods

compare :: Role -> Role -> Ordering #

(<) :: Role -> Role -> Bool #

(<=) :: Role -> Role -> Bool #

(>) :: Role -> Role -> Bool #

(>=) :: Role -> Role -> Bool #

max :: Role -> Role -> Role #

min :: Role -> Role -> Role #

Show Role Source # 
Instance details

Defined in Discord.Internal.Types.Guild

Methods

showsPrec :: Int -> Role -> ShowS #

show :: Role -> String #

showList :: [Role] -> ShowS #

FromJSON Role Source # 
Instance details

Defined in Discord.Internal.Types.Guild

data GuildInfo Source #

Constructors

GuildInfo 

Fields

data Guild Source #

Guilds in Discord represent a collection of users and channels into an isolated Server

Constructors

Guild 

Fields

Instances

Instances details
Eq Guild Source # 
Instance details

Defined in Discord.Internal.Types.Guild

Methods

(==) :: Guild -> Guild -> Bool #

(/=) :: Guild -> Guild -> Bool #

Ord Guild Source # 
Instance details

Defined in Discord.Internal.Types.Guild

Methods

compare :: Guild -> Guild -> Ordering #

(<) :: Guild -> Guild -> Bool #

(<=) :: Guild -> Guild -> Bool #

(>) :: Guild -> Guild -> Bool #

(>=) :: Guild -> Guild -> Bool #

max :: Guild -> Guild -> Guild #

min :: Guild -> Guild -> Guild #

Show Guild Source # 
Instance details

Defined in Discord.Internal.Types.Guild

Methods

showsPrec :: Int -> Guild -> ShowS #

show :: Guild -> String #

showList :: [Guild] -> ShowS #

FromJSON Guild Source # 
Instance details

Defined in Discord.Internal.Types.Guild

data Event Source #

Represents possible events sent by discord. Detailed information can be found at https://discord.com/developers/docs/topics/gateway.

Instances

Instances details
Eq Event Source # 
Instance details

Defined in Discord.Internal.Types.Events

Methods

(==) :: Event -> Event -> Bool #

(/=) :: Event -> Event -> Bool #

Show Event Source # 
Instance details

Defined in Discord.Internal.Types.Events

Methods

showsPrec :: Int -> Event -> ShowS #

show :: Event -> String #

showList :: [Event] -> ShowS #

reparse :: (ToJSON a, FromJSON b) => a -> Parser b Source #

Convert ToJSON value to FromJSON value

data UpdateStatusType Source #

Instances

Instances details
Enum UpdateStatusType Source # 
Instance details

Defined in Discord.Internal.Types.Gateway

Eq UpdateStatusType Source # 
Instance details

Defined in Discord.Internal.Types.Gateway

Ord UpdateStatusType Source # 
Instance details

Defined in Discord.Internal.Types.Gateway

Show UpdateStatusType Source # 
Instance details

Defined in Discord.Internal.Types.Gateway

data GatewayIntent Source #