mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-11 13:56:15 +00:00
fix(bot-discord): fix mute duration
This commit is contained in:
@@ -54,7 +54,7 @@ export default {
|
||||
|
||||
reportToLogs(config, interaction.client, 'muted', null, {
|
||||
reason,
|
||||
actionTo: await client.users.fetch(interaction.options.getString('user')),
|
||||
actionTo: await member.client.users.fetch(interaction.options.getString('user')),
|
||||
actionBy: interaction.member,
|
||||
channel: interaction.channel,
|
||||
expire: parsedDuration
|
||||
|
||||
@@ -7,10 +7,10 @@ export default async function muteMember(config, member, { duration, reason, sup
|
||||
let expires;
|
||||
|
||||
if (supportMute) {
|
||||
expires = Date.now() + duration;
|
||||
expires = Math.floor((Date.now() + duration) / 1000);
|
||||
} else {
|
||||
const parsedDuration = parse(duration);
|
||||
expires = Date.now() + parsedDuration;
|
||||
expires = Math.floor((Date.now() + parsedDuration) / 1000);
|
||||
}
|
||||
|
||||
const takenRoles = [];
|
||||
@@ -47,7 +47,7 @@ export default async function muteMember(config, member, { duration, reason, sup
|
||||
client.mutes.delete(member.id);
|
||||
}
|
||||
} else {
|
||||
await member.client.db.collection('muted').insert({
|
||||
await member.client.db.collection('muted').insertOne({
|
||||
guild_id: member.guild.id,
|
||||
user_id: member.id,
|
||||
taken_roles: takenRoles,
|
||||
|
||||
Reference in New Issue
Block a user