mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
fix(types): handle communicationDisabledUntil correctly (#1999)
* types(GuildMemberUpdate): fix invalid type for `communicationDisabledUntil` * types(transformers): parse `communicationDisabledUntil`
This commit is contained in:
@@ -70,7 +70,9 @@ export function transformMessage(bot: Bot, payload: SnakeCasedPropertiesDeep<Mes
|
||||
: undefined,
|
||||
permissions: payload.interaction.member.permissions
|
||||
? bot.transformers.snowflake(payload.interaction.member.permissions) : undefined,
|
||||
communicationDisabledUntil: payload.interaction.member.communication_disabled_until,
|
||||
communicationDisabledUntil: payload.interaction.member.communication_disabled_until
|
||||
? Date.parse(payload.interaction.member.communication_disabled_until)
|
||||
: undefined,
|
||||
}
|
||||
: undefined,
|
||||
}
|
||||
|
||||
@@ -23,5 +23,5 @@ export interface GuildMemberUpdate {
|
||||
/** Whether the user has not yet passed the guild's Membership Screening requirements */
|
||||
pending?: boolean;
|
||||
/** when the user's [timeout](https://support.discord.com/hc/en-us/articles/4413305239191-Time-Out-FAQ) will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out */
|
||||
communicationDisabledUntil?: number;
|
||||
communicationDisabledUntil?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user