Prefixes are now kaboom

But uh, that made a huge mess.
This commit is contained in:
Sophie Marie 2022-10-24 16:03:06 -05:00
parent f3e2fd893d
commit 1da0d738ec
26 changed files with 1 additions and 107 deletions

View File

@ -11,10 +11,6 @@ module.exports = {
type: Constants.ApplicationCommandOptionTypes.STRING
}],
async parseMessage (client, config, message, args) {
await message.channel.send(this.handle(client, config, message.author, args.slice(0).join(' ')));
},
async parseInteraction (client, config, interaction) {
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getString('question')));
},

View File

@ -17,11 +17,6 @@ module.exports = {
type: Constants.ApplicationCommandOptionTypes.STRING
}],
async parseMessage (client, config, message, args) {
const target = message.mentions.users.first() || client.users.cache.get(args[0]) || message.author;
await message.channel.send(this.handle(client, config, message.author, target));
},
async parseInteraction (client, config, interaction) {
const target = interaction.options.getUser('user') || client.users.cache.get(interaction.options.getString('userid')) || interaction.user;
await interaction.reply(this.handle(client, config, interaction.user, target));

View File

@ -11,10 +11,6 @@ module.exports = {
type: Constants.ApplicationCommandOptionTypes.USER
}],
async parseMessage (client, config, message) {
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
},
async parseInteraction (client, config, interaction) {
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
},

View File

@ -11,10 +11,6 @@ module.exports = {
type: Constants.ApplicationCommandOptionTypes.USER
}],
async parseMessage (client, config, message) {
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
},
async parseInteraction (client, config, interaction) {
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
},

View File

@ -11,13 +11,6 @@ module.exports = {
type: Constants.ApplicationCommandOptionTypes.STRING
})),
async parseMessage (client, config, message, args) {
let [head, ...options] = message.content.split(/\s*\n\s*/);
head = head.slice(this.name.length + config.prefix.length);
if (head) options.push(head);
await message.channel.send(this.handle(client, config, message.author, options));
},
async parseInteraction (client, config, interaction) {
console.log([...Array(10).keys()].map(i => interaction.options.getString(`option${i + 1}`)).filter(str => str));
await interaction.reply(this.handle(client, config, interaction.user, [...Array(10).keys()].map(i => interaction.options.getString(`option${i + 1}`)).filter(str => str)));

View File

@ -4,10 +4,6 @@ module.exports = {
description: 'Attributions to open source components used by Anitrox',
options: [],
async parseMessage (_, config, message) {
await message.channel.send(this.handle(config, message.author));
},
async parseInteraction (_, config, interaction) {
await interaction.reply(this.handle(config, interaction.user));
},

View File

@ -18,10 +18,6 @@ module.exports = {
type: Constants.ApplicationCommandOptionTypes.USER
}],
async parseMessage (client, config, message) {
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
},
async parseInteraction (client, config, interaction) {
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
},

View File

@ -12,10 +12,6 @@ module.exports = {
type: Constants.ApplicationCommandOptionTypes.STRING
}],
async parseMessage (client, config, message, args) {
await message.channel.send(this.handle(client, config, message.author, args.join(' ')));
},
async parseInteraction (client, config, interaction) {
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getString('code')));
},

View File

@ -10,9 +10,6 @@ module.exports = {
required: false,
type: Constants.ApplicationCommandOptionTypes.STRING
}],
async parseMessage (client, config, message, args) {
await message.channel.send(this.handle(client, config, message.author, args[0]));
},
async parseInteraction (client, config, interaction) {
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getString('help')));

View File

@ -19,10 +19,6 @@ module.exports = {
type: Constants.ApplicationCommandOptionTypes.USER
}],
async parseMessage (client, config, message) {
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
},
async parseInteraction (client, config, interaction) {
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
},

View File

