mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-20 05:23:31 +01:00
feat: add Locales to Interactions (#7131)
Co-authored-by: Rodry <38259440+ImRodry@users.noreply.github.com>
This commit is contained in:
9
typings/index.d.ts
vendored
9
typings/index.d.ts
vendored
@@ -469,10 +469,9 @@ export type KeyedEnum<K, T> = {
|
||||
[Key in keyof K]: T | string;
|
||||
};
|
||||
|
||||
export type EnumValueMapped<E extends KeyedEnum<T, number>, T extends Partial<Record<keyof E, unknown>>> = T &
|
||||
{
|
||||
[Key in keyof T as E[Key]]: T[Key];
|
||||
};
|
||||
export type EnumValueMapped<E extends KeyedEnum<T, number>, T extends Partial<Record<keyof E, unknown>>> = T & {
|
||||
[Key in keyof T as E[Key]]: T[Key];
|
||||
};
|
||||
|
||||
export type MappedChannelCategoryTypes = EnumValueMapped<
|
||||
typeof ChannelTypes,
|
||||
@@ -1330,6 +1329,8 @@ export class Interaction<Cached extends CacheType = CacheType> extends Base {
|
||||
public user: User;
|
||||
public version: number;
|
||||
public memberPermissions: CacheTypeReducer<Cached, Readonly<Permissions>>;
|
||||
public locale: string;
|
||||
public guildLocale: CacheTypeReducer<Cached, string, string, string>;
|
||||
public inGuild(): this is Interaction<'present'>;
|
||||
public inCachedGuild(): this is Interaction<'cached'>;
|
||||
public inRawGuild(): this is Interaction<'raw'>;
|
||||
|
||||
Reference in New Issue
Block a user