2020-10-23 16:11:00 +00:00
|
|
|
import { ChannelPayload } from './channelTypes.ts'
|
|
|
|
import { EmojiPayload } from './emojiTypes.ts'
|
2020-10-22 15:50:47 +00:00
|
|
|
import { PresenceUpdatePayload } from './presenceTypes.ts'
|
2020-10-23 16:11:00 +00:00
|
|
|
import { RolePayload } from './roleTypes.ts'
|
|
|
|
import { UserPayload } from './userTypes.ts'
|
2020-10-22 15:50:47 +00:00
|
|
|
import { VoiceStatePayload } from './voiceTypes.ts'
|
|
|
|
|
|
|
|
interface GuildPayload {
|
|
|
|
id: string
|
|
|
|
name: string
|
2020-10-23 16:11:00 +00:00
|
|
|
icon?: string
|
|
|
|
icon_hash?: string
|
|
|
|
splash?: string
|
|
|
|
discovery_splash?: string
|
2020-10-22 15:50:47 +00:00
|
|
|
owner?: boolean
|
|
|
|
owner_id: string
|
|
|
|
permissions?: string
|
|
|
|
region: string
|
2020-10-23 16:11:00 +00:00
|
|
|
afk_channel_id?: string
|
2020-10-22 15:50:47 +00:00
|
|
|
afk_timeout: number
|
|
|
|
widget_enabled?: boolean
|
2020-10-24 15:00:42 +00:00
|
|
|
widget_channel_id?: string
|
2020-10-22 15:50:47 +00:00
|
|
|
verification_level: string
|
|
|
|
default_message_notifications: string
|
|
|
|
explicit_content_filter: string
|
2020-10-23 16:11:00 +00:00
|
|
|
roles: RolePayload[]
|
|
|
|
emojis: EmojiPayload[]
|
2020-10-22 15:50:47 +00:00
|
|
|
features: GuildFeatures[]
|
|
|
|
mfa_level: string
|
2020-10-23 16:11:00 +00:00
|
|
|
application_id?: string
|
|
|
|
system_channel_id?: string
|
2020-10-22 15:50:47 +00:00
|
|
|
system_channel_flags: string
|
2020-10-23 16:11:00 +00:00
|
|
|
rules_channel_id?: string
|
2020-10-22 15:50:47 +00:00
|
|
|
joined_at?: string
|
|
|
|
large?: boolean
|
|
|
|
unavailable: boolean
|
|
|
|
member_count?: number
|
|
|
|
voice_states?: VoiceStatePayload[]
|
2020-10-23 16:11:00 +00:00
|
|
|
members?: MemberPayload[]
|
|
|
|
channels?: ChannelPayload[]
|
2020-10-22 15:50:47 +00:00
|
|
|
presences?: PresenceUpdatePayload[]
|
2020-10-23 16:11:00 +00:00
|
|
|
max_presences?: number
|
2020-10-22 15:50:47 +00:00
|
|
|
max_members?: number
|
2020-10-23 16:11:00 +00:00
|
|
|
vanity_url_code?: string
|
|
|
|
description?: string
|
|
|
|
banner?: string
|
2020-10-22 15:50:47 +00:00
|
|
|
premium_tier: number
|
|
|
|
premium_subscription_count?: number
|
|
|
|
preferred_locale: string
|
2020-10-23 16:11:00 +00:00
|
|
|
public_updates_channel_id?: string
|
2020-10-22 15:50:47 +00:00
|
|
|
max_video_channel_users?: number
|
|
|
|
approximate_number_count?: number
|
|
|
|
approximate_presence_count?: number
|
2020-10-22 06:10:51 +00:00
|
|
|
}
|
|
|
|
|
2020-10-22 15:50:47 +00:00
|
|
|
interface MemberPayload {
|
2020-10-23 16:11:00 +00:00
|
|
|
user: UserPayload
|
|
|
|
nick?: string
|
|
|
|
roles: RolePayload[]
|
2020-10-22 15:50:47 +00:00
|
|
|
joined_at: string
|
2020-10-23 16:11:00 +00:00
|
|
|
premium_since?: string
|
2020-10-22 15:50:47 +00:00
|
|
|
deaf: boolean
|
|
|
|
mute: boolean
|
2020-10-22 06:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
enum MessageNotification {
|
2020-10-22 15:50:47 +00:00
|
|
|
ALL_MESSAGES = 0,
|
|
|
|
ONLY_MENTIONS = 1
|
2020-10-22 06:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
enum ContentFilter {
|
2020-10-22 15:50:47 +00:00
|
|
|
DISABLED = 0,
|
|
|
|
MEMBERS_WITHOUT_ROLES = 1,
|
|
|
|
ALL_MEMBERS = 3
|
2020-10-22 06:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
enum MFA {
|
2020-10-22 15:50:47 +00:00
|
|
|
NONE = 0,
|
|
|
|
ELEVATED = 1
|
2020-10-22 06:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
enum Verification {
|
2020-10-22 15:50:47 +00:00
|
|
|
NONE = 0,
|
|
|
|
LOW = 1,
|
|
|
|
MEDIUM = 2,
|
|
|
|
HIGH = 3,
|
|
|
|
VERY_HIGH = 4
|
2020-10-22 06:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
enum PremiumTier {
|
2020-10-22 15:50:47 +00:00
|
|
|
NONE = 0,
|
|
|
|
TIER_1 = 1,
|
|
|
|
TIER_2 = 2,
|
|
|
|
TIER_3 = 3
|
2020-10-22 06:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
enum SystemChannelFlags {
|
2020-10-22 15:50:47 +00:00
|
|
|
SUPPRESS_JOIN_NOTIFICATIONS = 1 << 0,
|
|
|
|
SUPPRESS_PREMIUM_SUBSCRIPTIONS = 1 << 1
|
2020-10-22 06:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type GuildFeatures =
|
2020-10-22 15:50:47 +00:00
|
|
|
| 'INVITE_SPLASH'
|
|
|
|
| 'VIP_REGIONS'
|
|
|
|
| 'VANITY_URL'
|
|
|
|
| 'VERIFIED'
|
|
|
|
| 'PARTNERED'
|
|
|
|
| 'PUBLIC'
|
|
|
|
| 'COMMERCE'
|
|
|
|
| 'NEWS'
|
|
|
|
| 'DISCOVERABLE'
|
|
|
|
| 'FEATURABLE'
|
|
|
|
| 'ANIMATED_ICON'
|
|
|
|
| 'BANNER'
|
|
|
|
|
|
|
|
export { MemberPayload, GuildPayload, GuildFeatures }
|