random stuff
This commit is contained in:
parent
796427fce8
commit
78247a07e3
27
options.json
27
options.json
@ -1,7 +1,10 @@
|
||||
{
|
||||
"discord": {
|
||||
"prefix": "]",
|
||||
"developers": ["132620781791346688", "132777808362471424"],
|
||||
"developers": [
|
||||
"132620781791346688",
|
||||
"132777808362471424"
|
||||
],
|
||||
"clientOptions": {
|
||||
"intents": [
|
||||
"GUILDS",
|
||||
@ -35,5 +38,27 @@
|
||||
"mariadb": {
|
||||
"tables": []
|
||||
}
|
||||
},
|
||||
"api": {
|
||||
"http": {
|
||||
"port": 5000
|
||||
},
|
||||
"domain": "galactic.corgi.wtf",
|
||||
"authCallback": "/api/auth/login",
|
||||
"dashboardUrl": "/dashboard",
|
||||
"discord": {
|
||||
"scope": [
|
||||
"identify",
|
||||
"guilds"
|
||||
],
|
||||
"token": ""
|
||||
},
|
||||
"logger": {
|
||||
"webhook": {
|
||||
"disabled": false
|
||||
}
|
||||
},
|
||||
"shardCount": 1,
|
||||
"debug": true
|
||||
}
|
||||
}
|
@ -1,4 +1,6 @@
|
||||
/* eslint-disable max-len */
|
||||
const chalk = require('chalk');
|
||||
const { inspect } = require('util');
|
||||
|
||||
const Constants = {
|
||||
ComponentTypes: {
|
||||
@ -56,6 +58,7 @@ class Logger {
|
||||
}
|
||||
|
||||
async transport(message = 'N/A', opts = {}) {
|
||||
if (typeof message !== 'string') message = inspect(message);
|
||||
return this.client.intercom.send('logger', { message, ...opts });
|
||||
}
|
||||
|
||||
|
@ -46,19 +46,20 @@ class CommandHandler extends Observer {
|
||||
|
||||
const command = this._matchCommand(interaction.commandName);
|
||||
|
||||
let guildWrapper = null;
|
||||
if(interaction.guild) guildWrapper = new GuildWrapper(this.client, interaction.guild);
|
||||
const wrapper = new InteractionWrapper(this.client, command, interaction, guildWrapper);
|
||||
// let guildWrapper = null;
|
||||
// if(interaction.guild) guildWrapper = new GuildWrapper(this.client, interaction.guild);
|
||||
// const wrapper = new InteractionWrapper(this.client, interaction, guildWrapper);
|
||||
interaction.command = command;
|
||||
|
||||
if (!command) return wrapper.reply({
|
||||
content: wrapper.format('O_COMMANDHANDLER_COMMANDNOTSYNCED'),
|
||||
if (!command) return interaction.reply({
|
||||
content: interaction.format('O_COMMANDHANDLER_COMMANDNOTSYNCED'),
|
||||
emoji: 'failure', ephemeral: true
|
||||
});
|
||||
|
||||
const response = await this._parseInteraction(wrapper);
|
||||
const response = await this._parseInteraction(interaction);
|
||||
if(response.error) {
|
||||
return wrapper.reply({
|
||||
content: wrapper.format(`O_COMMANDHANDLER_TYPE${response.option.type}`, {
|
||||
return interaction.reply({
|
||||
content: interaction.format(`O_COMMANDHANDLER_TYPE${response.option.type}`, {
|
||||
option: response.option.name, min: response.option.minimum, max: response.option.maximum
|
||||
}),
|
||||
emoji: 'failure',
|
||||
@ -66,7 +67,8 @@ class CommandHandler extends Observer {
|
||||
});
|
||||
}
|
||||
|
||||
await this._executeCommand(wrapper, response.options);
|
||||
this.client.logger.info(`${interaction.user.tag} (${interaction.user.id}) is executing ${command.name}`);
|
||||
await this._executeCommand(interaction, response.options);
|
||||
|
||||
}
|
||||
|
||||
|
@ -64,6 +64,7 @@ class Setting extends Component {
|
||||
this.emoji = options.emoji || {};
|
||||
|
||||
this.default = { [this.name]: options.default || {} };
|
||||
this.definitions = options.definitions || {}; // Used for the API for field definitions
|
||||
|
||||
this.commandOptions = options.commandOptions || [];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user