Which type to use for context in scheduled task plugin error listener?
Currently updating my bot code to the new version of djs and sapphire.
i struggle to find the correct type that has this
piece.name
property, any idea? I checked skyra but their implementation looks more complicated than what I want to achieve.
Solution:Jump to solution
Assuming you do then look at https://github.com/favware/dragonite/blob/main/src/listeners/scheduled-tasks/scheduledTaskError.ts
GitHub
dragonite/src/listeners/scheduled-tasks/scheduledTaskError.ts at ma...
A Pokémon information Discord bot built around Discord Interactions - favware/dragonite
4 Replies
Skyra doesn't use the scheduled tasks plugin at all
Solution
Assuming you do then look at https://github.com/favware/dragonite/blob/main/src/listeners/scheduled-tasks/scheduledTaskError.ts
GitHub
dragonite/src/listeners/scheduled-tasks/scheduledTaskError.ts at ma...
A Pokémon information Discord bot built around Discord Interactions - favware/dragonite
Or if you have your own impl of scheduled tasks then it's on you to set the context properly wherever you throw the error.
awesome, thats what I was looking for