15 |
try { |
try { |
16 |
await History.create(user.id, user.guild!, 'unmute', d.id, null); |
await History.create(user.id, user.guild!, 'unmute', d.id, null); |
17 |
|
|
18 |
const role = await user.guild!.roles.fetch(client.config.get('mute_role')); |
const role = await user.guild!.roles.fetch(client.config.props[user.guild.id].mute_role); |
19 |
await user.roles.remove(role!); |
await user.roles.remove(role!); |
20 |
|
|
21 |
const { default: Punishment } = await import('../../models/Punishment'); |
const { default: Punishment } = await import('../../models/Punishment'); |
30 |
const json = JSON.parse(timeout.row.params); |
const json = JSON.parse(timeout.row.params); |
31 |
|
|
32 |
if (json) { |
if (json) { |
33 |
if (json[1] === user.id) { |
if (json[1] === user.id && timeout.row.filePath.endsWith('unmute-job')) { |
34 |
await clearTimeoutv2(timeout); |
await clearTimeoutv2(timeout); |
35 |
} |
} |
36 |
} |
} |