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