Update PTB to latest build (430)

PTB Release 2 (build 430) brings new fixes and features to PTB.
+ Updated to work with Discord.JS v12, Some things might be broken still.
+ ``userinfo`` now shows the user icon!
+ ``ping`` command has been finally added.
+ ``info`` now properly shows the bots ping.
+ probably more jazz its 1 am right now..
This commit is contained in:
Anthony M 2021-01-23 01:11:47 -06:00 committed by GitHub
commit 44f8018586
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 159 additions and 147 deletions

View File

@ -8,7 +8,7 @@ module.exports = {
const embed = { const embed = {
"title": "<a:SylvBonk:801185845847130113> Bonk", "title": "<a:SylvBonk:801185845847130113> Bonk",
"description": taggedUser + " You have been bonked by " + messageAuthor + "!", "description": "<@" + taggedUser + ">" + " You have been bonked by <@" + messageAuthor + ">!",
"color": 3272562, "color": 3272562,
"footer": { "footer": {
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
@ -18,9 +18,8 @@ module.exports = {
"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 }); message.channel.send({ embed: embed });
} }
} }

5
commands/config.json Normal file
View File

@ -0,0 +1,5 @@
{
"prefix": "n!",
"token": "NTQwOTQxNjc5MDQ2Mjk1NTUz.XotbnA.0hllsNlr9hWaepl3KwB1Bhh5TnA",
"ownerID": "309427567004483586"
}

View File

@ -7,7 +7,7 @@ module.exports = {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
const embed = { const embed = {
"title": ":heart: Cuddle", "title": ":heart: Cuddle",
"description": taggedUser + " You have been cuddled by " + messageAuthor + "!", "description": "<@" + taggedUser + ">" + " You have been cuddled by " + "<@" + messageAuthor + ">!",
"color": 8311585, "color": 8311585,
"footer": { "footer": {
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
@ -17,8 +17,8 @@ module.exports = {
"url": "https://media.tenor.com/images/7199fdd26fc2c07cd49a34fda3fc37a8/tenor.gif" "url": "https://media.tenor.com/images/7199fdd26fc2c07cd49a34fda3fc37a8/tenor.gif"
} }
} }
message.channel.send({ embed: embed }); message.channel.send({ embed: embed });
} }
} }

View File

@ -1,6 +1,6 @@
module.exports = { module.exports = {
name: 'eval', name: 'eval',
description: 'Runs js code', description: 'Runs js code',
execute(client, message, args) { execute(client, message, args) {
@ -9,14 +9,31 @@ module.exports = {
try { try {
const code = args.join(" "); const code = args.join(" ");
let evaled = eval(code); let evaled = eval(code);
if (typeof evaled !== "string") if (typeof evaled !== "string")
evaled = require("util").inspect(evaled); evaled = require("util").inspect(evaled);
message.channel.send(clean(evaled), {code:"xl"}); message.channel.send(clean(evaled), {code:"xl"});
} catch (err) { } catch (error) {
console.log("An error occurred while running that code!") const embed = {
"title": "<:NyabotError:697145462347661412> **Well that happened...**",
"color": 13632027,
"footer": {
"icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
"text": "Anitrox © IDeletedSystem64 2018-2021 All Rights Reserved."
},
"fields": [
{
"name": "**What Happened?**",
"value": "The command you tried to run failed to execute due to an error."
},
{
"name": "Error Info",
"value": error.message
}
]
};
message.channel.send({ embed });
} }
}; };
} }

View File

@ -7,7 +7,7 @@ module.exports = {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
const embed = { const embed = {
"title": "<a:ABlobCatHuggle:801232248035999784> Hug", "title": "<a:ABlobCatHuggle:801232248035999784> Hug",
"description": taggedUser + " You have been hugged by " + messageAuthor + "!", "description": "<@" + taggedUser + ">" + " You have been hugged by " + "<@" + messageAuthor + ">!",
"color": 8311585, "color": 8311585,
"footer": { "footer": {
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
@ -17,8 +17,8 @@ module.exports = {
"url": "https://i.imgur.com/r9aU2xv.gif?noredirect" "url": "https://i.imgur.com/r9aU2xv.gif?noredirect"
} }
} }
message.channel.send({ embed: embed }); message.channel.send({ embed: embed });
} }
} }

View File

