diff --git a/src/server/components/Registry.js b/src/server/components/Registry.js index da182a1..0ef0634 100644 --- a/src/server/components/Registry.js +++ b/src/server/components/Registry.js @@ -1,6 +1,7 @@ const path = require('node:path'); const fs = require('node:fs'); +const {Endpoint: BaseEndpoint} = require('../interfaces') const { Util } = require('../../util'); const { Collection } = require('@discordjs/collection'); @@ -50,6 +51,7 @@ class Registry { continue; } const endpoint = new Endpoint(server); + if(!(endpoint instanceof BaseEndpoint)) throw new Error(`Attempt to load invalid endpoint at ${file.name}`) endpoint.init(); if (endpoints.has(endpoint.resolveable)) throw new Error(`Error registering endpoint ${endpoint.resolveable}: an endpoint with that resolveable already exists`);