Safe Haskell | None |
---|---|
Language | Haskell2010 |
Provides base types and utility functions needed for modules in Discord.Internal.Types
Synopsis
- newtype Auth = Auth Text
- authToken :: Auth -> Text
- newtype Snowflake = Snowflake Word64
- type ChannelId = Snowflake
- type StageId = Snowflake
- type GuildId = Snowflake
- type MessageId = Snowflake
- type AttachmentId = Snowflake
- type EmojiId = Snowflake
- type StickerId = Snowflake
- type UserId = Snowflake
- type OverwriteId = Snowflake
- type RoleId = Snowflake
- type IntegrationId = Snowflake
- type WebhookId = Snowflake
- type ParentId = Snowflake
- type ApplicationId = Snowflake
- type ApplicationCommandId = Snowflake
- type InteractionId = Snowflake
- type InteractionToken = Text
- type Shard = (Int, Int)
- snowflakeCreationDate :: Snowflake -> UTCTime
- epochTime :: UTCTime
- class Data a => InternalDiscordEnum a where
- discordTypeStartValue :: a
- fromDiscordType :: a -> Int
- discordTypeTable :: [(Int, a)]
- discordTypeParseJSON :: String -> Value -> Parser a
- toMaybeJSON :: ToJSON a => a -> Maybe Value
Documentation
Authorization token for the Discord API
A unique integer identifier. Can be used to calculate the creation date of an entity.
Instances
type AttachmentId = Snowflake Source #
type OverwriteId = Snowflake Source #
type IntegrationId = Snowflake Source #
type ApplicationId = Snowflake Source #
type ApplicationCommandId = Snowflake Source #
type InteractionId = Snowflake Source #
type InteractionToken = Text Source #
snowflakeCreationDate :: Snowflake -> UTCTime Source #
Gets a creation date from a snowflake.
class Data a => InternalDiscordEnum a where Source #
discordTypeStartValue :: a Source #
fromDiscordType :: a -> Int Source #
discordTypeTable :: [(Int, a)] Source #
discordTypeParseJSON :: String -> Value -> Parser a Source #