Update to Anitrox 1.1

Update to Anitrox 1.1
This commit is contained in:
Sophie Mondz 2022-03-29 19:07:05 -05:00 committed by GitHub
commit aaa85f31a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 793 additions and 1056 deletions

View File

@ -2,61 +2,29 @@ module.exports = {
name: '8ball', name: '8ball',
description: 'Ask Anitrox a question, any question! and they will answer it!', description: 'Ask Anitrox a question, any question! and they will answer it!',
syntax: ["[Question]"], syntax: ["[Question]"],
execute(client, message, args) { async execute(client, message, args, config) {
const {footerTxt} = require('../config.json'); const index = Math.floor(Math.random() * config.answers.length);
const answers = [ const answer = config.answers[index]
"Heck no!", const question = args.slice(0).join(" ")
"Are you crazy!? No!",
"Don't even think about it.",
"No! You might bork something!",
"Heck yeah",
"I don't think so.",
"Let me think about it first. No.",
"Let me think about it first. Yeah",
"Let me think about it first. Maybe",
"I don't know man",
"Maybe",
"I'm not sure",
"Ask again",
"YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE!!!",
"Definitely!",
"Go for it! :smile:",
"Good idea!",
"Sure"
]
const index = Object.keys(answers)[Math.floor(Math.random() * Object.keys(answers).length)];
var question = args.slice(0).join(" ")
var answer = (answers[index]);
console.log(args);
if (!question) { if (!question) {
const embed = { await message.channel.send(client.generateErrorMessage("You need to ask a question!", message.author.displayAvatarURL));
"title": "<:AnitroxError:809651936563429416> **Something went wrong!**", } else {
"description": "You need to ask a", await message.channel.send({embed: {
"color": 13632027, "title": ":8ball: 8Ball",
"footer": { "description": `Your amazing question: **${question}**`,
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
}
}
}
const embed = {
"title": ":8ball: Anitrox 8 Ball",
"description": "Your question: **" + question + "**",
"color": 9442302, "color": 9442302,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt "text": config.footerTxt
}, },
"fields": [ "fields": [
{ {
"name": "🤔 My Answer", "name": "Answer",
"value": answer "value": `${answer}`
} }
] ]
}; }});
message.channel.send({ embed }); }
} }
} }

View File

@ -1,23 +1,21 @@
module.exports = { module.exports = {
name: "avatar", name: "avatar",
description: "Gets a users avatar.", description: "Gets a user's avatar.",
execute(client, message, args) { async execute(client, message, args, config) {
user = message.mentions.users.first()
if (!user) user = message.author
const {footerTxt} = require('../config.json'); const user = message.mentions.users.first() || client.users.cache.get(args[0]) || message.author;
const embed = { await message.channel.send({embed: {
"title": ":frame_photo: " + user.username + "'s Beautiful Avatar!", "title": `:frame_photo: ${user.username}'s Beautiful Avatar!`,
"color": 9442302, "color": 9442302,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt "text": config.footerTxt
}, },
"image": { "image": {
"url": user.displayAvatarURL() "url": user.displayAvatarURL()
} }
}; }});
message.channel.send({ embed });
} }
} }

View File

@ -1,44 +1,25 @@
module.exports = { module.exports = {
name: "bonk", name: "bonk",
description: "Bonks an user!", description: "Bonks a user!",
execute(client, message, args) { async execute(client, message, _, config) {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
const {footerTxt} = require('../config.json');
const errorembed = {
"title": "<:AnitroxError:809651936563429416> Error",
"color": 13632027,
"footer": {
"icon_url": "https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
"text": "Made with ❤ in Illinois | Anitrox by IDeletedSystem64"
},
"fields": [
{
"name": "Well that happened...",
"value": "You need to @mention an user!"
}
]
};
if(!taggedUser) { if(!taggedUser) {
return message.channel.send({ embed: errorembed}); await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL()));
// Checks if a user was mentioned. If not, returns error message. } else {
} await message.channel.send({embed: {
const embed = {
"title": "<a:SylvBonk:801185845847130113> Bonk", "title": "<a:SylvBonk:801185845847130113> Bonk",
"description": "<@" + taggedUser + ">" + " You have been bonked by <@" + message.author + ">!", "description": `${taggedUser} You have been bonked by ${message.author}!`,
"color": 9442302, "color": 9442302,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt "text": config.footerTxt
}, },
"image": { "image": {
"url": "https://cdn.discordapp.com/attachments/793537380330111028/801194481549312060/HappyBONK.gif" "url": "https://cdn.discordapp.com/attachments/793537380330111028/801194481549312060/HappyBONK.gif"
} }
} }});
}
message.channel.send({ embed: embed });
} }
} }

View File

@ -1,31 +1,23 @@
module.exports = { module.exports = {
//a
name: "cheese", name: "cheese",
description: "Cheese an user, or run just ``n!cheese`` for a surprise :eyes:", description: "Cheese an user, or run just ``n!cheese`` for a surprise :eyes:",
execute(client, message, args) { async execute(_0, message, _1, config) {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
const {footerTxt} = require('../config.json');
if(!taggedUser) { if(!taggedUser) {
return message.channel.send("*slams cheese on desk* Cheese. https://www.youtube.com/watch?v=Or4IE8fkpn4"); await message.channel.send("*slams cheese on desk*\n**Cheese.** https://www.youtube.com/watch?v=Or4IE8fkpn4");
} else {
} await message.channel.send({embed: {
const embed = {
"title": ":cheese: Cheesed", "title": ":cheese: Cheesed",
"description": "<@" + taggedUser + ">" + " You got cheesed by " + "<@" + message.author + ">!", "description": `${taggedUser} You have been cheesed by ${message.author}!`,
"color": 16312092, "color": 16312092,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt "text": config.footerTxt
}, },
"image": { "image": {
"url": "https://cdn.discordapp.com/attachments/803658122299572255/812867714368536636/R06325af354168febcafd96b8328b7590.png" "url": "https://cdn.discordapp.com/attachments/803658122299572255/812867714368536636/R06325af354168febcafd96b8328b7590.png"
} }
} }});
}
message.channel.send({ embed: embed });
} }
} }

View File

