mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 01:10:07 +00:00
communicationDisabledUntil: discord return string, discordeno return number
This commit is contained in:
@@ -58,7 +58,9 @@ export function transformMember(
|
||||
cachedAt: Date.now(),
|
||||
avatar: payload.avatar ? bot.utils.iconHashToBigInt(payload.avatar) : undefined,
|
||||
permissions: payload.permissions ? bot.transformers.snowflake(payload.permissions) : undefined,
|
||||
communicationDisabledUntil: payload.communication_disabled_until,
|
||||
communicationDisabledUntil: payload.communication_disabled_until
|
||||
? Date.parse(payload.communication_disabled_until)
|
||||
: null,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -87,6 +89,6 @@ export interface DiscordenoMember {
|
||||
avatar?: bigint;
|
||||
/** The permissions this member has in the guild. Only present on interaction events. */
|
||||
permissions?: bigint;
|
||||
/** when the user's timeout will expire and the user will be able to communicate in the guild again (up to 28 days in the future), set to null to remove timeout. Requires the `MODERATE_MEMBERS` permission */
|
||||
communicationDisabledUntil?: number;
|
||||
/** when the user's timeout 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 | null;
|
||||
}
|
||||
|
||||
@@ -22,8 +22,8 @@ export interface GuildMember {
|
||||
pending?: boolean;
|
||||
/** The permissions this member has in the guild. Only present on interaction events. */
|
||||
permissions?: string;
|
||||
/** 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?: string;
|
||||
/** when the user's timeout 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?: string | null;
|
||||
}
|
||||
|
||||
// We use these types much since user always exists unless its a `CREATE_MESSAGE` or `MESSAGE_UPDATE` event
|
||||
|
||||
Reference in New Issue
Block a user