Finish uploading files to stable

This commit is contained in:
Anthony M 2021-01-19 14:02:09 -06:00 committed by GitHub
parent 6080edb61f
commit a7bdfdfe36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 315 additions and 0 deletions

6
commands/bonk.js Normal file
View File

@ -0,0 +1,6 @@
module.exports = {
name: "bonk",
description: "Bonks an user!",
execute(client, message, args) {

23
commands/eval.js Normal file
View File

@ -0,0 +1,23 @@
module.exports = {
name: 'eval',
description: 'Runs js code',
execute(client, message, args) {
const commandName = args[0].toLowerCase();
if (message.author.id == 309427567004483586) {
try {
const code = args.join(" ");
let evaled = eval(code);
if (typeof evaled !== "string")
evaled = require("util").inspect(evaled);
message.channel.send(clean(evaled), {code:"xl"});
} catch (err) {
console.log("An error occurred while running that code!")
}
};
}
}

34
commands/help.js Normal file
View File

@ -0,0 +1,34 @@
module.exports = {
name: 'help',
description: '',
execute(client, message, args) {
const embed = {
"title": "<:NyabotInfo:697145463350231040> **Help? HELP!** ",
"color": 9540095,
"footer": {
"text": "Some commands are hidden for dev-only. | Anitrox © IDeletedSystem64 2018-2021"
},
"fields": [
{
"name": "**General Commands**",
"value": "`help` ``info`` ``userinfo`` ``ping`` ``invite`` ``avatar`` ``google`` ``youtube``"
},
{
"name": "Moderation Commands",
"value": "`ban` `kick` `warn` `mute` `unban` `unmute` `purge` `permissions`"
},
{
"name": "Server Management Commands",
"value": "` channelcreate` `channeldelete` `channelrename` `rolecreate` `roleedit` `roledelete` `setnick`"
},
{
"name": "Fun Commands",
"value": "`hug` `poke` `bonk` `slap` `pat` `kiss` `lick` `cuddle` `nom`"
}
]
};
message.channel.send({ embed });
}
};

112
commands/info.js Normal file
View File

@ -0,0 +1,112 @@
module.exports = {
name: 'info',
description: 'Shows bot and host information',
execute(client, message, args) {
function Uptime(uptimetype) {
let totalSeconds = (uptimetype / 1000);
let days = parseInt(Math.floor(totalSeconds / 86400)) + " day";
let hours = Math.floor(parseInt(Math.floor(totalSeconds / 3600)) % 24) + " hour";
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";
if (parseInt(hours.substring(0,3)) != 1) hours += "s";
if (parseInt(minutes.substring(0,3)) != 1) minutes += "s";
if (parseInt(seconds.substring(0,3)) != 1) seconds += "s";
let uptime = `${days}**, **${hours}**, **${minutes}**, **${seconds}`;
return uptime;
};
const version = ("DEV1.0")
const release = ("anitrox_dev")
const os = require("os")
const embed = {
"title": "<:NyabotInfo:697145463350231040> Information about projectanitrox",
"description": "Everything you've ever wanted to know about projectanitrox!",
"url": "https://discordapp.com",
"color": 11038194,
"footer": {
"icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
"text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021 "
},
"thumbnail": {
"url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png"
},
"fields": [
{
"name": "Bot Information",
"value": "** **"
},
{
"name": "Release Type",
"value": release
},
{
"name": "Release Version",
"value": version
},
{
"name": "Uptime",
"value": Uptime(client.uptime)
},
{
"name": "<:memory:793536677737136178> Bot Memory Usage",
"value": (Math.round(process.memoryUsage().heapUsed / 1024 / 1024 * 100) / 100) + " MiB" + ", Total Free Memory"
},
{
"name": "<:hostinfo:793529505263517747> Host Information",
"value": "** **"
},
{
"name": "<:hostinfo:793529505263517747> Host Uptime",
"value": Uptime(os.uptime() * 1000)
},
{
"name": "<:cpu:793672442056802354> CPU Type",
"value": process.arch
},
{
"name": "<:memory:793536677737136178> **System Memory Usage**",
"value": (Math.round(os.memoryUsage / 1024 / 1024 * 100) / 100) + " MiB of " + (Math.round(os.freemem / 1024 / 1024 * 100) / 100)
},
{
"name": "<:hostos:793866961675223090> OS Type",
"value": process.platform + " / " + os.version()
},
{
"name": "<:node:793537507018145813> Node.JS Version",
"value": process.version
},
{
"name": "<:Discord:793676263411679232> Discord API Ping",
"value": "tba" + " ms",
"inline": true
},
{
"name": "<:hostinfo:793529505263517747> Bot Ping",
"value": Math.round(client.ws.ping) + " ms",
"inline": true
},
{
"name": "<:NyabotInfo:697145463350231040> **Want more system information?**",
"value": "Run n!sysinfo for more detailed system information"
},
{
"name": "<:usersuccess:793885338250641469> **Special Thanks To**",
"value": "@OfficialTCGMatt for providing help with development"
}
]
};
message.channel.send({ embed });
}
};

12
commands/invite.js Normal file
View File

@ -0,0 +1,12 @@
module.exports = {
name: 'invite',
description: 'Sends invite to add the bot to a server.',
execute(client, message) {
if (message.author.id == 309427567004483586) {
message.channel.send('Link: http://bit.ly/39ZcG2K');
} else
message.channel.send("<:NyabotWarning:677296901590351919> ``Sorry, The bot is not public. Contact the dev if you'd like to have it in your server");
},
};

26
commands/reload.js Normal file
View File

@ -0,0 +1,26 @@
module.exports = {
name: 'reload',
description: 'Reloads a command',
args: true,
execute(client, message, args) {
const commandName = args[0].toLowerCase();
const command = message.client.commands.get(commandName)
|| message.client.commands.find(cmd => cmd.aliases && cmd.aliases.includes(commandName));
if (!command) {
return message.channel.send(`There is no command with name or alias \`${commandName}\`, ${message.author}!`);
}
delete require.cache[require.resolve(`./${command.name}.js`)];
try {
const newCommand = require(`./${command.name}.js`);
message.client.commands.set(newCommand.name, newCommand);
message.channel.send(`<:NyabotSuccess:697211376740859914> **Reloaded \`${command.name}\` successfully!**`);
console.log('User reloaded ${command.name}.')
} catch (error) {
console.error(error);
message.channel.send(`There was an error while reloading a command \`${command.name}\`:\n\`${error.message}\``);
}
},
};

37
commands/servers.js Normal file
View File

@ -0,0 +1,37 @@
module.exports = {
name: 'servers',
description: 'Lists what servers the bot is in',
execute(message) {
if (message.author.id == 309427567004483586) {
var i = 0, guildLength = 0, ownerData = {};
var fileToExportTo = "./servers.txt";
client.guilds.forEach(g=> {
guildLength = client.guilds.size;
var moreSquares = "";
for (var cnt = 0; cnt < g.name.length; cnt++) moreSquares = moreSquares + "=";
var content = "\n== " + g.name + " ==\nID: " + g.id + "\nOWNER: " + g.owner.user.tag + " (" + g.owner.id + ")\n===" + moreSquares + "===\n";
require("fs").appendFile(fileToExportTo, content, 'utf8', (err) => { if (err) { console.error(err); } });
if (ownerData[g.owner.id] == null)
ownerData[g.owner.id] = { "id": g.owner.id, "tag": g.owner.user.tag, "count": 1 };
else
ownerData[g.owner.id].count = (ownerData[g.owner.id].count + 1);
i++;
});
var morecontent = [];
for (let owner in ownerData) {
morecontent.push(ownerData[owner]["tag"] + " (" + ownerData[owner]["id"] + "): " + ownerData[owner]["count"]);
};
var content = "\n\n== FINAL COUNTS [as they appear they owned] ==\n" + morecontent.join("\n") + "\n==============================================\nExported: " + new Date().toString() + "\nData is as accurate as exported time & date.";
require("fs").appendFile(fileToExportTo, content, 'utf8', (err) => { if (err) { console.error(err); } });
if (i == guildLength)
message.channel.send(client.config.system.emotes.success + " Done.");
} else {
message.channel.send("<:NyabotDenied:697145462565896194> Access Denied, You must be bot owner to execute this command.");
}
}}

13
commands/shutdown.js Normal file
View File

@ -0,0 +1,13 @@
module.exports = {
name: 'shutdown',
description: '(Owner Only) Shuts down the bot.',
execute(client, message, args) {
if (message.author.id == 309427567004483586) {
message.channel.send("<a:NyabotWorking:697147309531594843> Shutting Down...").then
client.destroy()
.catch(console.error)
} else {
message.channel.send("<:NyabotDenied:697145462565896194> Access Denied, You must be bot owner to execute this command.");
}
}}

52
commands/userinfo.js Normal file
View File

@ -0,0 +1,52 @@
const { User } = require("discord.js");
module.exports = {
name: 'userinfo',
description: 'Shows information about you or another user.',
execute(client, message, args) {
const taggedUser = message.mentions.users.first();
//Actual code
const embed = {
"title": "<:userinfo:793885335498522685> **User Information**",
"description": "Everything you've ever wanted to know about **" + taggedUser.username + ("!**"),
"color": 11038194,
"footer": {
"icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
"text": "Anitrox © IDeletedSystem64 2018-2021. All Rights Reserved"
},
"thumbnail": {
"url": taggedUser.displayAvatarURL({ dynamic: true })
},
"fields": [
{
"name": "<:userquestion:793984046912110633> **Full Username**",
"value": taggedUser.username + ("#") + taggedUser.discriminator
},
{
"name": "<:userquestion:793984046912110633> User Status",
"value": taggedUser.status,
"value": taggedUser.presence
},
{
"name": "<:userquestion:793984046912110633> User ID",
"value": taggedUser.id
},
{
"name": "<:userquestion:793984046912110633> User Joined Discord",
"value": taggedUser.CreatedAt,
"inline": true
},
{
"name": "<:userquestion:793984046912110633> User Joined Server",
"value": "tba",
"inline": true
}
]
};
message.channel.send({ embed });
}
};