invites
invites: {
create: (
data: Omit<CreateInviteFromChannel, "channelId">,
) => Promise<
{
approximateMemberCount?: number;
approximatePresenceCount?: number;
channel: { id: string; name: string | null; type: ChannelType }
| null;
code: string;
createdAt: string;
expiresAt?: string | null;
guild?: {
banner: string | null;
description: string | null;
features: GuildFeature[];
icon: string | null;
id: string;
name: string;
nsfwLevel: GuildNSFWLevel;
premiumSubscriptionCount?: number;
splash: string | null;
vanityUrlCode: string | null;
verificationLevel: GuildVerificationLevel;
};
guildScheduledEvent?: | {
channelId: string;
creator?: APIUser;
creatorId?: string
| null;
description?: string | null;
entityId: string | null;
entityMetadata: null;
entityType: StageInstance;
guildId: string;
id: string;
image?: string | null;
name: string;
privacyLevel: GuildScheduledEventPrivacyLevel;
recurrenceRule: APIGuildScheduledEventRecurrenceRule | null;
scheduledEndTime: string | null;
scheduledStartTime: string;
status: GuildScheduledEventStatus;
userCount?: number;
}
| {
channelId: string;
creator?: APIUser;
creatorId?: string
| null;
description?: string | null;
entityId: string | null;
entityMetadata: null;
entityType: Voice;
guildId: string;
id: string;
image?: string | null;
name: string;
privacyLevel: GuildScheduledEventPrivacyLevel;
recurrenceRule: APIGuildScheduledEventRecurrenceRule | null;
scheduledEndTime: string | null;
scheduledStartTime: string;
status: GuildScheduledEventStatus;
userCount?: number;
}
| {
channelId: null;
creator?: APIUser;
creatorId?: string
| null;
description?: string | null;
entityId: string | null;
entityMetadata: { location: string };
entityType: External;
guildId: string;
id: string;
image?: string | null;
name: string;
privacyLevel: GuildScheduledEventPrivacyLevel;
recurrenceRule: APIGuildScheduledEventRecurrenceRule | null;
scheduledEndTime: string | null;
scheduledStartTime: string;
status: GuildScheduledEventStatus;
userCount?: number;
};
inviter?: {
accentColor?: number
| null;
avatar: string | null;
avatarDecorationData?: APIAvatarDecorationData | null;
banner?: string | null;
bot?: boolean;
discriminator: string;
email?: string | null;
flags?: UserFlags;
globalName: string | null;
id: string;
locale?: string;
mfaEnabled?: boolean;
premiumType?: UserPremiumType;
primaryGuild?: PrimaryGuild;
publicFlags?: UserFlags;
system?: boolean;
username: string;
verified?: boolean;
};
maxAge: number;
maxUses: number;
targetApplication?: {
approximateGuildCount?: number;
approximateUserInstallCount?: number;
bot?: APIUser;
botPublic?: boolean;
botRequireCodeGrant?: boolean;
coverImage?: string;
customInstallUrl?: string;
description?: string;
flags?: ApplicationFlags;
guild?: APIPartialGuild;
guildId?: string;
icon?: string
| null;
id?: string;
installParams?: APIApplicationInstallParams;
integrationTypesConfig?: APIApplicationIntegrationTypesConfigMap;
interactionsEndpointUrl?: string | null;
name?: string;
owner?: APIUser;
primarySkuId?: string;
privacyPolicyUrl?: string;
redirectUris?: string[];
roleConnectionsVerificationUrl?: string | null;
rpcOrigins?: string[];
slug?: string;
tags?: [string, string?, string?, string?, string?];
team?: APITeam | null;
termsOfServiceUrl?: string;
verifyKey?: string;
};
targetType?: InviteTargetType;
targetUser?: {
accentColor?: number
| null;
avatar: string | null;
avatarDecorationData?: APIAvatarDecorationData | null;
banner?: string | null;
bot?: boolean;
discriminator: string;
email?: string | null;
flags?: UserFlags;
globalName: string | null;
id: string;
locale?: string;
mfaEnabled?: boolean;
premiumType?: UserPremiumType;
primaryGuild?: PrimaryGuild;
publicFlags?: UserFlags;
system?: boolean;
username: string;
verified?: boolean;
};
temporary: boolean;
type: InviteType;
uses: number;
},
>;
delete: (
code: string,
reason?: string,
) => Promise<
{
approximateMemberCount?: number;
approximatePresenceCount?: number;
channel: { id: string; name: string | null; type: ChannelType }
| null;
code: string;
expiresAt?: string | null;
guild?: {
banner: string | null;
description: string | null;
features: GuildFeature[];
icon: string | null;
id: string;
name: string;
nsfwLevel: GuildNSFWLevel;
premiumSubscriptionCount?: number;
splash: string | null;
vanityUrlCode: string | null;
verificationLevel: GuildVerificationLevel;
};
guildScheduledEvent?: | {
channelId: string;
creator?: APIUser;
creatorId?: string
| null;
description?: string | null;
entityId: string | null;
entityMetadata: null;
entityType: StageInstance;
guildId: string;
id: string;
image?: string | null;
name: string;
privacyLevel: GuildScheduledEventPrivacyLevel;
recurrenceRule: APIGuildScheduledEventRecurrenceRule | null;
scheduledEndTime: string | null;
scheduledStartTime: string;
status: GuildScheduledEventStatus;
userCount?: number;
}
| {
channelId: string;
creator?: APIUser;
creatorId?: string
| null;
description?: string | null;
entityId: string | null;
entityMetadata: null;
entityType: Voice;
guildId: string;
id: string;
image?: string | null;
name: string;
privacyLevel: GuildScheduledEventPrivacyLevel;
recurrenceRule: APIGuildScheduledEventRecurrenceRule | null;
scheduledEndTime: string | null;
scheduledStartTime: string;
status: GuildScheduledEventStatus;
userCount?: number;
}
| {
channelId: null;
creator?: APIUser;
creatorId?: string
| null;
description?: string | null;
entityId: string | null;
entityMetadata: { location: string };
entityType: External;
guildId: string;
id: string;
image?: string | null;
name: string;
privacyLevel: GuildScheduledEventPrivacyLevel;
recurrenceRule: APIGuildScheduledEventRecurrenceRule | null;
scheduledEndTime: string | null;
scheduledStartTime: string;
status: GuildScheduledEventStatus;
userCount?: number;
};
inviter?: {
accentColor?: number
| null;
avatar: string | null;
avatarDecorationData?: APIAvatarDecorationData | null;
banner?: string | null;
bot?: boolean;
discriminator: string;
email?: string | null;
flags?: UserFlags;
globalName: string | null;
id: string;
locale?: string;
mfaEnabled?: boolean;
premiumType?: UserPremiumType;
primaryGuild?: PrimaryGuild;
publicFlags?: UserFlags;
system?: boolean;
username: string;
verified?: boolean;
};
targetApplication?: {
approximateGuildCount?: number;
approximateUserInstallCount?: number;
bot?: APIUser;
botPublic?: boolean;
botRequireCodeGrant?: boolean;
coverImage?: string;
customInstallUrl?: string;
description?: string;
flags?: ApplicationFlags;
guild?: APIPartialGuild;
guildId?: string;
icon?: string
| null;
id?: string;
installParams?: APIApplicationInstallParams;
integrationTypesConfig?: APIApplicationIntegrationTypesConfigMap;
interactionsEndpointUrl?: string | null;
name?: string;
owner?: APIUser;
primarySkuId?: string;
privacyPolicyUrl?: string;
redirectUris?: string[];
roleConnectionsVerificationUrl?: string | null;
rpcOrigins?: string[];
slug?: string;
tags?: [string, string?, string?, string?, string?];
team?: APITeam | null;
termsOfServiceUrl?: string;
verifyKey?: string;
};
targetType?: InviteTargetType;
targetUser?: {
accentColor?: number
| null;
avatar: string | null;
avatarDecorationData?: APIAvatarDecorationData | null;
banner?: string | null;
bot?: boolean;
discriminator: string;
email?: string | null;
flags?: UserFlags;
globalName: string | null;
id: string;
locale?: string;
mfaEnabled?: boolean;
premiumType?: UserPremiumType;
primaryGuild?: PrimaryGuild;
publicFlags?: UserFlags;
system?: boolean;
username: string;
verified?: boolean;
};
type: InviteType;
},
>;
list: () => Promise<
{
approximateMemberCount?: number;
approximatePresenceCount?: number;
channel: { id: string; name: string | null; type: ChannelType }
| null;
code: string;
createdAt: string;
expiresAt?: string | null;
guild?: {
banner: string | null;
description: string | null;
features: GuildFeature[];
icon: string | null;
id: string;
name: string;
nsfwLevel: GuildNSFWLevel;
premiumSubscriptionCount?: number;
splash: string | null;
vanityUrlCode: string | null;
verificationLevel: GuildVerificationLevel;
};
guildScheduledEvent?: | {
channelId: string;
creator?: APIUser;
creatorId?: string
| null;
description?: string | null;
entityId: string | null;
entityMetadata: null;
entityType: StageInstance;
guildId: string;
id: string;
image?: string | null;
name: string;
privacyLevel: GuildScheduledEventPrivacyLevel;
recurrenceRule: APIGuildScheduledEventRecurrenceRule | null;
scheduledEndTime: string | null;
scheduledStartTime: string;
status: GuildScheduledEventStatus;
userCount?: number;
}
| {
channelId: string;
creator?: APIUser;
creatorId?: string
| null;
description?: string | null;
entityId: string | null;
entityMetadata: null;
entityType: Voice;
guildId: string;
id: string;
image?: string | null;
name: string;
privacyLevel: GuildScheduledEventPrivacyLevel;
recurrenceRule: APIGuildScheduledEventRecurrenceRule | null;
scheduledEndTime: string | null;
scheduledStartTime: string;
status: GuildScheduledEventStatus;
userCount?: number;
}
| {
channelId: null;
creator?: APIUser;
creatorId?: string
| null;
description?: string | null;
entityId: string | null;
entityMetadata: { location: string };
entityType: External;
guildId: string;
id: string;
image?: string | null;
name: string;
privacyLevel: GuildScheduledEventPrivacyLevel;
recurrenceRule: APIGuildScheduledEventRecurrenceRule | null;
scheduledEndTime: string | null;
scheduledStartTime: string;
status: GuildScheduledEventStatus;
userCount?: number;
};
inviter?: {
accentColor?: number
| null;
avatar: string | null;
avatarDecorationData?: APIAvatarDecorationData | null;
banner?: string | null;
bot?: boolean;
discriminator: string;
email?: string | null;
flags?: UserFlags;
globalName: string | null;
id: string;
locale?: string;
mfaEnabled?: boolean;
premiumType?: UserPremiumType;
primaryGuild?: PrimaryGuild;
publicFlags?: UserFlags;
system?: boolean;
username: string;
verified?: boolean;
};
maxAge: number;
maxUses: number;
targetApplication?: {
approximateGuildCount?: number;
approximateUserInstallCount?: number;
bot?: APIUser;
botPublic?: boolean;
botRequireCodeGrant?: boolean;
coverImage?: string;
customInstallUrl?: string;
description?: string;
flags?: ApplicationFlags;
guild?: APIPartialGuild;
guildId?: string;
icon?: string
| null;
id?: string;
installParams?: APIApplicationInstallParams;
integrationTypesConfig?: APIApplicationIntegrationTypesConfigMap;
interactionsEndpointUrl?: string | null;
name?: string;
owner?: APIUser;
primarySkuId?: string;
privacyPolicyUrl?: string;
redirectUris?: string[];
roleConnectionsVerificationUrl?: string | null;
rpcOrigins?: string[];
slug?: string;
tags?: [string, string?, string?, string?, string?];
team?: APITeam | null;
termsOfServiceUrl?: string;
verifyKey?: string;
};
targetType?: InviteTargetType;
targetUser?: {
accentColor?: number
| null;
avatar: string | null;
avatarDecorationData?: APIAvatarDecorationData | null;
banner?: string | null;
bot?: boolean;
discriminator: string;
email?: string | null;
flags?: UserFlags;
globalName: string | null;
id: string;
locale?: string;
mfaEnabled?: boolean;
premiumType?: UserPremiumType;
primaryGuild?: PrimaryGuild;
publicFlags?: UserFlags;
system?: boolean;
username: string;
verified?: boolean;
};
temporary: boolean;
type: InviteType;
uses: number;
}[],
>;
} = ...
createdAt gets the creation Date instace of the current object.