Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Discord.Internal.Types.Guild
Description
Types relating to Discord Guilds (servers)
Synopsis
- data Guild = Guild {
- guildId :: GuildId
- guildName :: Text
- guildIcon :: Maybe Text
- guildIconHash :: Maybe Text
- guildSplash :: Maybe Text
- guildDiscoverySplash :: Maybe Text
- guildOwner :: Maybe Bool
- guildOwnerId :: UserId
- guildPermissions :: Maybe Text
- guildAfkId :: Maybe ChannelId
- guildAfkTimeout :: Integer
- guildWidgetEnabled :: Maybe Bool
- guildWidgetChannelId :: Maybe ChannelId
- guildVerificationLevel :: Integer
- guildNotification :: Integer
- guildExplicitFilterLevel :: Integer
- guildRoles :: [Role]
- guildEmojis :: [Emoji]
- guildFeatures :: [Text]
- guildMultiFactAuth :: !Integer
- guildApplicationId :: Maybe ApplicationId
- guildSystemChannelId :: Maybe ChannelId
- guildSystemChannelFlags :: Integer
- guildRulesChannelId :: Maybe ChannelId
- guildMaxPresences :: Maybe Integer
- guildMaxMembers :: Maybe Integer
- guildVanityURL :: Maybe Text
- guildDescription :: Maybe Text
- guildBanner :: Maybe Text
- guildPremiumTier :: Integer
- guildSubscriptionCount :: Maybe Integer
- guildPreferredLocale :: Text
- guildPublicUpdatesChannel :: Maybe ChannelId
- guildMaxVideoUsers :: Maybe Integer
- guildApproxMemberCount :: Maybe Integer
- guildApproxPresenceCount :: Maybe Integer
- guildNSFWLevel :: Integer
- guildStickers :: Maybe [StickerItem]
- guildPremiumBar :: Bool
- newtype GuildUnavailable = GuildUnavailable {}
- data PresenceInfo = PresenceInfo {
- presenceUserId :: UserId
- presenceActivities :: Maybe [(Activity, Maybe [Text])]
- presenceGuildId :: Maybe GuildId
- presenceStatus :: Maybe Text
- data Activity = Activity {
- activityName :: Text
- activityType :: ActivityType
- activityUrl :: Maybe Text
- activityCreatedAt :: Integer
- activityTimeStamps :: Maybe ActivityTimestamps
- activityApplicationId :: Maybe ApplicationId
- activityDetails :: Maybe Text
- activityState :: Maybe Text
- activityEmoji :: Maybe Emoji
- activityParty :: Maybe ActivityParty
- activityInstance :: Maybe Bool
- activityFlags :: Maybe Integer
- activityButtons :: Maybe [ActivityButton]
- mkActivity :: Text -> ActivityType -> Activity
- data ActivityTimestamps = ActivityTimestamps {}
- data ActivityParty = ActivityParty {}
- data ActivityButton = ActivityButton {}
- data ActivityType
- data PartialGuild = PartialGuild {}
- data Role = Role {
- roleId :: RoleId
- roleName :: Text
- roleColor :: DiscordColor
- roleHoist :: Bool
- rolePos :: Integer
- rolePerms :: RolePermissions
- roleManaged :: Bool
- roleMention :: Bool
- roleIdToRole :: Guild -> RoleId -> Maybe Role
- data VoiceRegion = VoiceRegion {}
- data GuildBan = GuildBan {}
- data Invite = Invite {}
- data InviteWithMeta = InviteWithMeta Invite InviteMeta
- data InviteMeta = InviteMeta {}
- data Integration = Integration {}
- data IntegrationAccount = IntegrationAccount {
- accountId :: Text
- accountName :: Text
- data GuildWidget = GuildWidget {}
Documentation
Guilds in Discord represent a collection of users and channels into an isolated Server
https://discord.com/developers/docs/resources/guild#guild-object
Constructors
Guild | |
Fields
|
data PresenceInfo Source #
Constructors
PresenceInfo | |
Fields
|
Instances
FromJSON PresenceInfo Source # | |
Defined in Discord.Internal.Types.Guild | |
Read PresenceInfo Source # | |
Defined in Discord.Internal.Types.Guild Methods readsPrec :: Int -> ReadS PresenceInfo # readList :: ReadS [PresenceInfo] # | |
Show PresenceInfo Source # | |
Defined in Discord.Internal.Types.Guild Methods showsPrec :: Int -> PresenceInfo -> ShowS # show :: PresenceInfo -> String # showList :: [PresenceInfo] -> ShowS # | |
Eq PresenceInfo Source # | |
Defined in Discord.Internal.Types.Guild | |
Ord PresenceInfo Source # | |
Defined in Discord.Internal.Types.Guild Methods compare :: PresenceInfo -> PresenceInfo -> Ordering # (<) :: PresenceInfo -> PresenceInfo -> Bool # (<=) :: PresenceInfo -> PresenceInfo -> Bool # (>) :: PresenceInfo -> PresenceInfo -> Bool # (>=) :: PresenceInfo -> PresenceInfo -> Bool # max :: PresenceInfo -> PresenceInfo -> PresenceInfo # min :: PresenceInfo -> PresenceInfo -> PresenceInfo # |
Object for a single activity
https://discord.com/developers/docs/topics/gateway-events#activity-object
When setting a bot's activity, only the name, url, and type are sent - and it seems that not many types are permitted either.
Only youtube and twitch urls will work.
Constructors
Activity | |
Fields
|
mkActivity :: Text -> ActivityType -> Activity Source #
The quick and easy way to make an activity for a discord bot.
To set the activityState
or activityUrl
, please use record field syntax.
data ActivityTimestamps Source #
Constructors
ActivityTimestamps | |
Fields
|
Instances
data ActivityParty Source #
Constructors
ActivityParty | |
Fields
|
Instances
data ActivityButton Source #
Constructors
ActivityButton | |
Fields |
Instances
data ActivityType Source #
To see what these look like, go to here: https://discord.com/developers/docs/topics/gateway#activity-object-activity-types
Constructors
ActivityTypeGame | |
ActivityTypeStreaming | |
ActivityTypeListening | |
ActivityTypeWatching | |
ActivityTypeCustom | |
ActivityTypeCompeting |
Instances
data PartialGuild Source #
Constructors
PartialGuild | |
Fields |
Instances
FromJSON PartialGuild Source # | |
Defined in Discord.Internal.Types.Guild | |
Read PartialGuild Source # | |
Defined in Discord.Internal.Types.Guild Methods readsPrec :: Int -> ReadS PartialGuild # readList :: ReadS [PartialGuild] # | |
Show PartialGuild Source # | |
Defined in Discord.Internal.Types.Guild Methods showsPrec :: Int -> PartialGuild -> ShowS # show :: PartialGuild -> String # showList :: [PartialGuild] -> ShowS # | |
Eq PartialGuild Source # | |
Defined in Discord.Internal.Types.Guild | |
Ord PartialGuild Source # | |
Defined in Discord.Internal.Types.Guild Methods compare :: PartialGuild -> PartialGuild -> Ordering # (<) :: PartialGuild -> PartialGuild -> Bool # (<=) :: PartialGuild -> PartialGuild -> Bool # (>) :: PartialGuild -> PartialGuild -> Bool # (>=) :: PartialGuild -> PartialGuild -> Bool # max :: PartialGuild -> PartialGuild -> PartialGuild # min :: PartialGuild -> PartialGuild -> PartialGuild # |
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
|
roleIdToRole :: Guild -> RoleId -> Maybe Role Source #
If there is no such role on the guild return nothing otherwise return the role. Take the head of the list. List should always be one, because the ID is unique
data VoiceRegion Source #
VoiceRegion is only refrenced in Guild endpoints, will be moved when voice support is added
Constructors
VoiceRegion | |
Fields
|
Instances
FromJSON VoiceRegion Source # | |
Defined in Discord.Internal.Types.Guild | |
Read VoiceRegion Source # | |
Defined in Discord.Internal.Types.Guild Methods readsPrec :: Int -> ReadS VoiceRegion # readList :: ReadS [VoiceRegion] # readPrec :: ReadPrec VoiceRegion # readListPrec :: ReadPrec [VoiceRegion] # | |
Show VoiceRegion Source # | |
Defined in Discord.Internal.Types.Guild Methods showsPrec :: Int -> VoiceRegion -> ShowS # show :: VoiceRegion -> String # showList :: [VoiceRegion] -> ShowS # | |
Eq VoiceRegion Source # | |
Defined in Discord.Internal.Types.Guild | |
Ord VoiceRegion Source # | |
Defined in Discord.Internal.Types.Guild Methods compare :: VoiceRegion -> VoiceRegion -> Ordering # (<) :: VoiceRegion -> VoiceRegion -> Bool # (<=) :: VoiceRegion -> VoiceRegion -> Bool # (>) :: VoiceRegion -> VoiceRegion -> Bool # (>=) :: VoiceRegion -> VoiceRegion -> Bool # max :: VoiceRegion -> VoiceRegion -> VoiceRegion # min :: VoiceRegion -> VoiceRegion -> VoiceRegion # |
Info about a Ban
Constructors
GuildBan | |
Fields
|
Represents a code to add a user to a guild
Constructors
Invite | |
Fields
|
data InviteWithMeta Source #
Invite code with additional metadata
Constructors
InviteWithMeta Invite InviteMeta |
Instances
FromJSON InviteWithMeta Source # | |
Defined in Discord.Internal.Types.Guild Methods parseJSON :: Value -> Parser InviteWithMeta # parseJSONList :: Value -> Parser [InviteWithMeta] # |
data InviteMeta Source #
Additional metadata about an invite.
Constructors
InviteMeta | |
Fields
|
Instances
FromJSON InviteMeta Source # | |
Defined in Discord.Internal.Types.Guild | |
Read InviteMeta Source # | |
Defined in Discord.Internal.Types.Guild Methods readsPrec :: Int -> ReadS InviteMeta # readList :: ReadS [InviteMeta] # readPrec :: ReadPrec InviteMeta # readListPrec :: ReadPrec [InviteMeta] # | |
Show InviteMeta Source # | |
Defined in Discord.Internal.Types.Guild Methods showsPrec :: Int -> InviteMeta -> ShowS # show :: InviteMeta -> String # showList :: [InviteMeta] -> ShowS # | |
Eq InviteMeta Source # | |
Defined in Discord.Internal.Types.Guild | |
Ord InviteMeta Source # | |
Defined in Discord.Internal.Types.Guild Methods compare :: InviteMeta -> InviteMeta -> Ordering # (<) :: InviteMeta -> InviteMeta -> Bool # (<=) :: InviteMeta -> InviteMeta -> Bool # (>) :: InviteMeta -> InviteMeta -> Bool # (>=) :: InviteMeta -> InviteMeta -> Bool # max :: InviteMeta -> InviteMeta -> InviteMeta # min :: InviteMeta -> InviteMeta -> InviteMeta # |
data Integration Source #
Represents the behavior of a third party account link.
Constructors
Integration | |
Fields
|
Instances
FromJSON Integration Source # | |
Defined in Discord.Internal.Types.Guild | |
Read Integration Source # | |
Defined in Discord.Internal.Types.Guild Methods readsPrec :: Int -> ReadS Integration # readList :: ReadS [Integration] # readPrec :: ReadPrec Integration # readListPrec :: ReadPrec [Integration] # | |
Show Integration Source # | |
Defined in Discord.Internal.Types.Guild Methods showsPrec :: Int -> Integration -> ShowS # show :: Integration -> String # showList :: [Integration] -> ShowS # | |
Eq Integration Source # | |
Defined in Discord.Internal.Types.Guild | |
Ord Integration Source # | |
Defined in Discord.Internal.Types.Guild Methods compare :: Integration -> Integration -> Ordering # (<) :: Integration -> Integration -> Bool # (<=) :: Integration -> Integration -> Bool # (>) :: Integration -> Integration -> Bool # (>=) :: Integration -> Integration -> Bool # max :: Integration -> Integration -> Integration # min :: Integration -> Integration -> Integration # |
data IntegrationAccount Source #
Represents a third party account link.
Constructors
IntegrationAccount | |
Fields
|
Instances
data GuildWidget Source #
Represents an image to be used in third party sites to link to a discord channel
Constructors
GuildWidget | |
Fields
|