spacecommands 3.0.4 → 3.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const events_1 = require("events");
|
|
7
7
|
const FeatureHandler_1 = __importDefault(require("./FeatureHandler"));
|
|
8
|
-
const supabase_1 =
|
|
8
|
+
const supabase_1 = require("./supabase");
|
|
9
9
|
const prefixes_1 = __importDefault(require("./models/prefixes"));
|
|
10
10
|
const message_handler_1 = __importDefault(require("./message-handler"));
|
|
11
11
|
const SlashCommands_1 = __importDefault(require("./SlashCommands"));
|
|
@@ -59,7 +59,8 @@ class SpaceCommands extends events_1.EventEmitter {
|
|
|
59
59
|
let { commandsDir = '', commandDir = '', featuresDir = '', featureDir = '', componentsDir, modalsDir, contextMenusDir, messagesPath, supabaseUrl, supabaseKey, showWarns = true, delErrMsgCooldown = -1, defaultLanguage = 'english', ignoreBots = true, dbOptions, testServers, botOwners, disabledDefaultCommands = [], typeScript = false, ephemeral = true, debug = false, } = options || {};
|
|
60
60
|
// Support for Supabase (recommended) or MongoDB (deprecated)
|
|
61
61
|
if (supabaseUrl && supabaseKey) {
|
|
62
|
-
|
|
62
|
+
(0, supabase_1.initSupabase)(supabaseUrl, supabaseKey);
|
|
63
|
+
this._supabaseClient = (0, supabase_1.getSupabaseClient)();
|
|
63
64
|
// Load prefixes from Supabase
|
|
64
65
|
const results = await prefixes_1.default.find({});
|
|
65
66
|
for (const result of results) {
|