denyed
denyed
SIASapphire - Imagine a framework
Created by denyed on 12/13/2022 in #sapphire-support
Listeners with same file name
Is it possible to have 2 listeners with the same file name being from 2 separate emitters?
4 replies
SIASapphire - Imagine a framework
Created by denyed on 12/8/2022 in #sapphire-support
Error when loading listener on v14
Although I know that v14 support is still experimental, I decided to give it a go and see if I could get it to work with a basic client and listener. When trying to start the bot, it gives me the following error
Error when loading 'C:\Users\medup\Documents\Blight\dist\listeners\client\ready.js': TypeError: Cannot read properties of undefined (reading 'SELECT_MENU')
at Object.<anonymous> (C:\Users\medup\Documents\Blight\node_modules\@sapphire\discord.js-utilities\dist\index.js:894:54)
at Module._compile (node:internal/modules/cjs/loader:1205:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1259:10)
at Module.load (node:internal/modules/cjs/loader:1068:32)
at Module._load (node:internal/modules/cjs/loader:909:12)
at Module.require (node:internal/modules/cjs/loader:1092:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (C:\Users\medup\Documents\Blight\node_modules\@sapphire\decorators\dist\index.js:99:22)
at Module._compile (node:internal/modules/cjs/loader:1205:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1259:10)
Error when loading 'C:\Users\medup\Documents\Blight\dist\listeners\client\ready.js': TypeError: Cannot read properties of undefined (reading 'SELECT_MENU')
at Object.<anonymous> (C:\Users\medup\Documents\Blight\node_modules\@sapphire\discord.js-utilities\dist\index.js:894:54)
at Module._compile (node:internal/modules/cjs/loader:1205:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1259:10)
at Module.load (node:internal/modules/cjs/loader:1068:32)
at Module._load (node:internal/modules/cjs/loader:909:12)
at Module.require (node:internal/modules/cjs/loader:1092:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (C:\Users\medup\Documents\Blight\node_modules\@sapphire\decorators\dist\index.js:99:22)
at Module._compile (node:internal/modules/cjs/loader:1205:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1259:10)
This is my ready.ts file
import { ApplyOptions } from '@sapphire/decorators';
import { Listener } from '@sapphire/framework';

@ApplyOptions<Listener.Options>({
once: true
})
export default class extends Listener {
public run() {
this.container.logger.info(`[Blight] Successfully logged into Discord`);
}
}
import { ApplyOptions } from '@sapphire/decorators';
import { Listener } from '@sapphire/framework';

@ApplyOptions<Listener.Options>({
once: true
})
export default class extends Listener {
public run() {
this.container.logger.info(`[Blight] Successfully logged into Discord`);
}
}
8 replies