@ -6,11 +6,6 @@ module.exports = {
description: 'Bot and System information',
options: [],
async parseMessage (client, config, message) {
await message.channel.send(this.handle(client, config, message.author));
},
// We'll be moving solely to Slash Commands in 1.4
async parseInteraction (client, config, interaction) {
await interaction.reply(this.handle(client, config, interaction.user));
},

View File

@ -4,10 +4,6 @@ module.exports = {
description: 'Add Anitrox to your beautiful server!',
options: [],
async parseMessage (client, config, message) {
await message.channel.send(this.handle(client, config, message.author));
},
async parseInteraction (client, config, interaction) {
await interaction.reply(this.handle(client, config, interaction.user));
},

View File

@ -19,10 +19,6 @@ module.exports = {
type: Constants.ApplicationCommandOptionTypes.USER
}],
async parseMessage (client, config, message) {
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
},
async parseInteraction (client, config, interaction) {
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
},

View File

@ -29,10 +29,6 @@ module.exports = {
type: Constants.ApplicationCommandOptionTypes.USER
}],
async parseMessage (client, config, message) {
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
},
async parseInteraction (client, config, interaction) {
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
},

View File

@ -18,10 +18,6 @@ module.exports = {
type: Constants.ApplicationCommandOptionTypes.USER
}],
async parseMessage (client, config, message) {
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
},
async parseInteraction (client, config, interaction) {
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
},

View File

@ -18,10 +18,6 @@ module.exports = {
type: Constants.ApplicationCommandOptionTypes.USER
}],
async parseMessage (client, config, message) {
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
},
async parseInteraction (client, config, interaction) {
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
},

View File

@ -17,10 +17,6 @@ module.exports = {
type: Constants.ApplicationCommandOptionTypes.USER
}],
async parseMessage (client, config, message) {
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
},
async parseInteraction (client, config, interaction) {
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
},

View File

@ -4,10 +4,6 @@ module.exports = {
description: 'Gets bot ping',
options: [],
async parseMessage (client, config, message, args) {
await message.channel.send(await this.handle(client, config, message.author));
},
async parseInteraction (client, config, interaction) {
await interaction.reply(await this.handle(client, config, interaction.user));
},

View File

@ -17,10 +17,6 @@ module.exports = {
type: Constants.ApplicationCommandOptionTypes.USER
}],
async parseMessage (client, config, message) {
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
},
async parseInteraction (client, config, interaction) {
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
},

View File

@ -11,10 +11,6 @@ module.exports = {
type: Constants.ApplicationCommandOptionTypes.STRING
})),
async parseMessage (client, config, message, args) {
await message.channel.send(this.handle(client, config, message.author, args));
},
async parseInteraction (client, config, interaction) {
await interaction.reply(this.handle(client, config, interaction.user, [...Array(10).keys()].map(i => interaction.options.getString(`option${i + 1}`)).filter(str => str)));
},

View File

@ -4,10 +4,6 @@ module.exports = {
description: 'Restarts the bot',
options: [],
async parseMessage (client, config, message) {
await this.handle(client, config, message.author, message.channel);
},
async parseInteraction (client, config, interaction) {
await this.handle(client, config, interaction.user, interaction.channel);
},

View File

@ -11,10 +11,6 @@ module.exports = {
type: Constants.ApplicationCommandOptionTypes.USER
}],
async parseMessage (client, config, message) {
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
},
async parseInteraction (client, config, interaction) {
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
},

View File

@ -17,10 +17,6 @@ module.exports = {
type: Constants.ApplicationCommandOptionTypes.USER
}],
async parseMessage (client, config, message) {
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
},
async parseInteraction (client, config, interaction) {
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
},

View File

@ -4,10 +4,6 @@ module.exports = {
description: "IT'S TIME TO STOP!... the bot",
options: [],
async parseMessage (client, config, message) {
await this.handle(client, config, message.author, message.channel);
},
async parseInteraction (client, config, interaction) {
await this.handle(client, config, interaction.user, interaction.channel);
},

View File

@ -11,11 +11,6 @@ module.exports = {
type: Constants.ApplicationCommandOptionTypes.USER
}],
async parseMessage (client, config, message) {
const target = message.mentions.members.first() || message.member;
await message.channel.send(this.handle(client, config, message.author, target));
},
async parseInteraction (client, config, interaction) {
const target = interaction.options.getUser('user') ? (await interaction.guild.members.fetch(interaction.options.getUser('user'))) : interaction.member;
await interaction.reply(this.handle(client, config, interaction.user, target));

View File

@ -1,7 +1,6 @@
{
"prefix": "n!",
"release": "Developer Release",
"build": "1.4_dev",
"build": "1.4dev",
"footerTxt": "Anitrox, made with <3 by IDeletedSystem64 | 2018-2022",
"sandbox": {
"enabled": false,