@ -1,38 +1,35 @@
module.exports = {
name: "cuddle",
description: "Cuddle an user!",
execute(client, message, args) {
const taggedUser = message.mentions.users.first();
const {footerTxt} = require('../config.json');
// --------------------------------------
const gifchoices = [ const gifchoices = [
"https://i.pinimg.com/originals/4d/89/d7/4d89d7f963b41a416ec8a55230dab31b.gif", "https://i.pinimg.com/originals/4d/89/d7/4d89d7f963b41a416ec8a55230dab31b.gif",
"https://media1.tenor.com/images/6d73b0a9cadef5310be4b6160d2f959a/tenor.gif?itemid=12099823", "https://media1.tenor.com/images/6d73b0a9cadef5310be4b6160d2f959a/tenor.gif?itemid=12099823",
"https://media.tenor.com/images/2636cf3c8152631b4630bf71757a4afa/tenor.gif", "https://media.tenor.com/images/2636cf3c8152631b4630bf71757a4afa/tenor.gif",
"https://i.imgur.com/JiFpT5E.gif" "https://i.imgur.com/JiFpT5E.gif"
]; ];
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1);
var gif = (gifchoices[index]); module.exports = {
// ---------------------------------------
name: "cuddle",
description: "Cuddle an user!",
async execute(client, message, _, config) {
const taggedUser = message.mentions.users.first();
const index = Math.floor(Math.random() * gifchoices.length);
const gif = (gifchoices[index]);
if(!taggedUser) { if(!taggedUser) {
return message.channel.send("<:AnitroxError:809651936563429416> You need to specify an user!") await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL()));
} } else {
const embed = { await message.channel.send({embed: {
"title": ":heart: Cuddle", "title": ":heart: Cuddle",
"description": "<@" + taggedUser + ">" + " You have been cuddled by " + "<@" + message.author + ">!", "description": `${taggedUser} You have been cuddled by ${message.author}!`,
"color": 9442302, "color": 9442302,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt "text": config.footerTxt
}, },
"image": { "image": {
"url": gif "url": gif
} }
} }});
}
message.channel.send({ embed: embed });
} }
} }

View File

@ -1,26 +1,21 @@
const { inspect } = require("util");
module.exports = { module.exports = {
name: 'eval', name: 'eval',
description: 'Runs js code', description: 'Executes JS code',
execute(client, message, args) { async execute(client, message, args, config) {
const commandName = args[0].toLowerCase(); if (message.author.id == config.ownerID) {
if (message.author.id == 309427567004483586) {
try { try {
const code = args.join(" "); const code = args.join(" ");
let evaled = eval(code); const evaled = inspect(eval(code));
await message.channel.send(evaled, {code:"xl"});
if (typeof evaled !== "string")
evaled = require("util").inspect(evaled);
message.channel.send(clean(evaled), {code:"xl"});
} catch (error) { } catch (error) {
const embed = { await message.channel.send({embed: {
"title": "<:NyabotError:697145462347661412> **Well that happened...**", "title": "<:AnitroxError:809651936563429416> **Something went wrong! **",
"color": 13632027, "color": 13632027,
"footer": { "footer": {
"icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "icon_url": message.author.displayAvatarURL(),
"text": "Anitrox © IDeletedSystem64 2018-2021 All Rights Reserved." "text": config.footerTxt
}, },
"fields": [ "fields": [
{ {
@ -32,8 +27,7 @@ module.exports = {
"value": error.message "value": error.message
} }
] ]
}; }});
message.channel.send({ embed });
} }
}; };
} }

View File

@ -4,16 +4,14 @@ module.exports = {
description: 'Get help on anything from commands, to what the bot does! just not your homework..', description: 'Get help on anything from commands, to what the bot does! just not your homework..',
syntax: '<Command>', syntax: '<Command>',
execute(client, message, args) { async execute(_0, message, _1, config) {
const {footerTxt} = require('../config.json'); await message.channel.send({embed: {
const Embed = {
"title": "HELP! SEYMOUR! THE BOT IS ON FIRE!", "title": "HELP! SEYMOUR! THE BOT IS ON FIRE!",
"description": "Get help on anything from commands, to what the bot does! just not your homework..", "description": "Get help on anything from commands, to what the bot does! just not your homework..",
"color": 9442302, "color": 9442302,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt + " | No mother it's just the northern lights" "text": `${config.footerTxt} | No mother it's just the northern lights`
}, },
"fields": [ "fields": [
{ {
@ -25,6 +23,6 @@ module.exports = {
"value": "Join the [support server!](https://discord.gg/grebRGsBZ3)" "value": "Join the [support server!](https://discord.gg/grebRGsBZ3)"
} }
] ]
}; }});
message.channel.send({ embed: Embed }); }
}}; }

View File

@ -1,10 +1,3 @@
module.exports = {
name: "hug",
description: "Hugs an user!",
execute(client, message, args) {
const {footerTxt} = require('../config.json');
const taggedUser = message.mentions.users.first();
const gifchoices = [ const gifchoices = [
"https://cdn.discordapp.com/attachments/803658122299572255/807670647920001044/hug2.gif", "https://cdn.discordapp.com/attachments/803658122299572255/807670647920001044/hug2.gif",
"https://cdn.discordapp.com/attachments/803658122299572255/807670797983285268/hug1.gif", "https://cdn.discordapp.com/attachments/803658122299572255/807670797983285268/hug1.gif",
@ -12,43 +5,30 @@ module.exports = {
"https://cdn.discordapp.com/attachments/803658122299572255/808834617494208532/gif3new.gif", "https://cdn.discordapp.com/attachments/803658122299572255/808834617494208532/gif3new.gif",
"https://cdn.discordapp.com/attachments/803658122299572255/807671126376972308/gif4.gif" "https://cdn.discordapp.com/attachments/803658122299572255/807671126376972308/gif4.gif"
]; ];
//---------------------------------
const errorembed = { module.exports = {
"title": "<:AnitroxError:809651936563429416> Error",
"color": 9442302, name: "hug",
"footer": { description: "Hugs a user!",
"icon_url": message.author.displayAvatarURL(), async execute(client, message, _, config) {
"text": message.author.displayAvatarURL() const taggedUser = message.mentions.users.first();
},
"fields": [
{
"name": "Well that happened...",
"value": "You need to @mention an user!"
}
]
};
if(!taggedUser) { if(!taggedUser) {
return message.channel.send({ embed: errorembed}); await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL()));
// Checks if a user was mentioned. If not, returns error message. } else {
} const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)];
await message.channel.send({embed: {
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 0.4);
var gif = (gifchoices[index]);
const embed = {
"title": "<a:ABlobCatHuggle:801232248035999784> Hug", "title": "<a:ABlobCatHuggle:801232248035999784> Hug",
"description": "<@" + taggedUser + ">" + " You have been hugged by " + "<@" + message.author + ">!", "description": `${taggedUser} You have been hugged by ${message.author}!`,
"color": 8311585, "color": 8311585,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt "text": config.footerTxt
}, },
"image": { "image": {
"url": gif "url": gif
} }
} }});
}
message.channel.send({ embed: embed });
} }
} }

View File

