mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 14:00:22 +02:00
Git pls
This commit is contained in:
@@ -88,7 +88,7 @@ class SequelizeProvider extends SettingProvider {
|
|||||||
this.setupGuild(guild, settings);
|
this.setupGuild(guild, settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Listen for changes
|
// Listen for changes
|
||||||
this.listeners
|
this.listeners
|
||||||
.set('commandPrefixChange', (guild, prefix) => this.set(guild, 'prefix', prefix))
|
.set('commandPrefixChange', (guild, prefix) => this.set(guild, 'prefix', prefix))
|
||||||
.set('commandStatusChange', (guild, command, enabled) => this.set(guild, `cmd-${command.name}`, enabled))
|
.set('commandStatusChange', (guild, command, enabled) => this.set(guild, `cmd-${command.name}`, enabled))
|
||||||
@@ -114,7 +114,7 @@ class SequelizeProvider extends SettingProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
destroy() {
|
destroy() {
|
||||||
// Remove all listeners from the client
|
// Remove all listeners from the client
|
||||||
for (const [event, listener] of this.listeners) this.client.removeListener(event, listener);
|
for (const [event, listener] of this.listeners) this.client.removeListener(event, listener);
|
||||||
this.listeners.clear();
|
this.listeners.clear();
|
||||||
}
|
}
|
||||||
@@ -173,7 +173,7 @@ class SequelizeProvider extends SettingProvider {
|
|||||||
if (typeof guild !== 'string') throw new TypeError('The guild must be a guild ID or "global".');
|
if (typeof guild !== 'string') throw new TypeError('The guild must be a guild ID or "global".');
|
||||||
guild = this.client.guilds.get(guild) || null;
|
guild = this.client.guilds.get(guild) || null;
|
||||||
|
|
||||||
// Load the command prefix
|
// Load the command prefix
|
||||||
if (typeof settings.prefix !== 'undefined') {
|
if (typeof settings.prefix !== 'undefined') {
|
||||||
if (guild) guild._commandPrefix = settings.prefix;
|
if (guild) guild._commandPrefix = settings.prefix;
|
||||||
else this.client._commandPrefix = settings.prefix;
|
else this.client._commandPrefix = settings.prefix;
|
||||||
@@ -229,10 +229,10 @@ class SequelizeProvider extends SettingProvider {
|
|||||||
key = JSON.stringify(key);
|
key = JSON.stringify(key);
|
||||||
val = typeof val !== 'undefined' ? JSON.stringify(val) : 'undefined';
|
val = typeof val !== 'undefined' ? JSON.stringify(val) : 'undefined';
|
||||||
this.client.shard.broadcastEval(`
|
this.client.shard.broadcastEval(`
|
||||||
if(this.shard.id !== ${this.client.shard.id} && this.provider && this.provider.settings) {
|
if(this.shard.id !== ${this.client.shard.id} && this.provider && this.provider.settings) {
|
||||||
this.provider.settings.global[${key}] = ${val};
|
this.provider.settings.global[${key}] = ${val};
|
||||||
}
|
}
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user