2020-12-02 11:18:45 +00:00
|
|
|
import { Channel } from '../structures/channel.ts'
|
|
|
|
import { Guild } from '../structures/guild.ts'
|
2020-10-31 12:33:34 +00:00
|
|
|
import { ChannelPayload } from './channel.ts'
|
|
|
|
import { GuildPayload } from './guild.ts'
|
|
|
|
import { UserPayload } from './user.ts'
|
2020-10-22 15:50:47 +00:00
|
|
|
|
|
|
|
export interface InvitePayload {
|
|
|
|
code: string
|
2020-10-23 16:11:00 +00:00
|
|
|
guild?: GuildPayload
|
|
|
|
channel: ChannelPayload
|
|
|
|
inviter?: UserPayload
|
|
|
|
target_user?: UserPayload
|
2020-10-22 15:50:47 +00:00
|
|
|
target_user_type?: number
|
|
|
|
approximate_presence_count?: number
|
|
|
|
approximate_member_count?: number
|
|
|
|
}
|
2020-12-02 07:20:45 +00:00
|
|
|
|
|
|
|
export interface PartialInvitePayload {
|
|
|
|
code: string
|
|
|
|
channel: Channel
|
|
|
|
guild?: Guild
|
2020-12-02 10:26:20 +00:00
|
|
|
}
|
2021-04-04 07:45:37 +00:00
|
|
|
|
|
|
|
export interface InviteMetadataPayload {
|
|
|
|
/** number of times this invite has been used */
|
|
|
|
uses: number
|
|
|
|
/** max number of times this invite can be used */
|
|
|
|
max_uses: number
|
|
|
|
/** duration (in seconds) after which the invite expires */
|
|
|
|
max_age: number
|
|
|
|
/** whether this invite only grants temporary membership */
|
|
|
|
temporary: boolean
|
|
|
|
/** when this invite was created */
|
|
|
|
created_at: Date
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface InviteWithMetadataPayload
|
|
|
|
extends InvitePayload,
|
|
|
|
InviteMetadataPayload {}
|