@ -1,40 +1,35 @@
const { Client, ClientUser } = require('discord.js');
module.exports = { module.exports = {
name: 'info', name: 'info',
description: 'Shows bot and host information', description: 'Shows bot and host information',
execute(client, message, args) { async execute(client, message, _, config) {
const { build, release, footerTxt } = require('../config.json');
function Uptime(uptimetype) {
let totalSeconds = (uptimetype / 1000);
let days = parseInt(Math.floor(totalSeconds / 86400)) + " day"; function Uptime(uptime) {
let hours = Math.floor(parseInt(Math.floor(totalSeconds / 3600)) % 24) + " hour"; const totalSeconds = (uptime / 1000);
totalSeconds %= 3600;
let minutes = parseInt(Math.floor(totalSeconds / 60)) + " minute";
let seconds = parseInt(totalSeconds % 60) + " second";
if (parseInt(days.substring(0,2)) != 1) days += "s"; const days = parseInt(totalSeconds / 86400);
if (parseInt(hours.substring(0,3)) != 1) hours += "s"; const hours = parseInt((totalSeconds % 86400) / 3600);
if (parseInt(minutes.substring(0,3)) != 1) minutes += "s"; const minutes = parseInt((totalSeconds % 3600) / 60);
if (parseInt(seconds.substring(0,3)) != 1) seconds += "s"; const seconds = parseInt(totalSeconds % 60);
let uptime = `${days}**, **${hours}**, **${minutes}**, **${seconds}`; const daystring = days + (days === 1 ? "day" : "days");
return uptime; const hourstring = hours + (hours === 1 ? "hour" : "hours");
}; const minutetring = minutes + (minutes === 1 ? "minute" : "minutes");
const secondstring = seconds + (seconds === 1 ? "second" : "seconds");
const os = require("os") return `${daystring}**, **${hourstring}**, **${minutetring}**, **${secondstring}`;
var osu = require('node-os-utils') }
var cpu = osu.cpu
let botAvatar = client.user.displayAvatarURL() const os = require("os");
const embed = { const osu = require('node-os-utils');
const cpu = osu.cpu;
await message.channel.send({embed: {
"title": "<:AnitroxInfo:809651936831733791> Information about Anitrox", "title": "<:AnitroxInfo:809651936831733791> Information about Anitrox",
"description": "Everything you've ever wanted to know about your favorite bot, Anitrox!", "description": "Everything you've ever wanted to know about your favorite bot, Anitrox!",
"color": 9442302, "color": 9442302,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt "text": config.footerTxt
}, },
"thumbnail": { "thumbnail": {
"url": client.user.displayAvatarURL() "url": client.user.displayAvatarURL()
@ -46,12 +41,12 @@ module.exports = {
}, },
{ {
"name": "Release Type", "name": "Release Type",
"value": release, "value": config.release,
"inline": true "inline": true
}, },
{ {
"name": "Release Version", "name": "Release Version",
"value": build, "value": config.build,
"inline": true "inline": true
}, },
{ {
@ -61,7 +56,7 @@ module.exports = {
}, },
{ {
"name": "<:memory:793536677737136178> Bot Memory Usage", "name": "<:memory:793536677737136178> Bot Memory Usage",
"value": (Math.round(process.memoryUsage().heapUsed / 1024 / 1024 * 100) / 100) + " MiB", "value": `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)} MiB`,
"inline": true "inline": true
}, },
{ {
@ -71,7 +66,7 @@ module.exports = {
}, },
{ {
"name": "Bot ID", "name": "Bot ID",
"value": "``" + client.user.id + "``", "value": `\`${client.user.id}\``,
"inline": true "inline": true
}, },
{ {
@ -84,12 +79,12 @@ module.exports = {
}, },
{ {
"name": "<:cpu:793672442056802354> CPU Type", "name": "<:cpu:793672442056802354> CPU Type",
"value": process.arch + ", " + cpu.model() "value": `${process.arch}, ${cpu.model()}`
}, },
{ {
"name": "<:hostos:793866961675223090> OS Type", "name": "<:hostos:793866961675223090> OS Type",
"value": process.platform + " / " + os.version() "value": `${process.platform} / ${os.version()}`
}, },
{ {
"name": "<:node:793537507018145813> Node.JS Version", "name": "<:node:793537507018145813> Node.JS Version",
@ -97,7 +92,7 @@ module.exports = {
}, },
{ {
"name": "<:hostinfo:793529505263517747> Bot Ping", "name": "<:hostinfo:793529505263517747> Bot Ping",
"value": Math.round(client.ws.ping) + " ms", "value": `${Math.round(client.ws.ping)} ms`,
"inline": true "inline": true
}, },
{ {
@ -106,8 +101,6 @@ module.exports = {
} }
] ]
}; }});
message.channel.send({ embed });
} }
}; };

View File

@ -1,18 +1,16 @@
module.exports = { module.exports = {
name: 'invite', name: 'invite',
description: 'Add Anitrox to your beautiful server!', description: 'Add Anitrox to your beautiful server!',
syntax: [], syntax: [],
execute(client, message) { async execute(_0, message, _1, config) {
const {footerTxt} = require('../config.json'); await message.channel.send({embed: {
const embed = {
"title": "Add Anitrox to your Server!", "title": "Add Anitrox to your Server!",
"description": "Weather you want stable, or that squeaky clean fresh PTB build, we gotchu.", "description": "Weather you want stable, or that squeaky clean fresh PTB build, we gotchu.",
"color": 9442302, "color": 9442302,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt "text": config.footerTxt
}, },
"thumbnail": { "thumbnail": {
"url": "https://cdn.discordapp.com/attachments/803658122299572255/814352905394061322/anitroxaddsrvr.png" "url": "https://cdn.discordapp.com/attachments/803658122299572255/814352905394061322/anitroxaddsrvr.png"
@ -30,9 +28,7 @@ module.exports = {
"name": "Need help?", "name": "Need help?",
"value": "Come join the Anitrox Support Server, for support and much more!\n [Anitrox Support Server](https://discord.gg/grebRGsBZ3)" "value": "Come join the Anitrox Support Server, for support and much more!\n [Anitrox Support Server](https://discord.gg/grebRGsBZ3)"
} }
] ]
}; }});
message.channel.send({ embed });
}, },
}; };

View File

