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

Safe HaskellNone
LanguageHaskell2010

Discord.Types.Prelude

Description

Provides base types and utility functions needed for modules in Discord.Types

Synopsis

Documentation

data Auth Source #

Authorization token for the Discord API

Constructors

Auth Text 

Instances

Eq Auth Source # 

Methods

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

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

Ord Auth Source # 

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 # 

Methods

showsPrec :: Int -> Auth -> ShowS #

show :: Auth -> String #

showList :: [Auth] -> ShowS #

formatAuth :: Auth -> ByteString Source #

Formats the token for use with the REST API

authToken :: Auth -> Text Source #

Get the raw token formatted for use with the websocket gateway

newtype Snowflake Source #

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

Constructors

Snowflake Word64 

Instances

Enum Snowflake Source # 
Eq Snowflake Source # 
Integral Snowflake Source # 
Num Snowflake Source # 
Ord Snowflake Source # 
Real Snowflake Source # 
Show Snowflake Source # 
ToJSON Snowflake Source # 
FromJSON Snowflake Source # 
Bits Snowflake Source # 

creationDate :: Snowflake -> UTCTime Source #

Gets a creation date from a snowflake.

epochTime :: UTCTime Source #

Default timestamp