@ -24,8 +24,8 @@ module.exports = {
const version = ("Public Test Buld 4, Based on dev Build 429") const version = ("dev build 429")
const release = ("anitrox_ptb") const release = ("anitrox_dev")
const os = require("os") const os = require("os")
const embed = { const embed = {

View File

@ -7,7 +7,7 @@ module.exports = {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
const embed = { const embed = {
"title": ":heart: Kiss", "title": ":heart: Kiss",
"description": taggedUser + " You have been kissed by " + messageAuthor + "!", "description": "<@" + taggedUser + ">" + " You have been kissed by <@" + messageAuthor + ">!",
"color": 8311585, "color": 8311585,
"footer": { "footer": {
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
@ -17,8 +17,8 @@ module.exports = {
"url": "https://i.pinimg.com/originals/e3/4e/31/e34e31123f8f35d5c771a2d6a70bef52.gif" "url": "https://i.pinimg.com/originals/e3/4e/31/e34e31123f8f35d5c771a2d6a70bef52.gif"
} }
} }
message.channel.send({ embed: embed }); message.channel.send({ embed: embed });
} }
} }

View File

@ -7,7 +7,7 @@ module.exports = {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
const 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 <@" + messageAuthor + ">!",
"color": 8311585, "color": 8311585,
"footer": { "footer": {
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
@ -17,8 +17,8 @@ module.exports = {
"url": "https://data.whicdn.com/images/279560594/original.gif" "url": "https://data.whicdn.com/images/279560594/original.gif"
} }
} }
message.channel.send({ embed: embed }); message.channel.send({ embed: embed });
} }
} }

View File

@ -7,7 +7,7 @@ module.exports = {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
const 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 <@" + messageAuthor + ">!",
"color": 8311585, "color": 8311585,
"footer": { "footer": {
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
@ -17,8 +17,8 @@ module.exports = {
"url": "https://media1.giphy.com/media/ARSp9T7wwxNcs/giphy.gif" "url": "https://media1.giphy.com/media/ARSp9T7wwxNcs/giphy.gif"
} }
} }
message.channel.send({ embed: embed }); message.channel.send({ embed: embed });
} }
} }

17
commands/ping.js Normal file
View File

@ -0,0 +1,17 @@
module.exports = {
name: "ping",
description: "Gets bot ping",
execute(client, message, args) {
const embed = {
"title": ":ping_pong: Ping",
"color": 15433939,
"fields": [
{
"name": "Ping is " + client.ws.ping + " ms",
"value": "If this is more than 1500ms there may be a problem!"
}
]
};
message.channel.send({ embed });
}
};

View File

@ -7,7 +7,7 @@ module.exports = {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
const embed = { const embed = {
"title": "👉 Poke!", "title": "👉 Poke!",
"description": taggedUser + " You have been poked by " + messageAuthor + "!", "description": "<@" + taggedUser + "> You have been poked by <@" + messageAuthor + ">!",
"color": 8311585, "color": 8311585,
"footer": { "footer": {
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
@ -17,8 +17,8 @@ module.exports = {
"url": "https://i.gifer.com/4IdP.gif" "url": "https://i.gifer.com/4IdP.gif"
} }
} }
message.channel.send({ embed: embed }); message.channel.send({ embed: embed });
} }
} }

View File

@ -20,7 +20,7 @@ module.exports = {
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(`There was an error while reloading a command \`${command.name}\`:\n\`${error.message}\``); message.channel.send(`There was an error while reloading \`${command.name}\`:\n\`${error.message}\``);
} }
}, },
}; };

View File

@ -3,15 +3,19 @@ module.exports = {
name: 'restart', name: 'restart',
description: '(Owner Only) Shuts down the bot.', description: '(Owner Only) Shuts down the bot.',
execute(client, message, args) { execute(client, message, args) {
const token=("<token>") const { token } = require('./config.json');
if (message.author.id == 309427567004483586) { if (message.author.id == 309427567004483586) {
message.channel.send("<a:NyabotWorking:697147309531594843> Restarting...").then message.channel.send("<a:NyabotWorking:697147309531594843> Restarting...").then
client.destroy() client.destroy()
.catch(console.error) .catch(console.error)
.then .then
console.log("Restarting!")
console.log("Getting ready")
console.log("Ready to start!")
client.login(token); client.login(token);
message.channel.send("<:NyabotSuccess:697211376740859914> Restart Successful") message.channel.send("<:NyabotSuccess:697211376740859914> Restart Successful")
console.log("All systems go")
} else { } else {
message.channel.send("<:NyabotDenied:697145462565896194> Access Denied, You must be bot owner to execute this command."); message.channel.send("<:NyabotDenied:697145462565896194> Access Denied, You must be bot owner to execute this command.");
} }
}} }}