@ -1,13 +1,3 @@
module.exports = {
name: "kiss",
description: "Kisses an user!",
execute(client, message, args) {
const {footerTxt} = require('../config.json');
const taggedUser = message.mentions.users.first();
// --------------------------------------
const gifchoices = [ const gifchoices = [
"https://cdn.discordapp.com/attachments/803658122299572255/807671954055626812/kiss5.gif", "https://cdn.discordapp.com/attachments/803658122299572255/807671954055626812/kiss5.gif",
"https://cdn.discordapp.com/attachments/803658122299572255/807671956236140554/kiss2.gif", "https://cdn.discordapp.com/attachments/803658122299572255/807671956236140554/kiss2.gif",
@ -15,46 +5,30 @@ module.exports = {
"https://cdn.discordapp.com/attachments/803658122299572255/807671971168387082/kiss4.gif", "https://cdn.discordapp.com/attachments/803658122299572255/807671971168387082/kiss4.gif",
"https://cdn.discordapp.com/attachments/803658122299572255/807672017217781840/kiss3.gif" "https://cdn.discordapp.com/attachments/803658122299572255/807672017217781840/kiss3.gif"
]; ];
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1);
var gif = (gifchoices[index]); module.exports = {
// ---------------------------------------
const errorembed = { name: "kiss",
"title": "<:AnitroxError:809651936563429416> Error", description: "Kisses a user!",
"color": 13632027, async execute(client, message, _, config) {
"footer": { const taggedUser = message.mentions.users.first();
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"fields": [
{
"name": "Well that happened...",
"value": "You need to @mention an user!"
}
]
};
if(!taggedUser) { if(!taggedUser) {
return message.channel.send({ embed: errorembed}); await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL()));
} } else {
const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)];
if(!taggedUser) { await message.channel.send({embed: {
return message.channel.send({ embed: errorembed});
// Checks if a user was mentioned. If not, returns error message.
}
const embed = {
"title": ":heart: Kiss", "title": ":heart: Kiss",
"description": "<@" + taggedUser + ">" + ", You have been kissed by <@" + messageAuthor + ">!", "description": `${taggedUser} You have been kissed by ${message.author}!`,
"color": 9442302, "color": 9442302,
"footer": { "footer": {
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "icon_url": message.author.displayAvatarURL(),
"text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021" "text": config.footerTxt
}, },
"image": { "image": {
"url": gif "url": gif
} }
} }});
}
message.channel.send({ embed: embed });
} }
} }

View File

@ -1,14 +1,3 @@
const { Message } = require("discord.js");
const { execute } = require("./info");
module.exports = {
name: "leskiss",
description: "Lesbian kiss <:lesbian:803831629428686849>",
execute(client, message, args) {
const taggedUser = message.mentions.users.first();
const {footerTxt} = require('../config.json');
// --------------------------------------
const gifchoices = [ const gifchoices = [
"https://cdn.discordapp.com/attachments/793537380330111028/803833954750038066/gif5.gif", "https://cdn.discordapp.com/attachments/793537380330111028/803833954750038066/gif5.gif",
"https://cdn.discordapp.com/attachments/793537380330111028/803833959338475550/gif12.gif", "https://cdn.discordapp.com/attachments/793537380330111028/803833959338475550/gif12.gif",
@ -25,46 +14,31 @@ module.exports = {
"https://cdn.discordapp.com/attachments/793537380330111028/803834391226351676/gif17.gif", "https://cdn.discordapp.com/attachments/793537380330111028/803834391226351676/gif17.gif",
"https://cdn.discordapp.com/attachments/793537380330111028/803834498714304522/gif15.gif", "https://cdn.discordapp.com/attachments/793537380330111028/803834498714304522/gif15.gif",
"https://cdn.discordapp.com/attachments/793537380330111028/803834514269798460/gif19.gif" "https://cdn.discordapp.com/attachments/793537380330111028/803834514269798460/gif19.gif"
]; ];
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1.75);
var gif = (gifchoices[index]); module.exports = {
// ---------------------------------------
const errorembed = { name: "leskiss",
"title": "<:AnitroxError:809651936563429416> Error", description: "Lesbian kiss <:lesbian:803831629428686849>",
"color": 9442302, async execute(client, message, _, config) {
"footer": { const taggedUser = message.mentions.users.first();
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"fields": [
{
"name": "Well that happened...",
"value": "You need to @mention an user!"
}
]
};
if(!taggedUser) { if(!taggedUser) {
return message.channel.send({ embed: errorembed}); await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL()));
// Checks if a user was mentioned. If not, returns error message. } else {
} const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)];
await message.channel.send({embed: {
const embed = {
"title": ":heart: <:lesbian:803831629428686849> Kiss", "title": ":heart: <:lesbian:803831629428686849> Kiss",
"description": "<@" + taggedUser + ">" + " You have been kissed by <@" + messageAuthor + ">! <:lesbian:803831629428686849>", "description": `${taggedUser} You have been kissed by ${message.author}!`,
"color": 8311585, "color": 8311585,
"footer": { "footer": {
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "icon_url": message.author.displayAvatarURL(),
"text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021" "text": config.footerTxt
}, },
"image": { "image": {
"url": gif "url": gif
} }
} }});
}
message.channel.send({ embed: embed });
} }
} }

View File

@ -1,58 +1,33 @@
module.exports = {
name: "lick",
description: "Licks an user!",
execute(client, message, args) {
const {footerTxt} = require('../config.json');
const taggedUser = message.mentions.users.first();
//---------------------------------------------------
// --------------------------------------
const gifchoices = [ const gifchoices = [
"https://cdn.discordapp.com/attachments/803658122299572255/805314244123951114/cef569820773b0f5d54ee34cfa18e1f8.gif", "https://cdn.discordapp.com/attachments/803658122299572255/805314244123951114/cef569820773b0f5d54ee34cfa18e1f8.gif",
"https://cdn.lowgif.com/full/2027501b8fa5225c-.gif", "https://cdn.lowgif.com/full/2027501b8fa5225c-.gif",
"https://i.gifer.com/36Nx.gif", "https://i.gifer.com/36Nx.gif",
"https://media.tenor.com/images/e8bbe712a5f36bbe9545930894b08bf9/tenor.gif" "https://media.tenor.com/images/e8bbe712a5f36bbe9545930894b08bf9/tenor.gif"
]; ];
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1);
var gif = (gifchoices[index]); module.exports = {
// ---------------------------------------
//--------------------------------------------------- name: "lick",
const errorembed = { description: "Licks a user!",
"title": "<:AnitroxError:809651936563429416> Error", async execute(client, message, _, config) {
"color": 9442302, const taggedUser = message.mentions.users.first();
"footer": {
"icon_url": "https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
"text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64"
},
"fields": [
{
"name": "Well that happened...",
"value": "You need to @mention an user!"
}
]
};
if(!taggedUser) { if(!taggedUser) {
return message.channel.send({ embed: errorembed}); await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL()));
// Checks if a user was mentioned. If not, returns error message. } else {
} const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)];
await message.channel.send({embed: {
const embed = {
"title": "<a:LeafeonLick:806396195089154058> Lick", "title": "<a:LeafeonLick:806396195089154058> Lick",
"description": "<@" + taggedUser + "> You have been licked by <@" + message.author + ">!", "description": `${taggedUser} You have been licked by ${message.author}!`,
"color": 8311585, "color": 8311585,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt "text": config.footerTxt
}, },
"image": { "image": {
"url": "https://cdn.discordapp.com/attachments/803658122299572255/805314244123951114/cef569820773b0f5d54ee34cfa18e1f8.gif" "url": "https://cdn.discordapp.com/attachments/803658122299572255/805314244123951114/cef569820773b0f5d54ee34cfa18e1f8.gif"
} }
} }});
}
message.channel.send({ embed: embed });
} }
} }

