Currently updating my bot code to the new version of djs and sapphire.
i struggle to find the correct type that has this piece.nameproperty, any idea? I checked skyra but their implementation looks more complicated than what I want to achieve.
import type { Events, TaskErrorPayload } from '#lib/types';
import { Listener } from '@sapphire/framework';
export class ScheduledTaskErrorListener extends Listener<**Events.TaskError**> {
public run(error: Error, context: **TaskErrorPayload**) {
this.container.logger.fatal(`[TASK] ${context.piece.name}\n${error.stack || error.message}`);
}
}