2020-10-22 15:50:47 +00:00
|
|
|
import { Channel } from '../structures/channel.ts'
|
|
|
|
import { Emoji } from '../structures/emoji.ts'
|
|
|
|
import { Member } from '../structures/member.ts'
|
|
|
|
import { Role } from '../structures/role.ts'
|
|
|
|
import { User } from '../structures/user.ts'
|
|
|
|
import { PresenceUpdatePayload } from './presenceTypes.ts'
|
|
|
|
import { VoiceStatePayload } from './voiceTypes.ts'
|
|
|
|
|
|
|
|
interface GuildPayload {
|
|
|
|
id: string
|
|
|
|
name: string
|
|
|
|
icon: string | undefined
|
|
|
|
icon_hash?: string | undefined
|
|
|
|
splash: string | undefined
|
|
|
|
discovery_splash: string | undefined
|
|
|
|
owner?: boolean
|
|
|
|
owner_id: string
|
|
|
|
permissions?: string
|
|
|
|
region: string
|
|
|
|
afk_channel_id: string | undefined
|
|
|
|
afk_timeout: number
|
|
|
|
widget_enabled?: boolean
|
|
|
|
widge_channel_id?: string | undefined
|
|
|
|
verification_level: string
|
|
|
|
default_message_notifications: string
|
|
|
|
explicit_content_filter: string
|
|
|
|
roles: Role[]
|
|
|
|
emojis: Emoji[]
|
|
|
|
features: GuildFeatures[]
|
|
|
|
mfa_level: string
|
|
|
|
application_id: string | undefined
|
|
|
|
system_channel_id: string | undefined
|
|
|
|
system_channel_flags: string
|
|
|
|
rules_channel_id: string | undefined
|
|
|
|
joined_at?: string
|
|
|
|
large?: boolean
|
|
|
|
unavailable: boolean
|
|
|
|
member_count?: number
|
|
|
|
voice_states?: VoiceStatePayload[]
|
|
|
|
members?: Member[]
|
|
|
|
channels?: Channel[]
|
|
|
|
presences?: PresenceUpdatePayload[]
|
|
|
|
max_presences?: number | undefined
|
|
|
|
max_members?: number
|
|
|
|
vanity_url_code: string | undefined
|
|
|
|
description: string | undefined
|
|
|
|
banner: string | undefined
|
|
|
|
premium_tier: number
|
|
|
|
premium_subscription_count?: number
|
|
|
|
preferred_locale: string
|
|
|
|
public_updates_channel_id: string | undefined
|
|
|
|
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 {
|
|
|
|
user: User
|
|
|
|
nick: string | undefined
|
|
|
|
roles: Role[]
|
|
|
|
joined_at: string
|
|
|
|
premium_since?: string | undefined
|
|
|
|
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 }
|