View File

@ -1,57 +1,33 @@
module.exports = {
name: "nom",
description: "Noms an user!",
execute(client, message, args) {
const {footerTxt} = require('../config.json');
const taggedUser = message.mentions.users.first();
// --------------------------------------
const gifchoices = [ const gifchoices = [
"https://i.imgur.com/Ns1RBzX.gif", "https://i.imgur.com/Ns1RBzX.gif",
"https://cdn.lowgif.com/full/2027501b8fa5225c-.gif", "https://cdn.lowgif.com/full/2027501b8fa5225c-.gif",
"https://i.gifer.com/36Nx.gif", "https://i.gifer.com/36Nx.gif",
"https://media.tenor.com/images/e8bbe712a5f36bbe9545930894b08bf9/tenor.gif" "https://media.tenor.com/images/e8bbe712a5f36bbe9545930894b08bf9/tenor.gif"
]; ];
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1);
var gif = (gifchoices[index]); module.exports = {
// ---------------------------------------
const errorembed = { name: "nom",
"title": "<:AnitroxError:809651936563429416> Error", description: "Noms an user!",
"color": 9442302, async execute(client, message, _, config) {
"footer": { const taggedUser = message.mentions.users.first();
"icon_url": "https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
"text": "Made with ❤ in Illinois | Anitrox by IDeletedSystem64"
},
"fields": [
{
"name": "Well that happened...",
"value": "You need to @mention an user!"
}
]
};
if(!taggedUser) { if(!taggedUser) {
return message.channel.send({ embed: errorembed}); await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL()));
// Checks if a user was mentioned. If not, returns error message. } else {
} const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)];
await message.channel.send({embed: {
const embed = {
"title": "<:BlobNomBlob:801241117919805510> Nom", "title": "<:BlobNomBlob:801241117919805510> Nom",
"description": "<@" + taggedUser + "> You have been nommed by <@" + messageAuthor + ">!", "description": `${taggedUser} You have been nommed by ${message.author}!`,
"color": 8311585, "color": 8311585,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt "text": config.footerTxt
}, },
"image": { "image": {
"url": gif "url": gif
} }
} }});
}
message.channel.send({ embed: embed });
} }
} }

View File

@ -1,15 +1,14 @@
module.exports = { module.exports = {
name: 'opensource', name: 'opensource',
description: 'Attributions to open source components used by Anitrox', description: 'Attributions to open source components used by Anitrox',
execute(client, message, args){ async execute(_0, message, _1, config){
const {footerTxt} = require('../config.json'); await message.channel.send({embed: {
const embed = {
"title": "Component Attribution", "title": "Component Attribution",
"description": "Some parts of Anitrox are using open source code, and their attributions are avaliable here!", "description": "Some parts of Anitrox are using open source code, and their attributions are avaliable here!",
"color": 52508, "color": 52508,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt "text": config.footerTxt
}, },
"thumbnail": { "thumbnail": {
"url": "https://cdn.discordapp.com/attachments/803658122299572255/838854256471703602/793885335498522685.png" "url": "https://cdn.discordapp.com/attachments/803658122299572255/838854256471703602/793885335498522685.png"
@ -28,6 +27,6 @@ module.exports = {
"value": "Using and supporting the Anitrox Project, thank you! ❤" "value": "Using and supporting the Anitrox Project, thank you! ❤"
} }
] ]
}; }});
message.channel.send({ embed }); }
}} }

View File

@ -1,56 +1,32 @@
module.exports = {
name: "pat",
description: "Pats an user!",
execute(client, message, args) {
const {footerTxt} = require('../config.json');
const taggedUser = message.mentions.users.first();
// --------------------------------------
const gifchoices = [ const gifchoices = [
"https://cdn.discordapp.com/attachments/803658122299572255/803708174293008474/tenor.gif", "https://cdn.discordapp.com/attachments/803658122299572255/803708174293008474/tenor.gif",
"https://community.gamepress.gg/uploads/default/original/3X/0/a/0a762099c5ad6de9ca5f13dd22a7e45884a99eb3.gif", "https://community.gamepress.gg/uploads/default/original/3X/0/a/0a762099c5ad6de9ca5f13dd22a7e45884a99eb3.gif",
"https://media1.giphy.com/media/ARSp9T7wwxNcs/giphy.gif" "https://media1.giphy.com/media/ARSp9T7wwxNcs/giphy.gif"
]; ];
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 2);
var gif = (gifchoices[index]); module.exports = {
// ---------------------------------------
const errorembed = { name: "pat",
"title": "<:AnitroxError:809651936563429416> Error", description: "Pats a user!",
"color": 9442302, async execute(client, message, _, config) {
"footer": { const taggedUser = message.mentions.users.first();
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"fields": [
{
"name": "Well that happened...",
"value": "You need to @mention an user!"
}
]
};
if(!taggedUser) { if(!taggedUser) {
return message.channel.send({ embed: errorembed}); await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL()));
// Checks if a user was mentioned. If not, returns error message. } else {
} const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)];
await message.channel.send({embed: {
const embed = {
"title": "<:pats:801238281286713355> Pat", "title": "<:pats:801238281286713355> Pat",
"description": "<@" + taggedUser + "> You have been patted by <@" + messageAuthor + ">!", "description": `${taggedUser} You have been patted by ${message.author}!`,
"color": 8311585, "color": 8311585,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt "text": config.footerTxt
}, },
"image": { "image": {
"url": gif "url": gif
} }
} }});
}
message.channel.send({ embed: embed });
} }
} }

View File

@ -1,21 +1,18 @@
module.exports = { module.exports = {
name: "ping", name: "ping",
description: "Gets bot ping", description: "Gets bot ping",
execute(client, message) { async execute(client, message, _, config) {
const {footerTxt, locations} = require('../config.json'); const index = Math.floor(Math.random() * config.locations.length);
const location = config.locations[index]
const index = Math.floor(Math.random() * (locations.length -1 ) + 1); await message.channel.send({embed:{
PingLocation = locations[index]
const embed = {
"title": ":ping_pong: Ping", "title": ":ping_pong: Ping",
"description": "**Pong!** We pinged **" + PingLocation + "** and got " + client.ws.ping + " ms.", "description": `**Pong!** We pinged **${location}** and got ${client.ws.ping} ms.`,
"color": 9442302, "color": 9442302,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt "text": config.footerTxt
} }
} }});
message.channel.send({ embed });
} }
}; };

