fix: edit member transforms for discord

This commit is contained in:
Skillz4Killz
2022-02-13 14:48:51 +00:00
committed by GitHub
parent 3c272e8c8b
commit 7914ef1d11

View File

@@ -10,11 +10,13 @@ export async function editMember(bot: Bot, guildId: bigint, memberId: bigint, op
bot.constants.endpoints.GUILD_MEMBER(guildId, memberId),
{
nick: options.nick,
roles: options.roles,
roles: options.roles?.map((id) => id.toString()),
mute: options.mute,
deaf: options.deaf,
channel_id: options.channelId,
communication_disabled_until: options.communicationDisabledUntil,
channel_id: options.channelId?.toString(),
communication_disabled_until: options.communicationDisabledUntil
? new Date(options.communicationDisabledUntil).toISOString()
: undefined,
},
);