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 {}
- newtype DiscordId a = DiscordId {}
- data ChannelIdType
- type ChannelId = DiscordId ChannelIdType
- data StageIdType
- type StageId = DiscordId StageIdType
- data GuildIdType
- type GuildId = DiscordId GuildIdType
- data MessageIdType
- type MessageId = DiscordId MessageIdType
- data AttachmentIdType
- type AttachmentId = DiscordId AttachmentIdType
- data EmojiIdType
- type EmojiId = DiscordId EmojiIdType
- data StickerIdType
- type StickerId = DiscordId StickerIdType
- data UserIdType
- type UserId = DiscordId UserIdType
- data OverwriteIdType
- type OverwriteId = DiscordId OverwriteIdType
- data RoleIdType
- type RoleId = DiscordId RoleIdType
- data IntegrationIdType
- type IntegrationId = DiscordId IntegrationIdType
- data WebhookIdType
- type WebhookId = DiscordId WebhookIdType
- data ParentIdType
- type ParentId = DiscordId ParentIdType
- data ApplicationIdType
- type ApplicationId = DiscordId ApplicationIdType
- data ApplicationCommandIdType
- type ApplicationCommandId = DiscordId ApplicationCommandIdType
- data InteractionIdType
- type InteractionId = DiscordId InteractionIdType
- data ScheduledEventIdType
- type ScheduledEventId = DiscordId ScheduledEventIdType
- data ScheduledEventEntityIdType
- type ScheduledEventEntityId = DiscordId ScheduledEventEntityIdType
- newtype InteractionToken = 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
Instances
data ChannelIdType Source #
type ChannelId = DiscordId ChannelIdType Source #
data StageIdType Source #
type StageId = DiscordId StageIdType Source #
data GuildIdType Source #
type GuildId = DiscordId GuildIdType Source #
data MessageIdType Source #
type MessageId = DiscordId MessageIdType Source #
data AttachmentIdType Source #
type AttachmentId = DiscordId AttachmentIdType Source #
data EmojiIdType Source #
type EmojiId = DiscordId EmojiIdType Source #
data StickerIdType Source #
type StickerId = DiscordId StickerIdType Source #
data UserIdType Source #
type UserId = DiscordId UserIdType Source #
data OverwriteIdType Source #
type OverwriteId = DiscordId OverwriteIdType Source #
data RoleIdType Source #
type RoleId = DiscordId RoleIdType Source #
data IntegrationIdType Source #
data WebhookIdType Source #
type WebhookId = DiscordId WebhookIdType Source #
data ParentIdType Source #
type ParentId = DiscordId ParentIdType Source #
data ApplicationIdType Source #
data InteractionIdType Source #
data ScheduledEventIdType Source #
newtype InteractionToken Source #
Instances
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 #