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
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`); }}
Solution
We don't really actively support the PR like this. You're on your own and we appreciate any PRs of fixes.
That said, you also need the PR version of @sapphire/discord.js-utilities