Merge pull request #77 from IDeletedSystem64/mergeconflict
Pull dev changes into v14
This commit is contained in:
commit
cb621c21ec
|
@ -11,6 +11,10 @@ module.exports = {
|
||||||
type: ApplicationCommandOptionType.String
|
type: ApplicationCommandOptionType.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) {
|
async parseInteraction (client, config, interaction) {
|
||||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getString('question')));
|
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getString('question')));
|
||||||
},
|
},
|
||||||
|
|
|
@ -17,6 +17,11 @@ module.exports = {
|
||||||
type: ApplicationCommandOptionType.User
|
type: ApplicationCommandOptionType.User
|
||||||
}],
|
}],
|
||||||
|
|
||||||
|
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) {
|
async parseInteraction (client, config, interaction) {
|
||||||
const target = interaction.options.getUser('user') || client.users.cache.get(interaction.options.getString('userid')) || interaction.user;
|
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));
|
await interaction.reply(this.handle(client, config, interaction.user, target));
|
||||||
|
@ -25,15 +30,12 @@ module.exports = {
|
||||||
handle (_, config, user, target) {
|
handle (_, config, user, target) {
|
||||||
return {
|
return {
|
||||||
embeds: [{
|
embeds: [{
|
||||||
title: `:frame_photo: ${target.username}'s Beautiful Avatar!`,
|
title: `:frame_photo: ${target.username}'s Beautiful Profile Picture!`,
|
||||||
|
description: `[Profile picture link (Mobile users, tap here!)](${target.displayAvatarURL({ dynamic: true })})`,
|
||||||
color: 9442302,
|
color: 9442302,
|
||||||
footer: {
|
image: { url: target.displayAvatarURL({ dynamic: true }) },
|
||||||
icon_url: user.displayAvatarURL(),
|
footer: { icon_url: user.displayAvatarURL(), text: config.footerTxt }
|
||||||
text: config.footerTxt
|
|
||||||
},
|
|
||||||
image: {
|
|
||||||
url: target.displayAvatarURL()
|
|
||||||
}
|
|
||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,10 @@ module.exports = {
|
||||||
type: ApplicationCommandOptionType.User
|
type: ApplicationCommandOptionType.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) {
|
async parseInteraction (client, config, interaction) {
|
||||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||||
},
|
},
|
||||||
|
|
|
@ -11,6 +11,10 @@ module.exports = {
|
||||||
type: ApplicationCommandOptionType.User
|
type: ApplicationCommandOptionType.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) {
|
async parseInteraction (client, config, interaction) {
|
||||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||||
},
|
},
|
||||||
|
|
|
@ -11,6 +11,13 @@ module.exports = {
|
||||||
type: ApplicationCommandOptionType.String
|
type: ApplicationCommandOptionType.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) {
|
async parseInteraction (client, config, interaction) {
|
||||||
console.log([...Array(10).keys()].map(i => interaction.options.getString(`option${i + 1}`)).filter(str => str));
|
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)));
|
await interaction.reply(this.handle(client, config, interaction.user, [...Array(10).keys()].map(i => interaction.options.getString(`option${i + 1}`)).filter(str => str)));
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
||||||
name: require('path').parse(__filename).name,
|
name: require('path').parse(__filename).name,
|
||||||
description: 'Attributions to open source components used by Anitrox',
|
description: 'Attributions to users who have worked on Anitrox!',
|
||||||
options: [],
|
options: [],
|
||||||
|
|
||||||
|
async parseMessage (_, config, message) {
|
||||||
|
await message.channel.send(this.handle(config, message.author));
|
||||||
|
},
|
||||||
|
|
||||||
async parseInteraction (_, config, interaction) {
|
async parseInteraction (_, config, interaction) {
|
||||||
await interaction.reply(this.handle(config, interaction.user));
|
await interaction.reply(this.handle(config, interaction.user));
|
||||||
},
|
},
|
||||||
|
@ -24,11 +28,11 @@ module.exports = {
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: 'chuu_shi',
|
name: 'chuu_shi',
|
||||||
value: 'Thanks to Chuu for letting me use some of his resources to host Anitrox!\n <:GitHub:778165439477841981> [Check out his code!](https://github.com/chuushi)'
|
value: 'Thanks to Chuu for letting me use some of his resources to host Anitrox!\n <:GitHub:778165439477841981> [Check out his code!](https://github.com/chuushi)\n <:discord:1057053513210937444> [Check out his Discord community!](https://port.chuu.sh/)'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'OfficialTCGMatt',
|
name: 'TheCodingGuy',
|
||||||
value: "Matt has helped quite a bit with Anitrox, especially in the early days of Anitrox's development! He even has his own bot!\n <:GitHub:778165439477841981> [Check out his code!](https://github.com/OfficialTCGMatt)\n :robot: [Check out TheCodingBot!](https://github.com/TMC-Software/TheCodingBot)"
|
value: "Matt has helped quite a bit with Anitrox, especially in the early days of Anitrox's development! He even has his own bot!\n <:GitHub:778165439477841981> [Check out his code!](https://github.com/Aisuruneko)\n :robot: [Check out TheCodingBot!](https://github.com/NetroCorp/TheCodingBot)\n :globe_with_meridians: [Check out Netro Corp!](https://netrocorp.net)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Foxinatel',
|
name: 'Foxinatel',
|
||||||
|
|
|
@ -18,6 +18,10 @@ module.exports = {
|
||||||
type: ApplicationCommandOptionType.User
|
type: ApplicationCommandOptionType.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) {
|
async parseInteraction (client, config, interaction) {
|
||||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||||
},
|
},
|
||||||
|
|
|
@ -12,6 +12,10 @@ module.exports = {
|
||||||
type: ApplicationCommandOptionType.String
|
type: ApplicationCommandOptionType.String
|
||||||
}],
|
}],
|
||||||
|
|
||||||
|
async parseMessage (client, config, message, args) {
|
||||||
|
await message.channel.send(this.handle(client, config, message.author, args.join(' ')));
|
||||||
|
},
|
||||||
|
|
||||||
async parseInteraction (client, config, interaction) {
|
async parseInteraction (client, config, interaction) {
|
||||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getString('code')));
|
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getString('code')));
|
||||||
},
|
},
|
||||||
|
|
|
@ -10,6 +10,9 @@ module.exports = {
|
||||||
required: false,
|
required: false,
|
||||||
type: ApplicationCommandOptionType.String
|
type: ApplicationCommandOptionType.String
|
||||||
}],
|
}],
|
||||||
|
async parseMessage (client, config, message, args) {
|
||||||
|
await message.channel.send(this.handle(client, config, message.author, args[0]));
|
||||||
|
},
|
||||||
|
|
||||||
async parseInteraction (client, config, interaction) {
|
async parseInteraction (client, config, interaction) {
|
||||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getString('help')));
|
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getString('help')));
|
||||||
|
|
|
@ -19,6 +19,10 @@ module.exports = {
|
||||||
type: ApplicationCommandOptionType.String
|
type: ApplicationCommandOptionType.String
|
||||||
}],
|
}],
|
||||||
|
|
||||||
|
async parseMessage (client, config, message) {
|
||||||
|
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
|
||||||
|
},
|
||||||
|
|
||||||
async parseInteraction (client, config, interaction) {
|
async parseInteraction (client, config, interaction) {
|
||||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,6 +6,11 @@ module.exports = {
|
||||||
description: 'Bot and System information',
|
description: 'Bot and System information',
|
||||||
options: [],
|
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) {
|
async parseInteraction (client, config, interaction) {
|
||||||
await interaction.reply(this.handle(client, config, interaction.user));
|
await interaction.reply(this.handle(client, config, interaction.user));
|
||||||
},
|
},
|
||||||
|
@ -26,7 +31,7 @@ module.exports = {
|
||||||
fields: [
|
fields: [
|
||||||
{ name: '<:anitrox:831193012699791361> Bot Information', value: '** **' },
|
{ name: '<:anitrox:831193012699791361> Bot Information', value: '** **' },
|
||||||
{ name: 'Bot Name', value: `${client.user.tag}`, inline: true },
|
{ name: 'Bot Name', value: `${client.user.tag}`, inline: true },
|
||||||
{ name: 'Bot ID', value: '``' + `${client.user.id}` + '``', inline: true },
|
{ name: 'Bot ID', value: `${client.user.id}`, inline: true },
|
||||||
{ name: 'Bot Owner', value: isNaN(process.env.OWNERID) ? "Owner didn't set an OwnerID :(" : client.users.cache.get(process.env.OWNERID).username, inline: true },
|
{ name: 'Bot Owner', value: isNaN(process.env.OWNERID) ? "Owner didn't set an OwnerID :(" : client.users.cache.get(process.env.OWNERID).username, inline: true },
|
||||||
{ name: 'Release Type', value: config.release, inline: true },
|
{ name: 'Release Type', value: config.release, inline: true },
|
||||||
{ name: 'Version', value: config.build, inline: true },
|
{ name: 'Version', value: config.build, inline: true },
|
||||||
|
|
|
@ -4,6 +4,10 @@ module.exports = {
|
||||||
description: 'Add Anitrox to your beautiful server!',
|
description: 'Add Anitrox to your beautiful server!',
|
||||||
options: [],
|
options: [],
|
||||||
|
|
||||||
|
async parseMessage (client, config, message) {
|
||||||
|
await message.channel.send(this.handle(client, config, message.author));
|
||||||
|
},
|
||||||
|
|
||||||
async parseInteraction (client, config, interaction) {
|
async parseInteraction (client, config, interaction) {
|
||||||
await interaction.reply(this.handle(client, config, interaction.user));
|
await interaction.reply(this.handle(client, config, interaction.user));
|
||||||
},
|
},
|
||||||
|
@ -23,8 +27,8 @@ module.exports = {
|
||||||
},
|
},
|
||||||
fields: [
|
fields: [
|
||||||
{ name: 'Anitrox', value: 'Get the ripe off the vine Anitrox! \n [Add Anitrox to your server](https://discord.com/oauth2/authorize?client_id=576805923964715018&scope=bot&permissions=8)' },
|
{ name: 'Anitrox', value: 'Get the ripe off the vine Anitrox! \n [Add Anitrox to your server](https://discord.com/oauth2/authorize?client_id=576805923964715018&scope=bot&permissions=8)' },
|
||||||
{ name: 'Anitrox PTB (Public Test Build)', value: 'Anitrox PTB was discontinued on November 25th, 2022. \n [Learn More](https://docs.google.com/document/d/1cpmJjBEo-blxvirOtDsIT-Hrq40qVseRHBY7asBT47k/)' },
|
{ name: 'Anitrox PTB (Public Test Build)', value: 'Anitrox PTB is going to be discontinued on November 25th, 2022. [Learn More](https://docs.google.com/document/d/1cpmJjBEo-blxvirOtDsIT-Hrq40qVseRHBY7asBT47k)' },
|
||||||
{ name: 'Anitrox Dev, Self hosting and more!', value: 'Self-host your own Anitrox (including dev!), Contribute, and more! The possibilites are endless.\n[Anitrox Source](https://github.com/IDeletedSystem64/anitrox)' },
|
{ name: 'Anitrox Dev, Self hosting and more!', value: 'Self-host your own Anitrox (including dev!), Contribute, and more! The possibilites are endless. [Anitrox Source](https://github.com/IDeletedSystem64/anitrox)' },
|
||||||
{ name: 'Need help?', value: 'Come join the Anitrox Support Server, for support and much more!\n [Anitrox Support Server](https://discord.gg/grebRGsBZ3)' }
|
{ name: 'Need help?', value: 'Come join the Anitrox Support Server, for support and much more!\n [Anitrox Support Server](https://discord.gg/grebRGsBZ3)' }
|
||||||
]
|
]
|
||||||
}]
|
}]
|
||||||
|
|
|
@ -19,6 +19,10 @@ module.exports = {
|
||||||
type: ApplicationCommandOptionType.User
|
type: ApplicationCommandOptionType.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) {
|
async parseInteraction (client, config, interaction) {
|
||||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||||
},
|
},
|
||||||
|
|
|
@ -29,6 +29,10 @@ module.exports = {
|
||||||
type: ApplicationCommandOptionType.User
|
type: ApplicationCommandOptionType.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) {
|
async parseInteraction (client, config, interaction) {
|
||||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||||
},
|
},
|
||||||
|
|
|
@ -18,6 +18,10 @@ module.exports = {
|
||||||
type: ApplicationCommandOptionType.User
|
type: ApplicationCommandOptionType.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) {
|
async parseInteraction (client, config, interaction) {
|
||||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||||
},
|
},
|
||||||
|
|
|
@ -18,6 +18,10 @@ module.exports = {
|
||||||
type: ApplicationCommandOptionType.User
|
type: ApplicationCommandOptionType.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) {
|
async parseInteraction (client, config, interaction) {
|
||||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||||
},
|
},
|
||||||
|
|
|
@ -17,6 +17,10 @@ module.exports = {
|
||||||
type: ApplicationCommandOptionType.User
|
type: ApplicationCommandOptionType.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) {
|
async parseInteraction (client, config, interaction) {
|
||||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,6 +4,10 @@ module.exports = {
|
||||||
description: 'Gets bot ping',
|
description: 'Gets bot ping',
|
||||||
options: [],
|
options: [],
|
||||||
|
|
||||||
|
async parseMessage (client, config, message, args) {
|
||||||
|
await message.channel.send(await this.handle(client, config, message.author));
|
||||||
|
},
|
||||||
|
|
||||||
async parseInteraction (client, config, interaction) {
|
async parseInteraction (client, config, interaction) {
|
||||||
await interaction.reply(await this.handle(client, config, interaction.user));
|
await interaction.reply(await this.handle(client, config, interaction.user));
|
||||||
},
|
},
|
||||||
|
|
|
@ -17,6 +17,10 @@ module.exports = {
|
||||||
type: ApplicationCommandOptionType.User
|
type: ApplicationCommandOptionType.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) {
|
async parseInteraction (client, config, interaction) {
|
||||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||||
},
|
},
|
||||||
|
|
|
@ -11,6 +11,10 @@ module.exports = {
|
||||||
type: ApplicationCommandOptionType.User
|
type: ApplicationCommandOptionType.User
|
||||||
})),
|
})),
|
||||||
|
|
||||||
|
async parseMessage (client, config, message, args) {
|
||||||
|
await message.channel.send(this.handle(client, config, message.author, args));
|
||||||
|
},
|
||||||
|
|
||||||
async parseInteraction (client, config, interaction) {
|
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)));
|
await interaction.reply(this.handle(client, config, interaction.user, [...Array(10).keys()].map(i => interaction.options.getString(`option${i + 1}`)).filter(str => str)));
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,6 +4,10 @@ module.exports = {
|
||||||
description: 'Restarts the bot',
|
description: 'Restarts the bot',
|
||||||
options: [],
|
options: [],
|
||||||
|
|
||||||
|
async parseMessage (client, config, message) {
|
||||||
|
await this.handle(client, config, message.author, message.channel);
|
||||||
|
},
|
||||||
|
|
||||||
async parseInteraction (client, config, interaction) {
|
async parseInteraction (client, config, interaction) {
|
||||||
await this.handle(client, config, interaction.user, interaction.channel);
|
await this.handle(client, config, interaction.user, interaction.channel);
|
||||||
},
|
},
|
||||||
|
@ -12,7 +16,7 @@ module.exports = {
|
||||||
if (user.id === process.env.OWNERID) {
|
if (user.id === process.env.OWNERID) {
|
||||||
const embeds = [{
|
const embeds = [{
|
||||||
title: '<a:AnitroxWorking:997565411212144730> Restart Bot',
|
title: '<a:AnitroxWorking:997565411212144730> Restart Bot',
|
||||||
description: 'Restarting Anitrox...',
|
description: '<a:AnitroxWorking:997565411212144730> Restarting now, Be back in a minute!',
|
||||||
color: 9442302,
|
color: 9442302,
|
||||||
footer: {
|
footer: {
|
||||||
icon_url: user.displayAvatarURL(),
|
icon_url: user.displayAvatarURL(),
|
||||||
|
|
|
@ -11,6 +11,10 @@ module.exports = {
|
||||||
type: ApplicationCommandOptionType.User
|
type: ApplicationCommandOptionType.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) {
|
async parseInteraction (client, config, interaction) {
|
||||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||||
},
|
},
|
||||||
|
|
|
@ -17,6 +17,10 @@ module.exports = {
|
||||||
type: ApplicationCommandOptionType.User
|
type: ApplicationCommandOptionType.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) {
|
async parseInteraction (client, config, interaction) {
|
||||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,28 +4,32 @@ module.exports = {
|
||||||
description: "IT'S TIME TO STOP!... the bot",
|
description: "IT'S TIME TO STOP!... the bot",
|
||||||
options: [],
|
options: [],
|
||||||
|
|
||||||
async parseInteraction (client, config, interaction) {
|
async parseMessage (client, config, message) {
|
||||||
await this.handle(client, config, interaction);
|
await this.handle(client, config, message.author, message.channel);
|
||||||
},
|
},
|
||||||
|
|
||||||
async handle (client, config, interaction) {
|
async parseInteraction (client, config, interaction) {
|
||||||
if (interaction.user.id === process.env.OWNERID) {
|
await this.handle(client, config, interaction.user, interaction.channel);
|
||||||
console.log('[SYSTEM] [INFO] ' + `The bot is going down for shut down. Shutdown requested by ${interaction.user.username}`);
|
},
|
||||||
await interaction.reply({
|
|
||||||
|
async handle (client, config, user, channel) {
|
||||||
|
if (user.id === process.env.OWNERID) {
|
||||||
|
console.log('[SYSTEM] [INFO] ' + `The bot is going down for shut down. \nShutdown requested by ${user.username}`);
|
||||||
|
await channel.send({
|
||||||
embeds: [{
|
embeds: [{
|
||||||
title: 'Shutdown bot',
|
title: 'Shut down the bot',
|
||||||
description: '<a:AnitroxWorking:997565411212144730> Shutting Down...',
|
description: '<a:AnitroxWorking:997565411212144730> Shutting down now, Until next time!',
|
||||||
color: 9442302,
|
color: 9442302,
|
||||||
footer: {
|
footer: {
|
||||||
icon_url: interaction.user.displayAvatarURL(),
|
icon_url: user.displayAvatarURL(),
|
||||||
text: config.footerTxt
|
text: config.footerTxt
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
process.exit();
|
process.exit();
|
||||||
} else {
|
} else {
|
||||||
console.error('[SYSTEM] [ERR] User ' + interaction.user.username + " tried to shut down the bot, but doesn't have permission! If this was you, Check your config.json");
|
console.error('[SYSTEM] [ERR] User ' + user.username + " tried to shut down the bot, but doesn't have permission! If this was you, Check your config.json");
|
||||||
await interaction.reply(client.generateErrorMessage('You do not have permission to run this command.', interaction.user.displayAvatarURL()));
|
await channel.send(client.generateErrorMessage('You do not have permission to run this command.', user.displayAvatarURL()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,6 +11,11 @@ module.exports = {
|
||||||
type: ApplicationCommandOptionType.User
|
type: ApplicationCommandOptionType.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) {
|
async parseInteraction (client, config, interaction) {
|
||||||
const target = interaction.options.getUser('user') ? (await interaction.guild.members.fetch(interaction.options.getUser('user'))) : interaction.member;
|
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));
|
await interaction.reply(this.handle(client, config, interaction.user, target));
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
|
"prefix": "n!",
|
||||||
"release": "Developer Release",
|
"release": "Developer Release",
|
||||||
"build": "1.4dev",
|
"build": "1.3.3dev",
|
||||||
"footerTxt": "Anitrox, made with <3 by IDeletedSystem64 | 2018-2022",
|
"footerTxt": "Anitrox, made with <3 by IDeletedSystem64 | 2018-2023",
|
||||||
"sandbox": {
|
"sandbox": {
|
||||||
"enabled": false,
|
"enabled": false,
|
||||||
"id": "0",
|
"id": "0",
|
||||||
|
|
|
@ -2,7 +2,6 @@ module.exports = {
|
||||||
event: require('path').parse(__filename).name,
|
event: require('path').parse(__filename).name,
|
||||||
once: false,
|
once: false,
|
||||||
listener: (client, config) =>
|
listener: (client, config) =>
|
||||||
async (interaction) => {
|
|
||||||
try {
|
try {
|
||||||
await client.commands.get(interaction.commandName)?.parseInteraction(client, config, interaction);
|
await client.commands.get(interaction.commandName)?.parseInteraction(client, config, interaction);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
module.exports = {
|
||||||
|
event: require('path').parse(__filename).name,
|
||||||
|
once: false,
|
||||||
|
listener: (client, config) =>
|
||||||
|
async (message) => {
|
||||||
|
if (!message.content.startsWith(config.prefix) || message.author.bot) return;
|
||||||
|
|
||||||
|
const args = message.content.slice(config.prefix.length).split(/\s+/);
|
||||||
|
const command = args.shift()?.toLowerCase() ?? '';
|
||||||
|
|
||||||
|
if (!client.commands.has(command)) return;
|
||||||
|
|
||||||
|
try {
|
||||||
|
await client.commands.get(command)?.parseMessage(client, config, message, args);
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
message.channel.send({
|
||||||
|
embeds: [{
|
||||||
|
title: '<:AnitroxError:809651936563429416> **Something went wrong!**',
|
||||||
|
description: error.stack,
|
||||||
|
color: 13632027,
|
||||||
|
footer: {
|
||||||
|
icon_url: message.author.displayAvatarURL(),
|
||||||
|
text: config.footerTxt
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
|
@ -48,7 +48,7 @@ module.exports = {
|
||||||
console.log('/_/ |_/_/ /_/_/\\__/_/ \\____/_/|_| ');
|
console.log('/_/ |_/_/ /_/_/\\__/_/ \\____/_/|_| ');
|
||||||
console.log('');
|
console.log('');
|
||||||
console.log(`${config.release}, ${config.build}`);
|
console.log(`${config.release}, ${config.build}`);
|
||||||
console.log('Bot ready. | Anitrox by IDeletedSystem64 | Now with 100% more slash commands!');
|
console.log('Bot online. | Anitrox by IDeletedSystem64 | ALL MY CODE KEEPS BLOWING UP!');
|
||||||
// Statuses
|
// Statuses
|
||||||
setInterval(async () => {
|
setInterval(async () => {
|
||||||
// Picks a status from the config file
|
// Picks a status from the config file
|
||||||
|
|
Reference in New Issue