feat: guild locales in Interactions (#125)

* fix

* s
This commit is contained in:
Marcos Susaña 2022-11-07 12:14:46 -05:00 committed by GitHub
parent ea33e0e820
commit e4fa2a3ec3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,6 +82,7 @@ export abstract class BaseInteraction implements Model {
this.version = data.version;
this.locale = data.locale as Locales;
this.guildLocales = data.guild_locale as Locales;
const perms = data.app_permissions;
@ -117,6 +118,7 @@ export abstract class BaseInteraction implements Model {
// must be implemented
locale: Locales;
guildLocales: Locales;
// readonly property according to docs
readonly version: 1;
@ -553,6 +555,7 @@ export class PingInteraction extends BaseInteraction implements Model {
commandType: ApplicationCommandTypes;
commandGuildId?: Snowflake;
override locale = undefined as never;
override guildLocales = undefined as never;
async pong(): Promise<void> {
await this.session.rest.post<undefined>(