View File

@ -1,56 +1,32 @@
module.exports = {
name: "poke",
description: "Pokes an user!",
execute(client, message, args) {
const messageAuthor = message.author
const taggedUser = message.mentions.users.first();
// --------------------------------------
const gifchoices = [ const gifchoices = [
"https://i.pinimg.com/originals/b4/95/fb/b495fb19f4b9a1b04f48297b676c497b.gif", "https://i.pinimg.com/originals/b4/95/fb/b495fb19f4b9a1b04f48297b676c497b.gif",
"https://i.imgur.com/H7Ok5tn.gif", "https://i.imgur.com/H7Ok5tn.gif",
"https://media1.tenor.com/images/8fe23ec8e2c5e44964e5c11983ff6f41/tenor.gif?itemid=5600215" "https://media1.tenor.com/images/8fe23ec8e2c5e44964e5c11983ff6f41/tenor.gif?itemid=5600215"
]; ];
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 2);
var gif = (gifchoices[index]); module.exports = {
// ---------------------------------------
const errorembed = { name: "poke",
"title": "<:AnitroxError:809651936563429416> Error", description: "Pokes a user!",
"color": 9442302, async execute(client, message, _, config) {
"footer": { const taggedUser = message.mentions.users.first();
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"fields": [
{
"name": "Well that happened...",
"value": "You need to @mention an user!"
}
]
};
if(!taggedUser) { if(!taggedUser) {
return message.channel.send({ embed: errorembed}); await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL()));
// Checks if a user was mentioned. If not, returns error message. } else {
} const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)];
await message.channel.send({embed: {
const embed = {
"title": "👉 Poke!", "title": "👉 Poke!",
"description": "<@" + taggedUser + "> You have been poked by <@" + messageAuthor + ">!", "description": `${taggedUser} You have been poked by ${message.author}!`,
"color": 8311585, "color": 8311585,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt "text": config.footerTxt
}, },
"image": { "image": {
"url": gif "url": gif
} }
} }});
}
message.channel.send({ embed: embed });
} }
} }

View File

@ -1,35 +1,40 @@
module.exports = { module.exports = {
name: 'reload', name: 'reload',
description: 'Reloads a command', description: 'Reloads a command',
args: true, async execute(client, message, args, config) {
execute(client, message, args, denied) { if (message.author.id = config.ownerID) {
if (message.author.id == 309427567004483586) { if (!args.length) {
const commandName = args[0].toLowerCase(); await message.channel.send(client.generateErrorMessage("You forgot to provide anything to reload, you pillock",message.author.displayAvatarURL()));
}
args.forEach(async (arg) => {
const commandName = arg.toLowerCase();
const command = message.client.commands.get(commandName) const command = message.client.commands.get(commandName)
|| message.client.commands.find(cmd => cmd.aliases && cmd.aliases.includes(commandName)); || message.client.commands.find(cmd => cmd.aliases && cmd.aliases.includes(commandName));
if (!command) { if (!command) {
return message.channel.send(`There is no command with name or alias \`${commandName}\`, ${message.author}!`); await message.channel.send(client.generateErrorMessage(`There is no command with name or alias \`${commandName}\`, ${message.author}!`,message.author.displayAvatarURL()));
} } else {
delete require.cache[require.resolve(`./${command.name}.js`)]; delete require.cache[require.resolve(`./${command.name}.js`)];
try { try {
const newCommand = require(`./${command.name}.js`); const newCommand = require(`./${command.name}.js`);
message.client.commands.set(newCommand.name, newCommand); client.commands.set(newCommand.name, newCommand);
message.channel.send(`<:NyabotSuccess:697211376740859914> **Reloaded \`${command.name}\` successfully!**`); await message.channel.send(`<:AnitroxSuccess:809651936819019796> **Reloaded \`${command.name}\` successfully!**`);
console.log('User reloaded ${command.name}.') console.log(`User reloaded ${command.name}.`)
} catch (error) { } catch (error) {
console.error(error); console.error(error);
message.channel.send(`<:AnitroxError:809651936563429416> There was an error while reloading \`${command.name}\`:\n\`${error.message}\``); await message.channel.send(client.generateErrorMessage(`There was an error while reloading \`${command.name}\`:\n\`${error.message}\``, message.author.displayAvatarURL()));
} }
}
});
} else { } else {
const embed = { message.channel.send({embed: {
"title": "<:NyabotDenied:697145462565896194> **Access is denied**", "title": "<:AnitroxDenied:809651936642203668> **403 Forbidden**",
"color": 13632027, "color": 13632027,
"footer": { "footer": {
"icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "icon_url": message.author.displayAvatarURL(),
"text": "Made with ❤ in Illinois | Anitrox by IDeletedSystem64" "text": config.footerTxt
}, },
"fields": [ "fields": [
{ {
@ -37,8 +42,7 @@ module.exports = {
"value": "You don't have the appropriate permissions to run this command!" "value": "You don't have the appropriate permissions to run this command!"
} }
] ]
}; }});
message.channel.send({ embed }); }
} }
},
}; };

View File

@ -1,18 +1,18 @@
module.exports = { module.exports = {
name: 'restart', name: 'restart',
description: '(Owner Only) Shuts down the bot.', description: 'Restarts the bot',
execute(client, message, args) { async execute(client, message, args, config) {
const { token } = require('../config.json'); if (message.author.id == config.ownerID) {
if (message.author.id == 309427567004483586) { console.log("Anitrox is restarting now!")
message.channel.send("<a:NyabotWorking:697147309531594843> Restarting...").then await message.channel.send("<a:NyabotWorking:697147309531594843> Restarting...")
client.destroy() try {
.catch(console.error) client.destroy();
.then await client.login(config.token);
setTimeout(() => { client.login(token); }, 3000); await message.channel.send("<:NyabotSuccess:697211376740859914> Restart Successful")
message.channel.send("<:NyabotSuccess:697211376740859914> Restart Successful")
console.log("All systems go") console.log("All systems go")
} catch(e) {console.log(e);}
} else { } else {
message.channel.send("<:NyabotDenied:697145462565896194> Access Denied, You must be bot owner to execute this command."); await message.channel.send("<:NyabotDenied:697145462565896194> Access Denied, You must be bot owner to execute this command.");
}
}
} }
}}

View File

@ -1,18 +1,19 @@
module.exports = { module.exports = {
name: 'setnick', name: 'setnick',
description: 'Sets your nickname', description: 'Sets your nickname',
execute(client, message, args) { async execute(client, message, args, config) {
if (message.channel.permissionsFor(message.author).has("CHANGE_NICKNAME")) { if (message.channel.permissionsFor(message.author).has("CHANGE_NICKNAME")) {
var newnick = args.slice(0).join(" ") const newnick = args.slice(0).join(" ")
try { try {
const successembed = { await message.member.setNickname(newnick, "Nickname change requested by the server member. If you don't want users to be able to change their nickname disable 'CHANGE_NICKNAME' via Change Nickname in Roles.")
await message.channel.send({embed: {
"title": "<:AnitroxSuccess:809651936819019796> Nickname Changed", "title": "<:AnitroxSuccess:809651936819019796> Nickname Changed",
"color": 9442302, "color": 9442302,
"footer": { "footer": {
"icon_url": "https://images-ext-2.discordapp.net/external/-qaO3jaZLojhEnjrHiKABdXD7gLWqFvdUqHdskNGWhE/https/media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "icon_url": message.author.displayAvatarURL(),
"text": "Made with ❤ in Illinois | Anitrox by IDeletedSystem64" "text": config.footerTxt
}, },
"fields": [ "fields": [
{ {
@ -25,25 +26,12 @@ module.exports = {
"inline": true "inline": true
} }
] ]
}; }});
message.member.setNickname(newnick, "Nickname change requested by the server member. If you don't want users to be able to change their nickname disable 'CHANGE_NICKNAME' via Change Nickname in Roles.")
message.channel.send({ embed: successembed });
} catch (error) { } catch (error) {
const failembed = { await message.channel.send(client.generateErrorMessage("Failed to set user nickname. Does the bot have the correct permissions?", message.author.displayAvatarURL()));
"title": "<:AnitroxDenied:809651936642203668> Well that happened...", };
"color": 13632027, } else {
"footer": { await message.channel.send(client.generateErrorMessage("You need to have permission ``CHANGE_NICKNAME`` to change your nick!", message.author.displayAvatarURL()));
"icon_url": "https://cdn.discordapp.com/embed/avatars/0.png", }
"text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64" }
},
"fields": [
{
"name": "Failed to set nickname",
"value": "You need to have permission ``CHANGE_NICKNAME`` to change your nick!"
} }
]
};
message.channel.send({ embed: failembed });
};
};
}}

View File

@ -2,46 +2,24 @@ module.exports = {
name: "slap", name: "slap",
description: "Slaps an user!", description: "Slaps an user!",
execute(client, message, args) { async execute(client, message, _, config) {
const {footerTxt} = require('../config.json');
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
//---------------------------------------------------
//---------------------------------------------------
const errorembed = {
"title": "<:AnitroxError:809651936563429416> Error",
"color": 13632027,
"footer": {
"icon_url": message.author.displayAvatarURL(),
"text": footerTxt
},
"fields": [
{
"name": "Well that happened...",
"value": "You need to @mention an user!"
}
]
};
if(!taggedUser) { if(!taggedUser) {
return message.channel.send({ embed: errorembed}); await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL()));
// Checks if a user was mentioned. If not, returns error message. } else {
} await message.channel.send({embed: {
const embed = {
"title": ":anger: Slap", "title": ":anger: Slap",
"description": "<@" + taggedUser + "> You have been slapped by <@" + messageAuthor + ">!", "description": `${taggedUser} You have been slapped by ${message.author}!`,
"color": 9442302, "color": 9442302,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt "text": config.footerTxt
}, },
"image": { "image": {
"url": "https://media1.tenor.com/images/b6d8a83eb652a30b95e87cf96a21e007/tenor.gif?itemid=10426943" "url": "https://media1.tenor.com/images/b6d8a83eb652a30b95e87cf96a21e007/tenor.gif?itemid=10426943"
} }
} }});
}
message.channel.send({ embed: embed });
} }
} }