View File

@ -7,7 +7,7 @@ module.exports = {
const taggedUser = message.mentions.users.first(); const taggedUser = message.mentions.users.first();
const embed = { const embed = {
"title": ":anger: Slap", "title": ":anger: Slap",
"description": taggedUser + " You have been slapped by " + messageAuthor + "!", "description": "<@" + taggedUser + "> You have been slapped by <@" + messageAuthor + ">!",
"color": 8311585, "color": 8311585,
"footer": { "footer": {
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
@ -17,8 +17,8 @@ module.exports = {
"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 }); message.channel.send({ embed: embed });
} }
} }

View File

@ -1,91 +1,42 @@
const { User } = require("discord.js"); module.exports = {
name: "userinfo",
module.exports = { description: "Gets info about an user, such as ID, Discord Join date and more.",
execute(client, message, args) {
name: 'userinfo',
description: 'Shows information about you or another user.', const taggedUser = message.mentions.users.first();
execute(client, message, args) { const embed = {
const taggedUser = message.mentions.users.first(); "title": "Everything you've ever wanted to know about " + taggedUser.username + "!",
"color": 172544,
"footer": {
//Actual code "icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
const embed = { "text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64"
"title": "<:userinfo:793885335498522685> **User Information**", },
"description": "Everything you've ever wanted to know about **" + taggedUser.username + ("!**"),
"color": 11038194, "thumbnail": {
"url": taggedUser.displayAvatarURL()
"footer": { },
"icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "fields": [
"text": "Anitrox © IDeletedSystem64 2018-2021. All Rights Reserved" {
}, "name": "Attention",
"thumbnail": { "value": "This command isn't yet finished, More info will be added soon!"
"url": taggedUser.displayAvatarURL({ dynamic: true }) },
}, {
"fields": [ "name": "Full Username",
{ "value": taggedUser.tag
"name": "<:userquestion:793984046912110633> **Full Username**", },
"value": taggedUser.username + ("#") + taggedUser.discriminator {
}, "name": "User ID",
{ "value": "``" + taggedUser.id + "``"
"name": "<:userquestion:793984046912110633> User Status", },
"value": taggedUser.status, {
"value": taggedUser.presence "name": "User Joined Discord",
}, "value": taggedUser.createdAt,
{ inline: true
"name": "<:userquestion:793984046912110633> User ID", },
"value": taggedUser.id
}, ]
{ };
"name": "<:userquestion:793984046912110633> User Joined Discord", message.channel.send({ embed: embed });
"value": taggedUser.CreatedAt, }
"inline": true }
},
{
"name": "<:userquestion:793984046912110633> User Joined Server",
"value": "tba",
"inline": true
}
]
};
message.channel.send({ embed });
}
};
=======
name: "userinfo",
description: "Gets info about an user, such as ID, Discord Join date and more.",
execute(client, message, args) {
const taggedUser = message.mentions.users.first();
const embed = {
"title": "Everything you've ever wanted to know about " + taggedUser.username + "!",
"color": 172544,
"footer": {
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
"text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64"
},
"thumbnail": {
"url": "https://cdn.discordapp.com/embed/avatars/0.png"
},
"fields": [
{
"name": "Full Username",
"value": taggedUser.tag
},
{
"name": "User ID",
"value": "``" + taggedUser.id + "``"
},
{
"name": "User Joined Discord",
"value": "This will be added in a future release",
inline: true
},
]
};
message.channel.send({ embed: embed });
}
}

18
package-lock.json generated
View File

