fix(arabot): broken tempban schedule creation

This commit is contained in:
Anthony Berg 2024-01-06 02:29:51 +00:00
parent d00fddd51a
commit b6b50ea450

View File

@ -258,14 +258,16 @@ export class TempBanCommand extends Command {
await addTempBan(userId, modId, time.fromNow, reason); await addTempBan(userId, modId, time.fromNow, reason);
// Create scheduled task to unban // Create scheduled task to unban
this.container.tasks.create({ await this.container.tasks.create(
{
name: 'tempBan', name: 'tempBan',
payload: { payload: {
userId: user.id, userId: user.id,
guildId: guild.id, guildId: guild.id,
}, },
delay: time.offset, },
}); time.offset,
);
info.message = `${user} has been temporarily banned for ${banLength}.`; info.message = `${user} has been temporarily banned for ${banLength}.`;
info.success = true; info.success = true;