This code is not running on sapphire

const { Listener } = require("@sapphire/framework");
const { ActivityType } = require("discord.js");
const ms = require("ms");

class ReadyListener extends Listener {
  run(client) {
    console.log(`${client.user.tag} is online!`);

    let statuses = [
      { name: `status name 1`, type: ActivityType.Watching },
      { name: `status name 2`, type: ActivityType.Listening },

    let currentStatus = 0;

    setInterval(() => {
        activities: [statuses[currentStatus]],

      currentStatus = (currentStatus + 1) % statuses.length;
    }, ms("13"));

module.exports = {
AOAnswer Overflow2/19/2023
I don't think the pieces loader really loads properties from module.exports, only exports.* and module.exports
Try module.exports = ReadyListener; or exports.ReadyListener = ReadyListener;
Alternatively, if you can make the switch to ESM, you'll be able to do export class ReadyListener ..., which may look less boilerplate-y
figured it out, to anyone else that has this problem just add async before the run and also add this code before the async run(client) {} part

  constructor(context, options) {
    super(context, {
      once: true,

there was also missing s in ms() (below currentStatus = (currentStatus + 1) % statuses.length;)
AOAnswer Overflow2/20/2023
async doesnt matter if the function doesnt await anything. You should learn what async actually does before you add it to any place willy nilly.

Adding the constructor is purely optional, though you would want to run the ready listener only once so it's a good addition nonetheless.

the syntax error however is an issue because when JS encounters a syntax error it will simply not execute the code
we do support this export syntax.