View File

@ -1,36 +1,33 @@
module.exports = {
name: "snuggle",
description: "Snuggle an user!",
execute(client, message, args) {
const {footerTxt} = require('../config.json');
const taggedUser = message.mentions.users.first();
// --------------------------------------
const gifchoices = [ const gifchoices = [
"https://media.discordapp.net/attachments/803658122299572255/806775382995894282/anime-couple-snuggle-gif-5.gif?width=450&height=238", "https://media.discordapp.net/attachments/803658122299572255/806775382995894282/anime-couple-snuggle-gif-5.gif?width=450&height=238",
"https://media.discordapp.net/attachments/803658122299572255/806775411928989726/snuggl1.gif", "https://media.discordapp.net/attachments/803658122299572255/806775411928989726/snuggl1.gif",
"https://cdn.discordapp.com/attachments/803658122299572255/806775422833786911/ImpureDeepAmbushbug-small.gif" "https://cdn.discordapp.com/attachments/803658122299572255/806775422833786911/ImpureDeepAmbushbug-small.gif"
]; ];
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1);
var gif = (gifchoices[index]);
// ---------------------------------------
const embed = {
module.exports = {
name: "snuggle",
description: "Snuggle an user!",
async execute(client, message, _, config) {
const taggedUser = message.mentions.users.first();
if(!taggedUser) {
await message.channel.send(client.generateErrorMessage("You need to @mention a user!", message.author.displayAvatarURL()));
} else {
const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)];
await message.channel.send({embed: {
"title": "<:BlobSnuggleCat:806759753450782731> Snuggle", "title": "<:BlobSnuggleCat:806759753450782731> Snuggle",
"description": "<@" + taggedUser + ">" + " You have been snuggled by " + "<@" + messageAuthor + ">!", "description": `${taggedUser} You have been snuggled by ${message.author}!`,
"color": 9442302, "color": 9442302,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt "text": config.footerTxt
}, },
"image": { "image": {
"url": gif "url": gif
} }
} }});
}
message.channel.send({ embed: embed });
} }
} }

View File

@ -1,32 +1,29 @@
module.exports = { module.exports = {
name: "stop", name: "stop",
description: "Stops the bot", description: "IT'S TIME TO STOP!... the bot",
execute(client, message, args) { async execute(_, message, args, config) {
if (message.author.id == 309427567004483586) { if (message.author.id == config.ownerID) {
const embed = { await message.channel.send({embed: {
"title": "<a:AnitroxWorking:697147309531594843> **Shutting Down...**", "title": "<a:AnitroxWorking:697147309531594843> **Shutting Down...**",
"description": "See you next time!", "description": "See you next time!",
"color": 9442302, "color": 9442302,
"footer": { "footer": {
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "icon_url": message.author.displayAvatarURL(),
"text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64" "text": config.footerTxt
} },
}; }});
message.channel.send({ embed }); console.log("The bot is shutting down! Bye bye!")
setTimeout(function(){ process.exit();
client.destroy()
}, 5000);
} else { } else {
const denied = { await message.channel.send({embed: {
"title": ":AnitroxDenied: Access Denied", "title": "<:AnitroxDenied:809651936642203668> 403 Forbidden",
"description": "You need to be the bot owner to execute this command!", "description": "You need to be the bot owner to execute this command!",
"color": 13632027, "color": 13632027,
"footer": { "footer": {
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "icon_url": message.author.displayAvatarURL(),
"text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64" "text": config.footerTxt
} },
}; }});
message.channel.send({ denied });
} }
} }
} }