@ -1,5 +1,5 @@
{ {
"name": "nyabotcanary", "name": "projectanitrox",
"version": "1.0.0", "version": "1.0.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
@ -10,7 +10,8 @@
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"discord.js": "^11.5.1", "discord.js": "^11.5.1",
"node-os-utils": "^1.3.2" "node-os-utils": "^1.3.2",
"require-all": "^3.0.0"
} }
}, },
"node_modules/@discordjs/uws": { "node_modules/@discordjs/uws": {
@ -94,6 +95,14 @@
"resolved": "https://registry.npmjs.org/prism-media/-/prism-media-0.0.4.tgz", "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-0.0.4.tgz",
"integrity": "sha512-dG2w7WtovUa4SiYTdWn9H8Bd4JNdei2djtkP/Bk9fXq81j5Q15ZPHYSwhUVvBRbp5zMkGtu0Yk62HuMcly0pRw==" "integrity": "sha512-dG2w7WtovUa4SiYTdWn9H8Bd4JNdei2djtkP/Bk9fXq81j5Q15ZPHYSwhUVvBRbp5zMkGtu0Yk62HuMcly0pRw=="
}, },
"node_modules/require-all": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/require-all/-/require-all-3.0.0.tgz",
"integrity": "sha1-Rz1JcEvjEBFc4ST3c4Ox69hnExI=",
"engines": {
"node": ">= 0.8"
}
},
"node_modules/snekfetch": { "node_modules/snekfetch": {
"version": "3.6.4", "version": "3.6.4",
"resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.6.4.tgz", "resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.6.4.tgz",
@ -153,6 +162,11 @@
"resolved": "https://registry.npmjs.org/prism-media/-/prism-media-0.0.4.tgz", "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-0.0.4.tgz",
"integrity": "sha512-dG2w7WtovUa4SiYTdWn9H8Bd4JNdei2djtkP/Bk9fXq81j5Q15ZPHYSwhUVvBRbp5zMkGtu0Yk62HuMcly0pRw==" "integrity": "sha512-dG2w7WtovUa4SiYTdWn9H8Bd4JNdei2djtkP/Bk9fXq81j5Q15ZPHYSwhUVvBRbp5zMkGtu0Yk62HuMcly0pRw=="
}, },
"require-all": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/require-all/-/require-all-3.0.0.tgz",
"integrity": "sha1-Rz1JcEvjEBFc4ST3c4Ox69hnExI="
},
"snekfetch": { "snekfetch": {
"version": "3.6.4", "version": "3.6.4",
"resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.6.4.tgz", "resolved": "https://registry.npmjs.org/snekfetch/-/snekfetch-3.6.4.tgz",

View File

@ -1,11 +1,12 @@
{ {
"name": "nyabotcanary", "name": "projectanitrox",
"version": "1.0.0", "version": "1.0.0",
"description": "Discord Bot Based on Discord.JS", "description": "Discord Bot Based on Discord.JS",
"main": "main.js", "main": "start.js",
"dependencies": { "dependencies": {
"discord.js": "^11.5.1", "discord.js": "^11.5.1",
"node-os-utils": "^1.3.2" "node-os-utils": "^1.3.2",
"require-all": "^3.0.0"
}, },
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"

View File

@ -5,6 +5,7 @@ const { prefix, token } = require('./config.json');
const os = require("os") const os = require("os")
const version = "Test Release 21"; const version = "Test Release 21";
const release = "anitrox_unstable" const release = "anitrox_unstable"
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();
@ -19,7 +20,10 @@ const activities_list = [
"with the tea machine", "with the tea machine",
"with Borked Computers", "with Borked Computers",
"on Happy's main PC- wait shoot she's coming", "on Happy's main PC- wait shoot she's coming",
"btw I use Debian linux" "btw I use Debian linux",
"Watching you",
"Running " + release + " Version " + version,
"in Incognito Mode- wait what"
]; ];
const footicon = "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png" const footicon = "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png"
const footer = "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64" const footer = "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64"
@ -38,9 +42,9 @@ client.once('ready', () => {
console.log('All systems go.'); console.log('All systems go.');
}); });
setInterval(() => { setInterval(() => {
const index = Math.floor(Math.random() * (activities_list.length - 1) + 1); const index = Math.floor(Math.random() * (activities_list.length - 1) + 1);
client.user.setActivity(activities_list[index]); client.user.setActivity(activities_list[index]);
}, 20000); }, 20000);
client.on('message', message => { client.on('message', message => {
if (!message.content.startsWith(prefix) || message.author.bot) return; if (!message.content.startsWith(prefix) || message.author.bot) return;
@ -54,7 +58,7 @@ client.on('message', message => {
client.commands.get(command).execute(client, message, args); client.commands.get(command).execute(client, message, args);
} catch (error) { } catch (error) {
const embed = { const embed = {
"title": "<:NyabotError:697145462347661412> **An error occurred!**", "title": "<:NyabotError:697145462347661412> **Well that happened...**",
"color": 13632027, "color": 13632027,
"footer": { "footer": {
"icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png", "icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
@ -63,7 +67,7 @@ client.on('message', message => {
"fields": [ "fields": [
{ {
"name": "**What Happened?**", "name": "**What Happened?**",
"value": "The command you tried to run failed to execute" "value": "The command you tried to run failed to execute due to an error."
}, },
{ {
"name": "Error Info", "name": "Error Info",
@ -75,4 +79,4 @@ client.on('message', message => {
} }
}); });
client.login(token); client.login(token);