View File

@ -2,18 +2,15 @@ module.exports = {
name: "uinfo", name: "uinfo",
description: "Gets info about an user, such as ID, Discord Join date and more", description: "Gets info about an user, such as ID, Discord Join date and more",
syntax: "<User>", syntax: "<User>",
execute(client, message, args) { async execute(client, message, args, config) {
const {footerTxt} = require('../config.json'); const user = message.mentions.users.first() || client.users.cache.get(args[0]) || message.author
let user = message.mentions.users.first() || args[0] await message.channel.send({embed: {
if (!user) user = message.author "title": `Everything you've ever wanted to know about ${user.username}!`,
const embed = {
"title": "Everything you've ever wanted to know about " + user.username + "!",
"color": 9442302, "color": 9442302,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt "text": config.footerTxt
}, },
"thumbnail": { "thumbnail": {
"url": user.displayAvatarURL() "url": user.displayAvatarURL()
}, },
@ -44,7 +41,7 @@ module.exports = {
}, },
{ {
"name": "User ID", "name": "User ID",
"value": "``" + user.id + "``" "value": `\`${user.id}\``
}, },
{ {
"name": "User Joined Discord", "name": "User Joined Discord",
@ -52,7 +49,6 @@ module.exports = {
inline: true inline: true
}, },
] ]
}; }});
message.channel.send({ embed: embed });
} }
} }

View File

@ -33,5 +33,25 @@
"Mars", "Mars",
"Elon Musk", "Elon Musk",
"TMC Software" "TMC Software"
],
"answers": [
"Heck no!",
"Are you crazy!? No!",
"Don't even think about it.",
"No! You might bork something!",
"Heck yeah",
"I don't think so.",
"Let me think about it first. No.",
"Let me think about it first. Yeah",
"Let me think about it first. Maybe",
"I don't know man",
"Maybe",
"I'm not sure",
"Ask again",
"YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE!!!",
"Definitely!",
"Go for it! :smile:",
"Good idea!",
"Sure"
] ]
} }

71
start.js Normal file → Executable file
View File

@ -1,9 +1,8 @@
#!/usr/bin/env -S node
const fs = require('fs'); const fs = require('fs');
const Discord = require('discord.js'); const Discord = require('discord.js');
const { MessageActionRow, MessageButton } = require('discord.js') const config = require('./config.json');
const { statuses, build, release, prefix, token, footerTxt } = require('./config.json');
const os = require("os");
console.log('Starting!') console.log('Starting!')
const client = new Discord.Client(); const client = new Discord.Client();
client.commands = new Discord.Collection(); client.commands = new Discord.Collection();
@ -15,52 +14,66 @@ for (const file of commandFiles) {
client.commands.set(command.name, command); client.commands.set(command.name, command);
} }
client.on("error", (e) => console.log("[ERROR]" + error(e))); client.generateErrorMessage = (errorMsg, messageAuthorURL) => ({embed: {
client.on("warn", (e) => ("[WARN]" + warn(e))); "title": "<:AnitroxError:809651936563429416> Error",
// Log errors to console. "color": 13632027,
"footer": {
"icon_url": messageAuthorURL,
"text": config.footerTxt
},
"fields": [
{
"name": "Something went wrong!",
"value": errorMsg
}
]
}})
client.on("error", (e) => console.log(`[ERROR] ${error(e)}`));
client.on("warn", (e) => (`[WARN] ${warn(e)}`));
client.once('ready', () => { client.once('ready', () => {
console.clear() console.clear()
console.log(' ___ _ __ '); console.log(' ___ _ __ ');
console.log(' / | ____ (_) /__________ _ __'); console.log(' / | ____ (_) /__________ _ __');
console.log(' / /| | / __ \/ / __/ ___/ __ \| |/_/'); console.log(' / /| | / __ \\/ / __/ ___/ __ \\| |/_/');
console.log(' / ___ |/ / / / / /_/ / / /_/ /> < '); console.log(' / ___ |/ / / / / /_/ / / /_/ /> < ');
console.log('/_/ |_/_/ /_/_/\__/_/ \____/_/|_| ') console.log('/_/ |_/_/ /_/_/\\__/_/ \\____/_/|_| ');
console.log(release + ", " + build) console.log(`${config.release}, ${config.build}`);
console.log("All Systems Go. | Anitrox by IDeletedSystem64 | ALL MY CODE KEEPS BLOWING UP!"); console.log("Bot online. | Anitrox by IDeletedSystem64 | ALL MY CODE KEEPS BLOWING UP!");
// Statuses
setInterval(async () => {
// Picks a status from the config file
const index = Math.floor(Math.random() * config.statuses.length);
await client.user.setActivity(config.statuses[index]);
}, 20000);
}); });
setInterval(() => {
const index = Math.floor(Math.random() * (statuses.length - 1) + 1);
client.user.setActivity(statuses[index]);
}, 20000);
// Picks a status from the config file
// Begin Command Handler // Begin Command Handler
client.on('message', message => { client.on('message', async (message) => {
if (!message.content.startsWith(prefix) || message.author.bot) return; if (!message.content.startsWith(config.prefix) || message.author.bot) return;
const args = message.content.slice(prefix.length).split(/ +/);
const args = message.content.slice(config.prefix.length).split(/ +/);
const command = args.shift().toLowerCase(); const command = args.shift().toLowerCase();
if (!client.commands.has(command)) return; if (!client.commands.has(command)) return;
try { try {
client.commands.get(command).execute(client, message, args, footerTxt, Discord); await client.commands.get(command).execute(client, message, args, config);
} catch (error) { } catch (error) {
console.stack console.stack;
const usr = message.author; message.channel.send({embed: {
const embed = {
"title": "<:AnitroxError:809651936563429416> **Something went wrong!**", "title": "<:AnitroxError:809651936563429416> **Something went wrong!**",
"description": error.stack, "description": error.stack,
"color": 13632027, "color": 13632027,
"footer": { "footer": {
"icon_url": message.author.displayAvatarURL(), "icon_url": message.author.displayAvatarURL(),
"text": footerTxt + " | Something went wrong! :(" "text": config.footerTxt
} },
}; }});
message.channel.send({ embed });
// End Command Handler
} }
}); });
client.login(token); client.login(config.token);