Compare commits
252 commits
v1.prerele
...
dev
Author | SHA1 | Date | |
---|---|---|---|
0ae194f099 | |||
0a683479f9 | |||
16b17cc0a7 | |||
5ab1c60f72 | |||
|
9b52e791a6 | ||
|
631e4987d6 | ||
|
38bc50d8a1 | ||
|
21cd1239e3 | ||
|
2c45f65a39 | ||
|
3713ba9cf2 | ||
|
6a2ecb14c3 | ||
|
99ed45f2fe | ||
|
cefdc65df1 | ||
|
1db1d5353b | ||
|
15739f7917 | ||
|
54993de287 | ||
|
052dc251a1 | ||
|
18d3ea778d | ||
|
2815e3283b | ||
|
977f6e2a21 | ||
|
fec4dc45ef | ||
|
cb621c21ec | ||
|
f132421357 | ||
|
0681b8cf91 | ||
|
c3e58abfc1 | ||
|
c484d727f5 | ||
|
d74cb0b1ad | ||
|
ce61a4607e | ||
|
d06d121bea | ||
|
8d9e3937e6 | ||
|
7b718c43aa | ||
|
f56dc3ff37 | ||
|
dab0aa4799 | ||
|
44f71c0e2c | ||
|
3496f1610e | ||
|
18134aa424 | ||
|
c89d8e9dce | ||
|
a2dd3e0ca5 | ||
|
a8d34c9990 | ||
|
3c41e47df1 | ||
|
67fd0343db | ||
|
69ebf0cec4 | ||
|
fb6556463b | ||
|
7f5428a31b | ||
|
3d09aee2df | ||
|
b817c6b997 | ||
|
5af776f4c2 | ||
|
d9206fe7fa | ||
|
24c9e9277a | ||
|
f33bfce68c | ||
|
d650ae3dcc | ||
|
0fa4c4da21 | ||
|
0f72bed119 | ||
|
1da0d738ec | ||
|
f3e2fd893d | ||
|
425143b109 | ||
|
3a33e4df9c | ||
|
367a797851 | ||
|
6065dcb24d | ||
|
0caa0ab2da | ||
|
77acc594b2 | ||
|
ba8643b537 | ||
|
ca3e1dd37e | ||
|
95a7df98b3 | ||
|
3a5f1ce2d2 | ||
|
b7c4cb011e | ||
|
67b126ccff | ||
|
de90322304 | ||
|
55626d314e | ||
|
ca47208da7 | ||
|
cb1eb0a5bd | ||
|
0f78055a66 | ||
|
428dc5261e | ||
|
950f00cbd0 | ||
|
479792d2db | ||
|
e0685cf7ae | ||
|
85f2bb252e | ||
|
a0b8b2d5b7 | ||
|
b33280a417 | ||
|
ca77b63c97 | ||
|
f7f332d654 | ||
|
d527cab9f5 | ||
|
e1056c4d20 | ||
|
09d14f7a7d | ||
|
7541b53492 | ||
|
2661631c10 | ||
|
a50b45e784 | ||
|
dca559b365 | ||
|
43f73c5403 | ||
|
77517f6a16 | ||
|
e378121fbe | ||
|
917d6a8c19 | ||
|
af6b091cda | ||
|
8d154b5e8a | ||
|
f67548a159 | ||
|
f5f94a1026 | ||
|
bd2a028370 | ||
|
c6170b5caf | ||
|
a740aadbdc | ||
|
f54d22beb7 | ||
|
8f2c8493bd | ||
|
b7f03b872c | ||
|
b866641fac | ||
|
2ba1c54cf5 | ||
|
da08c6fe8c | ||
|
91bb98b0b9 | ||
|
256646d082 | ||
|
a2ec5405a2 | ||
|
4772ab8e0f | ||
|
564e644807 | ||
|
8cffe5c5a6 | ||
|
c392f3a759 | ||
|
f3c6bb0339 | ||
|
584a073ee0 | ||
|
0f6851adf8 | ||
|
dd6a5948ef | ||
|
95a458efc9 | ||
|
a8409b4828 | ||
|
8c431e95c7 | ||
|
5a7040767e | ||
|
7d10366f01 | ||
|
9c28f9f228 | ||
|
f921a67608 | ||
|
984aaecc53 | ||
|
37e0603ebf | ||
|
ab2cd6bd7d | ||
|
e3318d26c7 | ||
|
e315feb737 | ||
|
4b254b8d4e | ||
|
0bc4277389 | ||
|
8c9c083d26 | ||
|
fb3f26cdd4 | ||
|
2189417343 | ||
|
9182daacb8 | ||
|
b8bdeb5278 | ||
|
f07fad7951 | ||
|
9276975a45 | ||
|
9388496662 | ||
|
2bd2c95e39 | ||
|
01515377b4 | ||
|
35605fd9a9 | ||
|
05ed4d9c5c | ||
|
22821dbd55 | ||
|
74066f666e | ||
|
0de4408797 | ||
|
fc0235a1ce | ||
|
db5c9f4f55 | ||
|
3fd6a893dd | ||
|
34115f41cf | ||
|
388535bb3a | ||
|
e89b2fae5c | ||
|
aaa85f31a9 | ||
|
e0a7891b4a | ||
|
ee7b194d83 | ||
|
d96c8abb6c | ||
|
b1d763d425 | ||
|
31ee6be7f6 | ||
|
570edf6da5 | ||
|
aaae385763 | ||
|
4312a2e075 | ||
|
752e6728bb | ||
|
f5f9cdf0e2 | ||
|
9eb8bd3d35 | ||
|
e861e702c0 | ||
|
3b33f51c65 | ||
|
55be4eb4f8 | ||
|
268ceb9c4a | ||
|
976ba50c38 | ||
|
88ac2d4ab0 | ||
|
2206af796a | ||
|
ada0848db0 | ||
|
7bfbe0a021 | ||
|
4d51f2b5a7 | ||
|
66ef27b8e6 | ||
|
3651553256 | ||
|
6c10d32fd5 | ||
|
25971ab8cb | ||
|
333357e1c9 | ||
|
c2e677d308 | ||
|
b5b0f160e4 | ||
|
ae64d600af | ||
|
422338c851 | ||
|
cab232f101 | ||
|
d2a648ceb5 | ||
|
4f53a83b32 | ||
|
e4a64c51bf | ||
|
7520fc74d2 | ||
|
9dbab772fc | ||
|
978ccc3231 | ||
|
17969f62a8 | ||
|
26d8a4f60d | ||
|
71f582403c | ||
|
d47a280bad | ||
|
1ce2063071 | ||
|
8f1583b8da | ||
|
b05a7335f8 | ||
|
b2f169e05f | ||
|
bdd45a7e4f | ||
|
db045972c1 | ||
|
809284e8f8 | ||
|
8e67021586 | ||
|
78b409c3c1 | ||
|
21bc961574 | ||
|
f6cbe2ebd6 | ||
|
81a0a53ee0 | ||
|
9940954ae9 | ||
|
2be9ee8b69 | ||
|
165587b3cb | ||
|
2c129c0e61 | ||
|
057b8f66bd | ||
|
493680d038 | ||
|
9ac012b995 | ||
|
418878981f | ||
|
801539e4ac | ||
|
a7e38a2da1 | ||
|
7d976e38e7 | ||
|
ef894d4102 | ||
|
4d5ee92a56 | ||
|
8ba415977d | ||
|
157b948416 | ||
|
cf28333a94 | ||
|
6dcb2279c1 | ||
|
a08582d6d2 | ||
|
e1bef32cde | ||
|
2d43f697be | ||
|
0cab557e10 | ||
|
b1e98f7f19 | ||
|
2e3434f8f4 | ||
|
f59984c7dc | ||
|
51a00b82ba | ||
|
25ea95bbd8 | ||
|
af3b23f843 | ||
|
6a454c22b1 | ||
|
0757e1f44a | ||
|
a64b0658b8 | ||
|
fac74a75b7 | ||
|
50984b9ddc | ||
|
4f2e5af93b | ||
|
78c0211992 | ||
|
06e9797a5f | ||
|
2595b786f4 | ||
|
892d95c5b7 | ||
|
e2d940e930 | ||
|
8d062d8a93 | ||
|
ed6302855a | ||
|
5888467bf5 | ||
|
0c1ced9859 | ||
|
95467d565c | ||
|
90b68c72c7 | ||
|
755dffbc4f | ||
|
fb06397443 | ||
|
8a83ec40df |
53 changed files with 4112 additions and 1493 deletions
3
.env.example
Normal file
3
.env.example
Normal file
|
@ -0,0 +1,3 @@
|
|||
TOKEN="EVERYTHINGS SO FCKED AND IM TIRED OF BEING SCARED"
|
||||
OWNERID="SO LETS GET OUT AND FCK UP EQUESTRIA"
|
||||
# Do !!NOT!! share this file once filled out with anybody, Doing so can leak your Bot Token which will give anyone access to your bot!
|
17
.eslintrc.json
Normal file
17
.eslintrc.json
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"commonjs": true,
|
||||
"es2021": true
|
||||
},
|
||||
"extends": [
|
||||
"standard"
|
||||
],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": "latest"
|
||||
},
|
||||
"rules": {
|
||||
"no-eval": "off",
|
||||
"semi": [1, "always"]
|
||||
}
|
||||
}
|
27
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
27
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve Anitrox for you, for everybody. ❤️
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here, Such as version if applicable (ex: you host Anitrox yourself)
|
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this Anitrox
|
||||
title: ''
|
||||
labels: Suggestion
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
9
.gitignore
vendored
Normal file
9
.gitignore
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
#VSCode configurations.
|
||||
.vscode
|
||||
|
||||
# NPM/Yarn stuff.
|
||||
node_modules/
|
||||
|
||||
# Let's not leak any tokens now... That would be very bad
|
||||
config.json
|
||||
.env
|
9
LICENSE.md
Normal file
9
LICENSE.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Released under MIT License
|
||||
|
||||
Copyright (c) 2023 Sophie Marie
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
43
README.md
43
README.md
|
@ -1,4 +1,39 @@
|
|||
# Anitrox Dev Branch
|
||||
# anitrox_unstable
|
||||
This is for the ultra-fresh builds of Anitrox and is **very** unstable. It is only avaliable in Anitrox Central.
|
||||
# These builds are UNSUPPORTED and you will not be able to recieve support if there's a problem. It's best you wait for a new build if you're having a problem.
|
||||
# the Anitrox project was formally discontinued on January 30th, 2024.
|
||||
Anitrox was shut down on October 23rd, 2023. Development is now permenantly ceased and support is no longer available.
|
||||
You will no longer be able to make merge requests, or open bug reports on the bot.
|
||||
|
||||
## Building on from here.
|
||||
You can still fork the bot, and do whatever you'd like with it. We'll be shifting from the GPLv2 license to the MIT license with this change.
|
||||
|
||||
## Why now?
|
||||
I've been becoming increasingly frustrated and unhappy with Discord as a service and platform, and have no desire in putting any more time into something for a platform I quite despise at this point. If you look at the last commits, There hasn't even *been* any active development for on going on months at this point. I've also been shifting my focus on programming towards other things, which has also been contributing to the lack of further development.
|
||||
|
||||
# Thank you.
|
||||
Thank you to everyone who contributed to the bot, weather you contributed with code, a bug report or helped work out an issue, **thank you.**
|
||||
|
||||
#
|
||||
## Get started!
|
||||
To get started, You'll need Node.JS and NPM
|
||||
|
||||
You can get these through either your Linux distributions package manager, or if you are on Windows, by [clicking here.](https://nodejs.org/en/)
|
||||
|
||||
## Install those dependencies!
|
||||
|
||||
Run ``npm install`` and wait for it to download dependencies\
|
||||
*For development: ESLint extension in your editor of choice*
|
||||
|
||||
## Configure yo bot!
|
||||
|
||||
Get or make your Discord bot token from [The Discord developer portal](https://discord.com/developers/applications), and rename ``.env.example`` to ``.env``. Set the ``TOKEN=""`` to the token you got from Discord
|
||||
|
||||
Then grab your Discord User ID and put it in ``OWNERID=""``, This tells the bot who owns it
|
||||
|
||||
⚠️ **WARNING**: This gives access to the bots controls, such as restart/shutdown, and eval! Make sure you use your own ID and not somebody elses.
|
||||
|
||||
## Get this party started!
|
||||
|
||||
Run ``npm start`` to start the bot!
|
||||
|
||||
|
||||
<img src="https://i.pinimg.com/originals/ba/e4/de/bae4de2fa4f778f874c84928b8e19203.png" alt="Pinkie Pie blasting a party cannon" height="auto" width="50%">
|
||||
|
||||
|
|
|
@ -1,51 +1,47 @@
|
|||
module.exports = {
|
||||
name: '8ball',
|
||||
description: 'Ask Anitrox a question, any question! and they will answer it!',
|
||||
execute(client, message, args) {
|
||||
const answers = [
|
||||
"Heck no!",
|
||||
"Are you crazy!? No!",
|
||||
"Don't even think about it.",
|
||||
"No! You might bork something!",
|
||||
"Heck yeah",
|
||||
"YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE",
|
||||
"Definitely!",
|
||||
"Go for it! :smile:"
|
||||
// This should have a 50/50 amount of yes and no answers for equality even though anitrox doesn't seem to care 🙃
|
||||
]
|
||||
const index = Math.floor(Math.random() * (answers.length - 1) + 1);
|
||||
var question = args.slice(0).join(" ")
|
||||
var answer = (answers[index]);
|
||||
console.log(args);
|
||||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
|
||||
if (!question) {
|
||||
const embed = {
|
||||
"title": "<:AnitroxError:809651936563429416> Well that happened...",
|
||||
"description": "You need to specify a question!",
|
||||
"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"
|
||||
}
|
||||
module.exports = {
|
||||
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Ask Anitrox a question, any question! and they will answer it!',
|
||||
options: [{
|
||||
name: 'question',
|
||||
description: 'The question to ask Anitrox',
|
||||
required: true,
|
||||
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) {
|
||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getString('question')));
|
||||
},
|
||||
|
||||
handle (client, config, user, question) {
|
||||
const index = Math.floor(Math.random() * config.answers.length);
|
||||
const answer = config.answers[index];
|
||||
const avatarURL = user.displayAvatarURL();
|
||||
|
||||
if (!question) return client.generateErrorMessage('You need to ask a question!', avatarURL);
|
||||
|
||||
return {
|
||||
embeds: [{
|
||||
title: ':8ball: 8Ball',
|
||||
description: `Your amazing question: **${question}**`,
|
||||
color: 9442302,
|
||||
footer: {
|
||||
icon_url: avatarURL,
|
||||
text: config.footerTxt
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: 'Answer',
|
||||
value: `${answer}`
|
||||
}
|
||||
}
|
||||
const embed = {
|
||||
"title": ":8ball: Anitrox 8 Ball",
|
||||
"description": "Your question: **" + question + "**",
|
||||
"color": 9442302,
|
||||
"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": "🤔 My Answer",
|
||||
"value": answer
|
||||
}
|
||||
]
|
||||
};
|
||||
message.channel.send({ embed });
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
52
commands/about.js
Normal file
52
commands/about.js
Normal file
|
@ -0,0 +1,52 @@
|
|||
const Uptime = require('../functions/uptime.js');
|
||||
const os = require('os');
|
||||
const osu = require('node-os-utils');
|
||||
module.exports = {
|
||||
name: 'about',
|
||||
description: 'About this bot, as well as the system its running on',
|
||||
options: [],
|
||||
|
||||
async parseMessage (client, config, message) {
|
||||
await message.channel.send(this.handle(client, config, message.author));
|
||||
},
|
||||
|
||||
async parseInteraction (client, config, interaction) {
|
||||
await interaction.reply(this.handle(client, config, interaction.user));
|
||||
},
|
||||
|
||||
handle (client, config, user) {
|
||||
return {
|
||||
embeds: [{
|
||||
title: `<:AnitroxInfo:809651936831733791> Information about ${client.user.username}`,
|
||||
description: `Everything you've ever wanted to know about your favorite bot, ${client.user.username}!`,
|
||||
color: 9442302,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
},
|
||||
thumbnail: {
|
||||
url: client.user.displayAvatarURL()
|
||||
},
|
||||
fields: [
|
||||
{ name: '<:anitrox:831193012699791361> Bot Information', value: '** **' },
|
||||
{ name: 'Bot Name', value: `${client.user.tag}`, 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: 'Release Type', value: config.release, inline: true },
|
||||
{ name: 'Version', value: config.build, inline: true },
|
||||
{ name: ':gear: Bot Process Information', value: '** **' },
|
||||
{ name: '<:memory:997565609179107369> Bot Memory Usage', value: `${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)} MiB`, inline: true },
|
||||
{ name: ':timer: Bot Uptime', value: Uptime(client.uptime), inline: true },
|
||||
{ name: ':one: Total Servers', value: `** **${client.guilds.cache.size}`, inline: true },
|
||||
{ name: '<:hostinfo:997565639352926250> System Information', value: '** **' },
|
||||
{ name: `${((process.platform === 'linux') ? '<:linux_xenia_trans:1060380032788353144>' : '<:windows:997919047511453696>')} System Platform`, value: process.platform, inline: true },
|
||||
{ name: `${((process.platform === 'linux') ? ':gear: Kernel Version' : ':gear: System Version')}`, value: os.release(), inline: true },
|
||||
{ name: ':timer: System Uptime', value: Uptime(os.uptime() * 1000), inline: true },
|
||||
{ name: '<:cpu:997565592028598282> System CPU Architecture', value: os.arch(), inline: true },
|
||||
{ name: '<:cpu:997565592028598282> System CPU Model', value: osu.cpu.model(), inline: true },
|
||||
{ name: '<:nodejs:998609124453531740> Node.js Version', value: process.version, inline: true }
|
||||
]
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
|
@ -1,26 +0,0 @@
|
|||
const { Message } = require('discord.js');
|
||||
const fs = require('fs');
|
||||
module.exports = {
|
||||
name: 'addstatus',
|
||||
description: 'Adds a new custom status to Anitrox',
|
||||
async execute(message, args) {
|
||||
const embed = {
|
||||
"title": "<:AnitroxSuccess:809651936819019796> Status Added",
|
||||
"color": 3585665,
|
||||
"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": "Successfully added status!",
|
||||
"value": "Added status " + args.slice(0,2)
|
||||
}
|
||||
]
|
||||
};
|
||||
const statuses = JSON.parse((await fs.promises.readFile('./statuses.json')).toString())
|
||||
statuses.push(args.slice(0,2))
|
||||
await fs.promises.writeFile('./statuses.json', JSON.stringify(ranges));
|
||||
Message.channel.send( {embed} )
|
||||
}
|
||||
}
|
|
@ -1,21 +1,42 @@
|
|||
module.exports = {
|
||||
name: "avatar",
|
||||
description: "Gets a users avatar.",
|
||||
execute(client, message, args) {
|
||||
const user = message.mentions.users.first()
|
||||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
|
||||
const embed = {
|
||||
"title": ":frame_photo: " + user.username + "'s Avatar",
|
||||
"description": "Here is " + user.username + "'s avatar!",
|
||||
"color": 9442302,
|
||||
"footer": {
|
||||
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||
"text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021"
|
||||
},
|
||||
"image": {
|
||||
"url": user.displayAvatarURL()
|
||||
}
|
||||
};
|
||||
message.channel.send({ embed });
|
||||
}
|
||||
}
|
||||
module.exports = {
|
||||
|
||||
name: require('path').parse(__filename).name,
|
||||
description: "Gets a user's avatar.",
|
||||
options: [{
|
||||
name: 'user',
|
||||
description: 'Another user',
|
||||
required: false,
|
||||
type: ApplicationCommandOptionType.User
|
||||
},
|
||||
{
|
||||
name: 'userid',
|
||||
description: "Another user's ID",
|
||||
required: false,
|
||||
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) {
|
||||
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));
|
||||
},
|
||||
|
||||
handle (_, config, user, target) {
|
||||
return {
|
||||
embeds: [{
|
||||
title: `:frame_photo: ${target.username}'s Beautiful Profile Picture!`,
|
||||
description: `[Profile picture link (Mobile users, tap here!)](${target.displayAvatarURL({ dynamic: true })})`,
|
||||
color: 9442302,
|
||||
image: { url: target.displayAvatarURL({ dynamic: true }) },
|
||||
footer: { icon_url: user.displayAvatarURL(), text: config.footerTxt }
|
||||
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
const { GuildMember } = require("discord.js");
|
||||
|
||||
module.exports = {
|
||||
name: "ban",
|
||||
description: "Bans an user, This requires that you have ``BAN_MEMBERS`` or ``ADMINISTRATOR``",
|
||||
execute(client, message, args) {
|
||||
const banembed = {
|
||||
"title": "<:usersuccess:793885338250641469> User Banned",
|
||||
"description": "User ${user.tag} was banned!",
|
||||
"color": 5736060,
|
||||
"fields": [
|
||||
{
|
||||
"name": "Reason",
|
||||
"value": "reason"
|
||||
}
|
||||
]
|
||||
};
|
||||
const user = message.mentions.users.first();
|
||||
if (user) {
|
||||
const member = message.guild.member(user);
|
||||
if (member) {
|
||||
member
|
||||
.ban({
|
||||
reason: 'reason',
|
||||
})
|
||||
.then(() =>
|
||||
|
||||
message.channel.send("bye lmao"));
|
||||
|
||||
}
|
||||
}}}
|
|
@ -1,44 +1,40 @@
|
|||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
|
||||
name: "bonk",
|
||||
description: "Bonks an user!",
|
||||
execute(client, message, args) {
|
||||
const messageAuthor = message.author
|
||||
const taggedUser = message.mentions.users.first();
|
||||
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"
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Bonks a user!',
|
||||
options: [{
|
||||
name: 'user',
|
||||
description: 'The user to bonk',
|
||||
required: true,
|
||||
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) {
|
||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||
},
|
||||
|
||||
handle (client, config, user, target) {
|
||||
if (!target) return client.generateErrorMessage('You need to @mention a user!', user.displayAvatarURL());
|
||||
|
||||
return {
|
||||
embeds: [{
|
||||
title: '<a:SylvBonk:801185845847130113> Bonk',
|
||||
description: `${target} You have been bonked by ${user}!`,
|
||||
color: 9442302,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
},
|
||||
"fields": [
|
||||
{
|
||||
"name": "Well that happened...",
|
||||
"value": "You need to @mention an user!"
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
if(!taggedUser) {
|
||||
return message.channel.send({ embed: errorembed});
|
||||
// Checks if a user was mentioned. If not, returns error message.
|
||||
}
|
||||
|
||||
const embed = {
|
||||
"title": "<a:SylvBonk:801185845847130113> Bonk",
|
||||
"description": "<@" + taggedUser + ">" + " You have been bonked by <@" + messageAuthor + ">!",
|
||||
"color": 9442302,
|
||||
"footer": {
|
||||
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||
"text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021"
|
||||
},
|
||||
"image": {
|
||||
"url": "https://cdn.discordapp.com/attachments/793537380330111028/801194481549312060/HappyBONK.gif"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
message.channel.send({ embed: embed });
|
||||
}
|
||||
}
|
||||
image: {
|
||||
url: 'https://cdn.discordapp.com/attachments/793537380330111028/801194481549312060/HappyBONK.gif'
|
||||
}
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,33 +1,40 @@
|
|||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
//a
|
||||
name: "cheese",
|
||||
description: "Cheese an user, or run just ``n!cheese`` for a surprise :eyes:",
|
||||
execute(client, message, args) {
|
||||
const messageAuthor = message.author
|
||||
const taggedUser = message.mentions.users.first();
|
||||
//---------------------------------
|
||||
|
||||
|
||||
if(!taggedUser) {
|
||||
return message.channel.send("*slams cheese on desk* Cheese. https://www.youtube.com/watch?v=Or4IE8fkpn4");
|
||||
|
||||
}
|
||||
|
||||
|
||||
const embed = {
|
||||
"title": ":cheese: Cheesed",
|
||||
"description": "<@" + taggedUser + ">" + " You got cheesed by " + "<@" + messageAuthor + ">!",
|
||||
"color": 16312092,
|
||||
"footer": {
|
||||
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||
"text": "Made with ❤ in Illinois | Anitrox by IDeletedSystem64"
|
||||
},
|
||||
"image": {
|
||||
"url": "https://cdn.discordapp.com/attachments/803658122299572255/812867714368536636/R06325af354168febcafd96b8328b7590.png"
|
||||
}
|
||||
}
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Cheese a user, or run with no arguments for a surprise :eyes:',
|
||||
options: [{
|
||||
name: 'user',
|
||||
description: 'The user to cheese',
|
||||
required: false,
|
||||
type: ApplicationCommandOptionType.User
|
||||
}],
|
||||
|
||||
async parseMessage (client, config, message) {
|
||||
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
|
||||
},
|
||||
|
||||
message.channel.send({ embed: embed });
|
||||
}
|
||||
}
|
||||
async parseInteraction (client, config, interaction) {
|
||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||
},
|
||||
|
||||
handle (_, config, user, target) {
|
||||
if (!target) return '*slams cheese on desk*\n**Cheese.** https://www.youtube.com/watch?v=Or4IE8fkpn4';
|
||||
|
||||
return {
|
||||
embeds: [{
|
||||
title: ':cheese: Cheesed',
|
||||
description: `${target} You have been cheesed by ${user}!`,
|
||||
color: 16312092,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
},
|
||||
image: {
|
||||
url: 'https://cdn.discordapp.com/attachments/803658122299572255/812867714368536636/R06325af354168febcafd96b8328b7590.png'
|
||||
}
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
42
commands/choose.js
Normal file
42
commands/choose.js
Normal file
|
@ -0,0 +1,42 @@
|
|||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Give some lines of input, and get one back at random',
|
||||
options: [...Array(10).keys()].map(i => ({
|
||||
name: `option${i + 1}`,
|
||||
description: 'Another option',
|
||||
required: i === 0,
|
||||
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) {
|
||||
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)));
|
||||
},
|
||||
|
||||
handle (client, config, user, options) {
|
||||
if (!options.length) return client.generateErrorMessage('You need to provide some input!', user.displayAvatarURL());
|
||||
|
||||
const answer = options[Math.floor(Math.random() * options.length)];
|
||||
return {
|
||||
embeds: [{
|
||||
title: 'I have made my decision:',
|
||||
description: answer,
|
||||
color: 8311585,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
}
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
49
commands/contributors.js
Normal file
49
commands/contributors.js
Normal file
|
@ -0,0 +1,49 @@
|
|||
module.exports = {
|
||||
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Attributions to users who have worked on Anitrox!',
|
||||
options: [],
|
||||
|
||||
async parseMessage (_, config, message) {
|
||||
await message.channel.send(this.handle(config, message.author));
|
||||
},
|
||||
|
||||
async parseInteraction (_, config, interaction) {
|
||||
await interaction.reply(this.handle(config, interaction.user));
|
||||
},
|
||||
|
||||
handle (config, user) {
|
||||
return {
|
||||
embeds: [{
|
||||
title: 'Contributors',
|
||||
description: 'Links to check out our contributors!',
|
||||
color: 52508,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
},
|
||||
thumbnail: {
|
||||
url: 'https://cdn.discordapp.com/emojis/809651812323164192.webp?size=128&quality=lossless'
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
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)\n <:discord:1057053513210937444> [Check out his Discord community!](https://port.chuu.sh/)'
|
||||
},
|
||||
{
|
||||
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/Aisuruneko)\n :robot: [Check out TheCodingBot!](https://github.com/NetroCorp/TheCodingBot)\n :globe_with_meridians: [Check out Netro Corp!](https://netrocorp.net)"
|
||||
},
|
||||
{
|
||||
name: 'Foxinatel',
|
||||
value: 'Foxi has made massive improvements to Anitrox, such as improving error handling, and much more!\n<:GitHub:778165439477841981> [Check out his code!](https://github.com/foxinatel)'
|
||||
},
|
||||
{
|
||||
name: 'Zaeroses',
|
||||
value: 'Zaeroses created the Xenia icon Ive used in about when a user hosts Anitrox on Linux based systems. Its been modified to have a transflag-colored glow in the background. \n<:fediverse:1060390228881322004> [Check out their Mastodon! (chitter.xyz)](https://chitter.xyz/@Zaeroses)\n<:GitHub:778165439477841981> [Checkout their code!](https://github.com/Zaeroses)'
|
||||
}
|
||||
]
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
|
@ -1,39 +1,48 @@
|
|||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
|
||||
const gifchoices = [
|
||||
'https://i.pinimg.com/originals/4d/89/d7/4d89d7f963b41a416ec8a55230dab31b.gif',
|
||||
'https://media1.tenor.com/images/6d73b0a9cadef5310be4b6160d2f959a/tenor.gif?itemid=12099823',
|
||||
'https://media.tenor.com/images/2636cf3c8152631b4630bf71757a4afa/tenor.gif',
|
||||
'https://i.imgur.com/JiFpT5E.gif'
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
|
||||
name: "cuddle",
|
||||
description: "Cuddle an user!",
|
||||
execute(client, message, args) {
|
||||
const messageAuthor = message.author
|
||||
const taggedUser = message.mentions.users.first();
|
||||
|
||||
// --------------------------------------
|
||||
const gifchoices = [
|
||||
"https://i.pinimg.com/originals/4d/89/d7/4d89d7f963b41a416ec8a55230dab31b.gif",
|
||||
"https://media1.tenor.com/images/6d73b0a9cadef5310be4b6160d2f959a/tenor.gif?itemid=12099823",
|
||||
"https://media.tenor.com/images/2636cf3c8152631b4630bf71757a4afa/tenor.gif",
|
||||
"https://i.imgur.com/JiFpT5E.gif"
|
||||
];
|
||||
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1);
|
||||
var gif = (gifchoices[index]);
|
||||
// ---------------------------------------
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Cuddle a user!',
|
||||
options: [{
|
||||
name: 'user',
|
||||
description: 'The user to cuddle',
|
||||
required: true,
|
||||
type: ApplicationCommandOptionType.User
|
||||
}],
|
||||
|
||||
if(!taggedUser) {
|
||||
return message.channel.send("<:AnitroxError:809651936563429416> You need to specify an user!")
|
||||
}
|
||||
const embed = {
|
||||
"title": ":heart: Cuddle",
|
||||
"description": "<@" + taggedUser + ">" + " You have been cuddled by " + "<@" + messageAuthor + ">!",
|
||||
"color": 9442302,
|
||||
"footer": {
|
||||
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||
"text": "Made with ❤ in Illinois | Anitrox by IDeletedSystem64"
|
||||
},
|
||||
"image": {
|
||||
"url": gif
|
||||
}
|
||||
}
|
||||
async parseMessage (client, config, message) {
|
||||
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
|
||||
},
|
||||
|
||||
async parseInteraction (client, config, interaction) {
|
||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||
},
|
||||
|
||||
message.channel.send({ embed: embed });
|
||||
}
|
||||
}
|
||||
handle (client, config, user, target) {
|
||||
if (!target) return client.generateErrorMessage('You need to @mention a user!', user.displayAvatarURL());
|
||||
|
||||
const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)];
|
||||
return {
|
||||
embeds: [{
|
||||
title: ':heart: Cuddle',
|
||||
description: `${target} You have been cuddled by ${user}!`,
|
||||
color: 9442302,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
},
|
||||
image: {
|
||||
url: gif
|
||||
}
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,40 +1,53 @@
|
|||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
const { inspect } = require('util');
|
||||
|
||||
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);
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'handles JS code',
|
||||
options: [{
|
||||
name: 'code',
|
||||
description: 'The string to evaluate',
|
||||
required: true,
|
||||
type: ApplicationCommandOptionType.String
|
||||
}],
|
||||
|
||||
if (typeof evaled !== "string")
|
||||
evaled = require("util").inspect(evaled);
|
||||
async parseMessage (client, config, message, args) {
|
||||
await message.channel.send(this.handle(client, config, message.author, args.join(' ')));
|
||||
},
|
||||
|
||||
message.channel.send(clean(evaled), {code:"xl"});
|
||||
} catch (error) {
|
||||
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 });
|
||||
}
|
||||
async parseInteraction (client, config, interaction) {
|
||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getString('code')));
|
||||
},
|
||||
|
||||
handle (client, config, user, code) {
|
||||
if (user.id === process.env.OWNERID) {
|
||||
try {
|
||||
const evaled = inspect(eval(code));
|
||||
// await message.channel.send(evaled, { code: 'xl' });
|
||||
return `\`\`\`js\n${evaled}\n\`\`\``;
|
||||
} catch (error) {
|
||||
return {
|
||||
embeds: [{
|
||||
title: '<:AnitroxError:809651936563429416> **Something went wrong! **',
|
||||
color: 13632027,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: '**What Happened?**',
|
||||
value: 'The command you tried to run failed to handle due to an error.'
|
||||
},
|
||||
{
|
||||
name: 'Error Info',
|
||||
value: error.message
|
||||
}
|
||||
]
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
102
commands/help.js
102
commands/help.js
|
@ -1,44 +1,64 @@
|
|||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
|
||||
name: 'help',
|
||||
description: '',
|
||||
execute(client, message, args) {
|
||||
|
||||
const messageAuthor = message.author
|
||||
const embed = {
|
||||
"title": "<:NyabotInfo:697145463350231040> **HELP** " + messageAuthor.username + " **THE BOT IS ON FIRE!** ",
|
||||
"color": 9442302,
|
||||
"description": "More commands are soon to come, stay tuned!",
|
||||
"footer": {
|
||||
"text": "Made with ❤ in Illinois | Anitrox by IDeletedSystem64"
|
||||
},
|
||||
"fields": [
|
||||
{
|
||||
"name": "Utility Commands",
|
||||
"value": "`help` ``info`` ``userinfo`` ``ping`` ``invite`` ``avatar``"
|
||||
},
|
||||
{
|
||||
"name": "Server Management Commands",
|
||||
"value": "`setnick`"
|
||||
},
|
||||
{
|
||||
"name": "Action Commands",
|
||||
"value": "`hug` `poke` `bonk` `slap` `pat` `kiss` `lick` `cuddle` `nom` `leskiss` `snuggle`"
|
||||
},
|
||||
{
|
||||
"name": "**...or is the bot actually on fire? Come here for help and support!**",
|
||||
"value": "bit.ly/anitrox-help"
|
||||
},
|
||||
{
|
||||
"name": "**Or you can view the bot progress, known issues, and planned features!**",
|
||||
"value": "bit.ly/anitrox-trello"
|
||||
},
|
||||
{
|
||||
"name": "<:AnitroxInfo:809651936831733791> **The bot isn't yet fully finished. There's more to come! if I don't rewrite from scratch that is 😛**"
|
||||
}
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Get help on anything from commands, to what the bot does! just not your homework..',
|
||||
options: [{
|
||||
name: 'help',
|
||||
description: 'The command you want information on',
|
||||
required: false,
|
||||
type: ApplicationCommandOptionType.String
|
||||
}],
|
||||
async parseMessage (client, config, message, args) {
|
||||
await message.channel.send(this.handle(client, config, message.author, args[0]));
|
||||
},
|
||||
|
||||
]
|
||||
};
|
||||
message.channel.send({ embed });
|
||||
}
|
||||
};
|
||||
async parseInteraction (client, config, interaction) {
|
||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getString('help')));
|
||||
},
|
||||
|
||||
handle (client, config, user, command) {
|
||||
if (!command) {
|
||||
return {
|
||||
embeds: [{
|
||||
color: 9442302,
|
||||
title: `:question: SEYMOUR! THE ${client.user.username} IS ON FIRE!`,
|
||||
description: `Run ${config.prefix}help for more information on each command.`,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
},
|
||||
fields: [
|
||||
{ name: 'Commands', value: client.commands.map(command => command.name).join(', ') }
|
||||
]
|
||||
}]
|
||||
};
|
||||
}
|
||||
|
||||
const cmdName = command;
|
||||
const cmd = client.commands.get(cmdName);
|
||||
console.log(cmd.options.map);
|
||||
if (!cmd) {
|
||||
return client.generateErrorMessage(`${cmdName} is not a valid command. Run ${config.prefix}help for a command list!`);
|
||||
}
|
||||
return {
|
||||
embeds: [{
|
||||
color: 9442302,
|
||||
title: ':question: Command Help',
|
||||
description: `Everything you've ever wanted to know about ${cmdName}!`,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
},
|
||||
fields: [
|
||||
{ name: 'Command Name', value: `${cmdName}`, inline: true },
|
||||
{ name: 'Command Description', value: cmd.description, inline: true },
|
||||
{ name: 'Command Options', value: cmd.options.map(option => option.name).join('\n') || 'None', inline: true },
|
||||
{ name: 'Command Option Description', value: cmd.options.map(option => option.description).join('\n') || 'None', inline: true }
|
||||
// { name: 'Command Option Required?', value: cmd.options.map(option => option.required) ? 'Yes' : 'No' }
|
||||
]
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,54 +1,49 @@
|
|||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
|
||||
const gifchoices = [
|
||||
'https://cdn.discordapp.com/attachments/803658122299572255/807670647920001044/hug2.gif',
|
||||
'https://cdn.discordapp.com/attachments/803658122299572255/807670797983285268/hug1.gif',
|
||||
'https://cdn.discordapp.com/attachments/803658122299572255/807670951113392178/gif6.gif',
|
||||
'https://cdn.discordapp.com/attachments/803658122299572255/808834617494208532/gif3new.gif',
|
||||
'https://cdn.discordapp.com/attachments/803658122299572255/807671126376972308/gif4.gif'
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
|
||||
name: "hug",
|
||||
description: "Hugs an user!",
|
||||
execute(client, message, args) {
|
||||
const messageAuthor = message.author
|
||||
const taggedUser = message.mentions.users.first();
|
||||
const gifchoices = [
|
||||
"https://cdn.discordapp.com/attachments/803658122299572255/807670647920001044/hug2.gif",
|
||||
"https://cdn.discordapp.com/attachments/803658122299572255/807670797983285268/hug1.gif",
|
||||
"https://cdn.discordapp.com/attachments/803658122299572255/807670951113392178/gif6.gif",
|
||||
"https://cdn.discordapp.com/attachments/803658122299572255/808834617494208532/gif3new.gif",
|
||||
"https://cdn.discordapp.com/attachments/803658122299572255/807671126376972308/gif4.gif"
|
||||
];
|
||||
//---------------------------------
|
||||
const errorembed = {
|
||||
"title": "<:AnitroxError:809651936563429416> Error",
|
||||
"color": 9442302,
|
||||
"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!"
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Hugs a user!',
|
||||
options: [{
|
||||
name: 'user',
|
||||
description: 'The user to hug',
|
||||
required: true,
|
||||
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) {
|
||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||
},
|
||||
|
||||
handle (client, config, user, target) {
|
||||
if (!target) return client.generateErrorMessage('You need to @mention a user!', user.displayAvatarURL());
|
||||
|
||||
const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)];
|
||||
return {
|
||||
embeds: [{
|
||||
title: '<a:ABlobCatHuggle:801232248035999784> Hug',
|
||||
description: `${target} You have been hugged by ${user}!`,
|
||||
color: 8311585,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
},
|
||||
image: {
|
||||
url: gif
|
||||
}
|
||||
]
|
||||
}]
|
||||
};
|
||||
|
||||
if(!taggedUser) {
|
||||
return message.channel.send({ embed: errorembed});
|
||||
// Checks if a user was mentioned. If not, returns error message.
|
||||
}
|
||||
|
||||
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 0.4);
|
||||
var gif = (gifchoices[index]);
|
||||
const embed = {
|
||||
"title": "<a:ABlobCatHuggle:801232248035999784> Hug",
|
||||
"description": "<@" + taggedUser + ">" + " You have been hugged by " + "<@" + messageAuthor + ">!",
|
||||
"color": 8311585,
|
||||
"footer": {
|
||||
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||
"text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021"
|
||||
},
|
||||
"image": {
|
||||
"url": gif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
message.channel.send({ embed: embed });
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
103
commands/info.js
103
commands/info.js
|
@ -1,103 +0,0 @@
|
|||
|
||||
module.exports = {
|
||||
|
||||
name: 'info',
|
||||
description: 'Shows bot and host information',
|
||||
execute(client, message, args,) {
|
||||
const { build, release } = require('../config.json');
|
||||
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 os = require("os")
|
||||
var osu = require('node-os-utils')
|
||||
var cpu = osu.cpu
|
||||
const embed = {
|
||||
"title": "<:AnitroxInfo:809651936831733791> Information about Anitrox",
|
||||
"description": "Everything you've ever wanted to know about Anitrox!",
|
||||
"color": 9442302,
|
||||
"footer": {
|
||||
"icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||
"text": "Made with ❤ in Illinois | Anitrox by IDeletedSystem64"
|
||||
},
|
||||
"thumbnail": {
|
||||
"url": ("https://cdn.discordapp.com/avatars/576805923964715018/20f9b2815850dbbebd6d858308c90330.webp")
|
||||
},
|
||||
"fields": [
|
||||
{
|
||||
"name": "Bot Information",
|
||||
"value": "** **"
|
||||
},
|
||||
{
|
||||
"name": "Release Type",
|
||||
"value": release
|
||||
},
|
||||
{
|
||||
"name": "Release Version",
|
||||
"value": build
|
||||
},
|
||||
{
|
||||
"name": "Uptime",
|
||||
"value": Uptime(client.uptime)
|
||||
},
|
||||
{
|
||||
"name": "<:memory:793536677737136178> Bot Memory Usage",
|
||||
"value": (Math.round(process.memoryUsage().heapUsed / 1024 / 1024 * 100) / 100) + " MiB"
|
||||
},
|
||||
{
|
||||
"name": "<:hostinfo:793529505263517747> Host Information",
|
||||
"value": "** **"
|
||||
},
|
||||
{
|
||||
"name": "<:hostinfo:793529505263517747> Host Uptime",
|
||||
"value": Uptime(os.uptime() * 1000)
|
||||
},
|
||||
{
|
||||
"name": "<:cpu:793672442056802354> CPU Type",
|
||||
"value": process.arch + ", " + cpu.model()
|
||||
},
|
||||
|
||||
{
|
||||
"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": "<:usersuccess:793885338250641469> **Special Thanks To**",
|
||||
"value": "@OfficialTCGMatt for providing help with development\n @chuu_shi Allowing me to host Anitrox on his server"
|
||||
}
|
||||
|
||||
]
|
||||
};
|
||||
message.channel.send({ embed });
|
||||
|
||||
}
|
||||
};
|
|
@ -1,40 +1,36 @@
|
|||
|
||||
module.exports = {
|
||||
|
||||
name: 'invite',
|
||||
description: 'Sends invite to add the bot to a server.',
|
||||
execute(client, message) {
|
||||
const embed = {
|
||||
"title": "Add Anitrox to your Server",
|
||||
"description": "Weather you want stable, or that squeaky clean fresh PTB build, we gotchu.",
|
||||
"color": 9442302,
|
||||
"footer": {
|
||||
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||
"text": "Made with ❤ in Illinois | Anitrox by IDeletedSystem64"
|
||||
},
|
||||
"thumbnail": {
|
||||
"url": "https://cdn.discordapp.com/attachments/803658122299572255/814352905394061322/anitroxaddsrvr.png"
|
||||
},
|
||||
"fields": [
|
||||
{
|
||||
"name": "Anitrox",
|
||||
"value": "This is the stable main build. \n https://discord.com/oauth2/authorize?client_id=576805923964715018&scope=bot&permissions=8"
|
||||
},
|
||||
{
|
||||
"name": "Anitrox PTB (Public Test Build)",
|
||||
"value": "This is the PTB build, which has new features as they are pushed out. and is generally stable. \n https://discord.com/oauth2/authorize?client_id=489125054261755925&scope=bot&permissions=66186303"
|
||||
},
|
||||
{
|
||||
"name": "Anitrox Dev (Unstable)",
|
||||
"value": "This isn't availiable for invite, though it is availiable on the support server."
|
||||
},
|
||||
{
|
||||
"name": "Need help?",
|
||||
"value": "You can join the support server here: bit.ly/anitrox-help"
|
||||
}
|
||||
|
||||
]
|
||||
};
|
||||
message.channel.send({ embed });
|
||||
},
|
||||
};
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Add Anitrox to your beautiful server!',
|
||||
options: [],
|
||||
|
||||
async parseMessage (client, config, message) {
|
||||
await message.channel.send(this.handle(client, config, message.author));
|
||||
},
|
||||
|
||||
async parseInteraction (client, config, interaction) {
|
||||
await interaction.reply(this.handle(client, config, interaction.user));
|
||||
},
|
||||
|
||||
handle (_, config, user) {
|
||||
return {
|
||||
embeds: [{
|
||||
title: 'Add Anitrox to your Server!',
|
||||
description: 'Weather you want stable, or that squeaky clean fresh PTB build, we gotchu.',
|
||||
color: 9442302,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
},
|
||||
thumbnail: {
|
||||
url: 'https://cdn.discordapp.com/attachments/803658122299572255/814352905394061322/anitroxaddsrvr.png'
|
||||
},
|
||||
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 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: 'Support', value: 'Come join the Anitrox Support Server, for support with Anitrox, help setting up your own self-hosted Anitrox and more!\n [Anitrox Support Server](https://discord.gg/grebRGsBZ3)' }
|
||||
]
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
101
commands/kiss.js
101
commands/kiss.js
|
@ -1,60 +1,49 @@
|
|||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
|
||||
const gifchoices = [
|
||||
'https://cdn.discordapp.com/attachments/803658122299572255/807671954055626812/kiss5.gif',
|
||||
'https://cdn.discordapp.com/attachments/803658122299572255/807671956236140554/kiss2.gif',
|
||||
'https://cdn.discordapp.com/attachments/803658122299572255/807671964599713862/kiss1.gif',
|
||||
'https://cdn.discordapp.com/attachments/803658122299572255/807671971168387082/kiss4.gif',
|
||||
'https://cdn.discordapp.com/attachments/803658122299572255/807672017217781840/kiss3.gif'
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
|
||||
name: "kiss",
|
||||
description: "Kisses an user!",
|
||||
execute(client, message, args) {
|
||||
const messageAuthor = message.author
|
||||
const taggedUser = message.mentions.users.first();
|
||||
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Kisses a user!',
|
||||
options: [{
|
||||
name: 'user',
|
||||
description: 'The user to kiss',
|
||||
required: true,
|
||||
type: ApplicationCommandOptionType.User
|
||||
}],
|
||||
|
||||
// --------------------------------------
|
||||
const gifchoices = [
|
||||
"https://cdn.discordapp.com/attachments/803658122299572255/807671954055626812/kiss5.gif",
|
||||
"https://cdn.discordapp.com/attachments/803658122299572255/807671956236140554/kiss2.gif",
|
||||
"https://cdn.discordapp.com/attachments/803658122299572255/807671964599713862/kiss1.gif",
|
||||
"https://cdn.discordapp.com/attachments/803658122299572255/807671971168387082/kiss4.gif",
|
||||
"https://cdn.discordapp.com/attachments/803658122299572255/807672017217781840/kiss3.gif"
|
||||
];
|
||||
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1);
|
||||
var gif = (gifchoices[index]);
|
||||
// ---------------------------------------
|
||||
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"
|
||||
async parseMessage (client, config, message) {
|
||||
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
|
||||
},
|
||||
|
||||
async parseInteraction (client, config, interaction) {
|
||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||
},
|
||||
|
||||
handle (client, config, user, target) {
|
||||
if (!target) return client.generateErrorMessage('You need to @mention a user!', user.displayAvatarURL());
|
||||
|
||||
const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)];
|
||||
return {
|
||||
embeds: [{
|
||||
title: ':heart: Kiss',
|
||||
description: `${target} You have been kissed by ${user}!`,
|
||||
color: 9442302,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
},
|
||||
"fields": [
|
||||
{
|
||||
"name": "Well that happened...",
|
||||
"value": "You need to @mention an user!"
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
if(!taggedUser) {
|
||||
return message.channel.send({ embed: errorembed});
|
||||
}
|
||||
|
||||
if(!taggedUser) {
|
||||
return message.channel.send({ embed: errorembed});
|
||||
// Checks if a user was mentioned. If not, returns error message.
|
||||
}
|
||||
const embed = {
|
||||
"title": ":heart: Kiss",
|
||||
"description": "<@" + taggedUser + ">" + ", You have been kissed by <@" + messageAuthor + ">!",
|
||||
"color": 9442302,
|
||||
"footer": {
|
||||
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||
"text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021"
|
||||
},
|
||||
"image": {
|
||||
"url": gif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
message.channel.send({ embed: embed });
|
||||
}
|
||||
}
|
||||
image: {
|
||||
url: gif
|
||||
}
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,70 +1,59 @@
|
|||
const { Message } = require("discord.js");
|
||||
const { execute } = require("./info");
|
||||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
|
||||
const gifchoices = [
|
||||
'https://cdn.discordapp.com/attachments/793537380330111028/803833954750038066/gif5.gif',
|
||||
'https://cdn.discordapp.com/attachments/793537380330111028/803833959338475550/gif12.gif',
|
||||
'https://cdn.discordapp.com/attachments/793537380330111028/803834034135236628/gif9.gif',
|
||||
'https://cdn.discordapp.com/attachments/793537380330111028/803834082034843658/gif18.gif',
|
||||
'https://cdn.discordapp.com/attachments/793537380330111028/803834094063583302/gif8.gif',
|
||||
'https://cdn.discordapp.com/attachments/793537380330111028/803834099869024296/gif10.gif',
|
||||
'https://cdn.discordapp.com/attachments/793537380330111028/803834132035665950/gif16.gif',
|
||||
'https://cdn.discordapp.com/attachments/793537380330111028/803834146413084713/gif13.gif',
|
||||
'https://cdn.discordapp.com/attachments/793537380330111028/803834249425715210/gif22.gif',
|
||||
'https://cdn.discordapp.com/attachments/793537380330111028/803834323898990592/gif11.gif',
|
||||
'https://cdn.discordapp.com/attachments/793537380330111028/803834328848793650/gif14.gif',
|
||||
'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/803834514269798460/gif19.gif'
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
|
||||
name: "leskiss",
|
||||
description: "Lesbian kiss <:lesbian:803831629428686849>",
|
||||
execute(client, message, args) {
|
||||
const messageAuthor = message.author
|
||||
const taggedUser = message.mentions.users.first();
|
||||
// --------------------------------------
|
||||
const gifchoices = [
|
||||
"https://cdn.discordapp.com/attachments/793537380330111028/803833954750038066/gif5.gif",
|
||||
"https://cdn.discordapp.com/attachments/793537380330111028/803833959338475550/gif12.gif",
|
||||
"https://cdn.discordapp.com/attachments/793537380330111028/803834034135236628/gif9.gif",
|
||||
"https://cdn.discordapp.com/attachments/793537380330111028/803834082034843658/gif18.gif",
|
||||
"https://cdn.discordapp.com/attachments/793537380330111028/803834094063583302/gif8.gif",
|
||||
"https://cdn.discordapp.com/attachments/793537380330111028/803834099869024296/gif10.gif",
|
||||
"https://cdn.discordapp.com/attachments/793537380330111028/803834132035665950/gif16.gif",
|
||||
"https://cdn.discordapp.com/attachments/793537380330111028/803834146413084713/gif13.gif",
|
||||
"https://cdn.discordapp.com/attachments/793537380330111028/803834249425715210/gif22.gif",
|
||||
"https://cdn.discordapp.com/attachments/793537380330111028/803834323898990592/gif11.gif",
|
||||
"https://cdn.discordapp.com/attachments/793537380330111028/803834328848793650/gif14.gif",
|
||||
"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/803834514269798460/gif19.gif"
|
||||
|
||||
];
|
||||
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1.75);
|
||||
var gif = (gifchoices[index]);
|
||||
// ---------------------------------------
|
||||
const errorembed = {
|
||||
"title": "<:AnitroxError:809651936563429416> Error",
|
||||
"color": 9442302,
|
||||
"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"
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Lesbian kiss <:lesbian:803831629428686849>',
|
||||
options: [{
|
||||
name: 'user',
|
||||
description: 'The user to kiss',
|
||||
required: true,
|
||||
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) {
|
||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||
},
|
||||
|
||||
handle (client, config, user, target) {
|
||||
if (!target) return client.generateErrorMessage('You need to @mention a user!', user.displayAvatarURL());
|
||||
|
||||
const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)];
|
||||
return {
|
||||
embeds: [{
|
||||
title: ':heart: <:lesbian:803831629428686849> Kiss',
|
||||
description: `${target} You have been kissed by ${user}!`,
|
||||
color: 8311585,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
},
|
||||
"fields": [
|
||||
{
|
||||
"name": "Well that happened...",
|
||||
"value": "You need to @mention an user!"
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
if(!taggedUser) {
|
||||
return message.channel.send({ embed: errorembed});
|
||||
// Checks if a user was mentioned. If not, returns error message.
|
||||
}
|
||||
|
||||
|
||||
const embed = {
|
||||
"title": ":heart: <:lesbian:803831629428686849> Kiss",
|
||||
"description": "<@" + taggedUser + ">" + " You have been kissed by <@" + messageAuthor + ">! <:lesbian:803831629428686849>",
|
||||
"color": 8311585,
|
||||
"footer": {
|
||||
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||
"text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021"
|
||||
},
|
||||
"image": {
|
||||
"url": gif
|
||||
image: {
|
||||
url: gif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
message.channel.send({ embed: embed });
|
||||
}
|
||||
}
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,58 +1,47 @@
|
|||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
|
||||
const gifchoices = [
|
||||
'https://cdn.discordapp.com/attachments/803658122299572255/805314244123951114/cef569820773b0f5d54ee34cfa18e1f8.gif',
|
||||
'https://cdn.lowgif.com/full/2027501b8fa5225c-.gif',
|
||||
'https://i.gifer.com/36Nx.gif',
|
||||
'https://media.tenor.com/images/e8bbe712a5f36bbe9545930894b08bf9/tenor.gif'
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
|
||||
name: "lick",
|
||||
description: "Licks an user!",
|
||||
execute(client, message, args) {
|
||||
const messageAuthor = message.author
|
||||
const taggedUser = message.mentions.users.first();
|
||||
//---------------------------------------------------
|
||||
// --------------------------------------
|
||||
const gifchoices = [
|
||||
"https://cdn.discordapp.com/attachments/803658122299572255/805314244123951114/cef569820773b0f5d54ee34cfa18e1f8.gif",
|
||||
"https://cdn.lowgif.com/full/2027501b8fa5225c-.gif",
|
||||
"https://i.gifer.com/36Nx.gif",
|
||||
"https://media.tenor.com/images/e8bbe712a5f36bbe9545930894b08bf9/tenor.gif"
|
||||
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Licks a user!',
|
||||
options: [{
|
||||
name: 'user',
|
||||
description: 'The user to lick',
|
||||
required: true,
|
||||
type: ApplicationCommandOptionType.User
|
||||
}],
|
||||
|
||||
];
|
||||
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1);
|
||||
var gif = (gifchoices[index]);
|
||||
// ---------------------------------------
|
||||
//---------------------------------------------------
|
||||
const errorembed = {
|
||||
"title": "<:AnitroxError:809651936563429416> Error",
|
||||
"color": 9442302,
|
||||
"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"
|
||||
async parseMessage (client, config, message) {
|
||||
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
|
||||
},
|
||||
"fields": [
|
||||
{
|
||||
"name": "Well that happened...",
|
||||
"value": "You need to @mention an user!"
|
||||
}
|
||||
]
|
||||
|
||||
async parseInteraction (client, config, interaction) {
|
||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||
},
|
||||
|
||||
handle (client, config, user, target) {
|
||||
if (!target) return client.generateErrorMessage('You need to @mention a user!', user.displayAvatarURL());
|
||||
const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)];
|
||||
return {
|
||||
embeds: [{
|
||||
title: '<a:LeafeonLick:806396195089154058> Lick',
|
||||
description: `${target} You have been licked by ${user}!`,
|
||||
color: 8311585,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
},
|
||||
image: {
|
||||
url: gif
|
||||
}
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
if(!taggedUser) {
|
||||
return message.channel.send({ embed: errorembed});
|
||||
// Checks if a user was mentioned. If not, returns error message.
|
||||
}
|
||||
|
||||
const embed = {
|
||||
"title": "<a:LeafeonLick:806396195089154058> Lick",
|
||||
"description": "<@" + taggedUser + "> You have been licked by <@" + messageAuthor + ">!",
|
||||
"color": 8311585,
|
||||
"footer": {
|
||||
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||
"text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021"
|
||||
},
|
||||
"image": {
|
||||
"url": "https://cdn.discordapp.com/attachments/803658122299572255/805314244123951114/cef569820773b0f5d54ee34cfa18e1f8.gif"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
message.channel.send({ embed: embed });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,57 +1,48 @@
|
|||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
|
||||
const gifchoices = [
|
||||
'https://i.imgur.com/Ns1RBzX.gif',
|
||||
'https://cdn.lowgif.com/full/2027501b8fa5225c-.gif',
|
||||
'https://i.gifer.com/36Nx.gif',
|
||||
'https://media.tenor.com/images/e8bbe712a5f36bbe9545930894b08bf9/tenor.gif'
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
|
||||
name: "nom",
|
||||
description: "Noms an user!",
|
||||
execute(client, message, args) {
|
||||
const messageAuthor = message.author
|
||||
const taggedUser = message.mentions.users.first();
|
||||
|
||||
// --------------------------------------
|
||||
const gifchoices = [
|
||||
"https://i.imgur.com/Ns1RBzX.gif",
|
||||
"https://cdn.lowgif.com/full/2027501b8fa5225c-.gif",
|
||||
"https://i.gifer.com/36Nx.gif",
|
||||
"https://media.tenor.com/images/e8bbe712a5f36bbe9545930894b08bf9/tenor.gif"
|
||||
|
||||
|
||||
];
|
||||
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 1);
|
||||
var gif = (gifchoices[index]);
|
||||
// ---------------------------------------
|
||||
const errorembed = {
|
||||
"title": "<:AnitroxError:809651936563429416> Error",
|
||||
"color": 9442302,
|
||||
"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) {
|
||||
return message.channel.send({ embed: errorembed});
|
||||
// Checks if a user was mentioned. If not, returns error message.
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Noms a user!',
|
||||
options: [{
|
||||
name: 'user',
|
||||
description: 'The user to nom',
|
||||
required: true,
|
||||
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) {
|
||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||
},
|
||||
|
||||
handle (client, config, user, target) {
|
||||
if (!target) return client.generateErrorMessage('You need to @mention a user!', user.displayAvatarURL());
|
||||
|
||||
const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)];
|
||||
return {
|
||||
embeds: [{
|
||||
title: '<:BlobNomBlob:801241117919805510> Nom',
|
||||
description: `${target} You have been nommed by ${user}!`,
|
||||
color: 8311585,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
},
|
||||
image: {
|
||||
url: gif
|
||||
}
|
||||
|
||||
const embed = {
|
||||
"title": "<:BlobNomBlob:801241117919805510> Nom",
|
||||
"description": "<@" + taggedUser + "> You have been nommed by <@" + messageAuthor + ">!",
|
||||
"color": 8311585,
|
||||
"footer": {
|
||||
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||
"text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021"
|
||||
},
|
||||
"image": {
|
||||
"url": gif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
message.channel.send({ embed: embed });
|
||||
}
|
||||
}
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
module.exports = {
|
||||
name: 'opensource',
|
||||
description: 'Attributions to open source components used by Anitrox',
|
||||
execute(client, message, args){
|
||||
const embed = {
|
||||
"title": "Component Attribution",
|
||||
"description": "Some parts of Anitrox are using open source code, and their attributions are avaliable here!",
|
||||
"color": 52508,
|
||||
"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"
|
||||
},
|
||||
"thumbnail": {
|
||||
"url": "https://cdn.discordapp.com/attachments/803658122299572255/838854256471703602/793885335498522685.png"
|
||||
},
|
||||
"fields": [
|
||||
{
|
||||
"name": "Discord.JS",
|
||||
"value": "[Check out the Discord.JS project on GitHub](https://github.com/discordjs/discord.js/)"
|
||||
},
|
||||
{
|
||||
"name": "The Anitrox Project",
|
||||
"value": "[Check out Anitrox on GitHub](https://github.com/IDeletedSystem64/anitrox)"
|
||||
},
|
||||
{
|
||||
"name": "You",
|
||||
"value": "Using and supporting the Anitrox Project, thank you! ❤"
|
||||
}
|
||||
]
|
||||
};
|
||||
message.channel.send({ embed });
|
||||
}}
|
|
@ -1,56 +1,46 @@
|
|||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
|
||||
const gifchoices = [
|
||||
'https://cdn.discordapp.com/attachments/803658122299572255/803708174293008474/tenor.gif',
|
||||
'https://community.gamepress.gg/uploads/default/original/3X/0/a/0a762099c5ad6de9ca5f13dd22a7e45884a99eb3.gif',
|
||||
'https://media1.giphy.com/media/ARSp9T7wwxNcs/giphy.gif'
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
|
||||
name: "pat",
|
||||
description: "Pats an user!",
|
||||
execute(client, message, args) {
|
||||
const messageAuthor = message.author
|
||||
const taggedUser = message.mentions.users.first();
|
||||
|
||||
// --------------------------------------
|
||||
const gifchoices = [
|
||||
"https://cdn.discordapp.com/attachments/803658122299572255/803708174293008474/tenor.gif",
|
||||
"https://community.gamepress.gg/uploads/default/original/3X/0/a/0a762099c5ad6de9ca5f13dd22a7e45884a99eb3.gif",
|
||||
"https://media1.giphy.com/media/ARSp9T7wwxNcs/giphy.gif"
|
||||
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Pats a user!',
|
||||
options: [{
|
||||
name: 'user',
|
||||
description: 'The user to pat',
|
||||
required: true,
|
||||
type: ApplicationCommandOptionType.User
|
||||
}],
|
||||
|
||||
];
|
||||
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 2);
|
||||
var gif = (gifchoices[index]);
|
||||
// ---------------------------------------
|
||||
const errorembed = {
|
||||
"title": "<:AnitroxError:809651936563429416> Error",
|
||||
"color": 9442302,
|
||||
"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"
|
||||
async parseMessage (client, config, message) {
|
||||
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
|
||||
},
|
||||
|
||||
async parseInteraction (client, config, interaction) {
|
||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||
},
|
||||
|
||||
handle (client, config, user, target) {
|
||||
if (!target) return client.generateErrorMessage('You need to @mention a user!', user.displayAvatarURL());
|
||||
const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)];
|
||||
return {
|
||||
embeds: [{
|
||||
title: '<:pats:801238281286713355> Pat',
|
||||
description: `${target} You have been patted by ${user}!`,
|
||||
color: 8311585,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
},
|
||||
"fields": [
|
||||
{
|
||||
"name": "Well that happened...",
|
||||
"value": "You need to @mention an user!"
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
if(!taggedUser) {
|
||||
return message.channel.send({ embed: errorembed});
|
||||
// Checks if a user was mentioned. If not, returns error message.
|
||||
}
|
||||
|
||||
const embed = {
|
||||
"title": "<:pats:801238281286713355> Pat",
|
||||
"description": "<@" + taggedUser + "> You have been patted by <@" + messageAuthor + ">!",
|
||||
"color": 8311585,
|
||||
"footer": {
|
||||
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||
"text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021"
|
||||
},
|
||||
"image": {
|
||||
"url": gif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
message.channel.send({ embed: embed });
|
||||
}
|
||||
}
|
||||
image: {
|
||||
url: gif
|
||||
}
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,17 +1,31 @@
|
|||
module.exports = {
|
||||
name: "ping",
|
||||
description: "Gets bot ping",
|
||||
execute(client, message, args) {
|
||||
const embed = {
|
||||
"title": ":ping_pong: Ping",
|
||||
"color": 9442302,
|
||||
"fields": [
|
||||
{
|
||||
"name": "Ping is " + client.ws.ping + " ms",
|
||||
"value": "If this is more than 350ms there may be a problem!"
|
||||
}
|
||||
]
|
||||
};
|
||||
message.channel.send({ embed });
|
||||
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Gets bot ping',
|
||||
options: [],
|
||||
|
||||
async parseMessage (client, config, message, args) {
|
||||
await message.channel.send(await this.handle(client, config, message.author));
|
||||
},
|
||||
|
||||
async parseInteraction (client, config, interaction) {
|
||||
await interaction.reply(await this.handle(client, config, interaction.user));
|
||||
},
|
||||
|
||||
async handle (client, config, user) {
|
||||
const index = Math.floor(Math.random() * config.locations.length);
|
||||
const location = config.locations[index];
|
||||
|
||||
return {
|
||||
embeds: [{
|
||||
title: ':ping_pong: Ping',
|
||||
description: `**Pong!** We pinged **${location}** and got ${client.ws.ping} ms.`,
|
||||
color: 9442302,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
}
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,56 +1,47 @@
|
|||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
|
||||
const gifchoices = [
|
||||
'https://i.pinimg.com/originals/b4/95/fb/b495fb19f4b9a1b04f48297b676c497b.gif',
|
||||
'https://i.imgur.com/H7Ok5tn.gif',
|
||||
'https://media1.tenor.com/images/8fe23ec8e2c5e44964e5c11983ff6f41/tenor.gif?itemid=5600215'
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
|
||||
name: "poke",
|
||||
description: "Pokes an user!",
|
||||
execute(client, message, args) {
|
||||
const messageAuthor = message.author
|
||||
const taggedUser = message.mentions.users.first();
|
||||
|
||||
// --------------------------------------
|
||||
const gifchoices = [
|
||||
"https://i.pinimg.com/originals/b4/95/fb/b495fb19f4b9a1b04f48297b676c497b.gif",
|
||||
"https://i.imgur.com/H7Ok5tn.gif",
|
||||
"https://media1.tenor.com/images/8fe23ec8e2c5e44964e5c11983ff6f41/tenor.gif?itemid=5600215"
|
||||
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Pokes a user!',
|
||||
options: [{
|
||||
name: 'user',
|
||||
description: 'The user to poke',
|
||||
required: true,
|
||||
type: ApplicationCommandOptionType.User
|
||||
}],
|
||||
|
||||
];
|
||||
const index = Math.floor(Math.random() * (gifchoices.length - 1) + 2);
|
||||
var gif = (gifchoices[index]);
|
||||
// ---------------------------------------
|
||||
const errorembed = {
|
||||
"title": "<:AnitroxError:809651936563429416> Error",
|
||||
"color": 9442302,
|
||||
"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"
|
||||
async parseMessage (client, config, message) {
|
||||
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
|
||||
},
|
||||
|
||||
async parseInteraction (client, config, interaction) {
|
||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||
},
|
||||
|
||||
handle (client, config, user, target) {
|
||||
if (!target) return client.generateErrorMessage('You need to @mention a user!', user.displayAvatarURL());
|
||||
|
||||
const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)];
|
||||
return {
|
||||
embeds: [{
|
||||
title: '👉 Poke!',
|
||||
description: `${target} You have been poked by ${user}!`,
|
||||
color: 8311585,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
},
|
||||
"fields": [
|
||||
{
|
||||
"name": "Well that happened...",
|
||||
"value": "You need to @mention an user!"
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
if(!taggedUser) {
|
||||
return message.channel.send({ embed: errorembed});
|
||||
// Checks if a user was mentioned. If not, returns error message.
|
||||
}
|
||||
|
||||
const embed = {
|
||||
"title": "👉 Poke!",
|
||||
"description": "<@" + taggedUser + "> You have been poked by <@" + messageAuthor + ">!",
|
||||
"color": 8311585,
|
||||
"footer": {
|
||||
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||
"text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021"
|
||||
},
|
||||
"image": {
|
||||
"url": gif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
message.channel.send({ embed: embed });
|
||||
}
|
||||
}
|
||||
image: {
|
||||
url: gif
|
||||
}
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,44 +1,54 @@
|
|||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
name: 'reload',
|
||||
description: 'Reloads a command',
|
||||
args: true,
|
||||
execute(client, message, args, denied) {
|
||||
if (message.author.id == 309427567004483586) {
|
||||
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}!`);
|
||||
}
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Reloads a command',
|
||||
options: [...Array(10).keys()].map(i => ({
|
||||
name: `option${i + 0}`,
|
||||
description: 'Another option',
|
||||
required: i === 0,
|
||||
type: ApplicationCommandOptionType.User
|
||||
})),
|
||||
|
||||
delete require.cache[require.resolve(`./${command.name}.js`)];
|
||||
async parseMessage (client, config, message, args) {
|
||||
await message.channel.send(this.handle(client, config, message.author, args));
|
||||
},
|
||||
|
||||
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(`<:AnitroxError:809651936563429416> There was an error while reloading \`${command.name}\`:\n\`${error.message}\``);
|
||||
}
|
||||
} else {
|
||||
const embed = {
|
||||
"title": "<:NyabotDenied:697145462565896194> **Access is denied**",
|
||||
"color": 13632027,
|
||||
"footer": {
|
||||
"icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||
"text": "Made with ❤ in Illinois | Anitrox by IDeletedSystem64"
|
||||
},
|
||||
"fields": [
|
||||
{
|
||||
"name": "**What Happened?**",
|
||||
"value": "You don't have the appropriate permissions to run this command!"
|
||||
}
|
||||
]
|
||||
};
|
||||
message.channel.send({ embed });
|
||||
}
|
||||
},
|
||||
};
|
||||
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)));
|
||||
},
|
||||
|
||||
handle (client, config, user, args) {
|
||||
if (user.id === process.env.OWNERID) {
|
||||
if (!args.length) return client.generateErrorMessage('You forgot to provide anything to reload, you pillock', user.displayAvatarURL());
|
||||
let returnMessage = '';
|
||||
|
||||
args.forEach(async (arg) => {
|
||||
const commandName = arg?.toLowerCase();
|
||||
const command = client.commands.get(commandName);
|
||||
|
||||
if (!command) {
|
||||
returnMessage += `There is no command with name or alias \`${commandName}\`\n`;
|
||||
} else {
|
||||
delete require.cache[require.resolve(`./${command.name}.js`)];
|
||||
|
||||
try {
|
||||
const newCommand = require(`./${command.name}.js`);
|
||||
client.commands.set(newCommand.name, newCommand);
|
||||
returnMessage += `Successfully reloaded \`${commandName}\`\n`;
|
||||
console.log(`User reloaded ${command.name}.`);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
returnMessage += `There was an error while reloading \`${command.name}\`\n`;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return returnMessage;
|
||||
} else {
|
||||
console.error(`[SYSTEM] [ERR] User ${user.username} tried to reload ${args[0]}, but doesn't have permission!`);
|
||||
return client.generateErrorMessage("You don't have permission to run this command.", user.displayAvatarURL());
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,18 +1,49 @@
|
|||
|
||||
module.exports = {
|
||||
name: 'restart',
|
||||
description: '(Owner Only) Shuts down the bot.',
|
||||
execute(client, message, args) {
|
||||
const { token } = require('../config.json');
|
||||
if (message.author.id == 309427567004483586) {
|
||||
message.channel.send("<a:NyabotWorking:697147309531594843> Restarting...").then
|
||||
client.destroy()
|
||||
.catch(console.error)
|
||||
.then
|
||||
setTimeout(() => { client.login(token); }, 3000);
|
||||
message.channel.send("<:NyabotSuccess:697211376740859914> Restart Successful")
|
||||
console.log("All systems go")
|
||||
} else {
|
||||
message.channel.send("<:NyabotDenied:697145462565896194> Access Denied, You must be bot owner to execute this command.");
|
||||
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Restarts the bot',
|
||||
options: [],
|
||||
|
||||
async parseMessage (client, config, message) {
|
||||
await this.handle(client, config, message.author, message.channel);
|
||||
},
|
||||
|
||||
async parseInteraction (client, config, interaction) {
|
||||
await this.handle(client, config, interaction.user, interaction.channel);
|
||||
},
|
||||
|
||||
async handle (client, config, user, channel) {
|
||||
if (user.id === process.env.OWNERID) {
|
||||
const embeds = [{
|
||||
title: '<a:AnitroxWorking:997565411212144730> Restart Bot',
|
||||
description: '<a:AnitroxWorking:997565411212144730> Restarting now, Be back in a minute!',
|
||||
color: 9442302,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
}
|
||||
}}
|
||||
}];
|
||||
console.log('[SYSTEM] [INFO] Restarting now!');
|
||||
const response = await channel.send({ embeds });
|
||||
try {
|
||||
client.destroy();
|
||||
await client.login(process.env.TOKEN);
|
||||
console.log('[SYSTEM] [INFO] Restarted successfully!');
|
||||
await response.edit({
|
||||
embeds: [{
|
||||
title: ':white_check_mark: Restart Bot',
|
||||
description: 'Restarted!',
|
||||
color: 9442302,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
}
|
||||
}]
|
||||
});
|
||||
} catch (e) { console.error(e); }
|
||||
} else {
|
||||
console.error('[SYSTEM] [ERR] User ' + user.username + " tried to restart the bot, but doesn't have permission! If this was you, Check your config.json");
|
||||
await channel.send(client.generateErrorMessage('You do not have permission to run this command.', user.displayAvatarURL()));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
module.exports = {
|
||||
name: 'setnick',
|
||||
description: 'Sets your nickname',
|
||||
execute(client, message, args) {
|
||||
|
||||
if (message.channel.permissionsFor(message.author).has("CHANGE_NICKNAME")) {
|
||||
var newnick = args.slice(0).join(" ")
|
||||
|
||||
try {
|
||||
const successembed = {
|
||||
"title": "<:AnitroxSuccess:809651936819019796> Nickname Changed",
|
||||
"color": 9442302,
|
||||
"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": "Changed nickname successfully!",
|
||||
"value": "You need to have permission ``CHANGE_NICKNAME`` to change your nick!"
|
||||
},
|
||||
{
|
||||
"name": "New Nickname",
|
||||
"value": newnick,
|
||||
"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) {
|
||||
const failembed = {
|
||||
"title": "<:AnitroxDenied:809651936642203668> Well that happened...",
|
||||
"color": 13632027,
|
||||
"footer": {
|
||||
"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 });
|
||||
};
|
||||
};
|
||||
}}
|
|
@ -1,47 +1,39 @@
|
|||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
|
||||
name: "slap",
|
||||
description: "Slaps an user!",
|
||||
execute(client, message, args) {
|
||||
const messageAuthor = message.author
|
||||
const taggedUser = message.mentions.users.first();
|
||||
//---------------------------------------------------
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Slaps a user!',
|
||||
options: [{
|
||||
name: 'user',
|
||||
description: 'The user to slap',
|
||||
required: true,
|
||||
type: ApplicationCommandOptionType.User
|
||||
}],
|
||||
|
||||
//---------------------------------------------------
|
||||
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"
|
||||
async parseMessage (client, config, message) {
|
||||
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
|
||||
},
|
||||
"fields": [
|
||||
{
|
||||
"name": "Well that happened...",
|
||||
"value": "You need to @mention an user!"
|
||||
}
|
||||
]
|
||||
|
||||
async parseInteraction (client, config, interaction) {
|
||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||
},
|
||||
|
||||
handle (client, config, user, target) {
|
||||
if (!target) return client.generateErrorMessage('You need to @mention a user!', user.displayAvatarURL());
|
||||
return {
|
||||
embeds: [{
|
||||
title: ':anger: Slap',
|
||||
description: `${target} You have been slapped by ${user}!`,
|
||||
color: 9442302,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
},
|
||||
image: {
|
||||
url: 'https://media1.tenor.com/images/b6d8a83eb652a30b95e87cf96a21e007/tenor.gif?itemid=10426943'
|
||||
}
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
if(!taggedUser) {
|
||||
return message.channel.send({ embed: errorembed});
|
||||
// Checks if a user was mentioned. If not, returns error message.
|
||||
}
|
||||
|
||||
const embed = {
|
||||
"title": ":anger: Slap",
|
||||
"description": "<@" + taggedUser + "> You have been slapped by <@" + messageAuthor + ">!",
|
||||
"color": 9442302,
|
||||
"footer": {
|
||||
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||
"text": "Made with ❤ in Illinois | Anitrox © IDeletedSystem64 2018-2021"
|
||||
},
|
||||
"image": {
|
||||
"url": "https://media1.tenor.com/images/b6d8a83eb652a30b95e87cf96a21e007/tenor.gif?itemid=10426943"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
message.channel.send({ embed: embed });
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,36 +1,47 @@
|
|||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
|
||||
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/806775411928989726/snuggl1.gif',
|
||||
'https://cdn.discordapp.com/attachments/803658122299572255/806775422833786911/ImpureDeepAmbushbug-small.gif'
|
||||
];
|
||||
|
||||
module.exports = {
|
||||
|
||||
name: "snuggle",
|
||||
description: "Snuggle an user!",
|
||||
execute(client, message, args) {
|
||||
const messageAuthor = message.author
|
||||
const taggedUser = message.mentions.users.first();
|
||||
|
||||
// --------------------------------------
|
||||
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/806775411928989726/snuggl1.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]);
|
||||
// ---------------------------------------
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Snuggle a user!',
|
||||
options: [{
|
||||
name: 'user',
|
||||
description: 'The user to snuggle',
|
||||
required: true,
|
||||
type: ApplicationCommandOptionType.User
|
||||
}],
|
||||
|
||||
const embed = {
|
||||
"title": "<:BlobSnuggleCat:806759753450782731> Snuggle",
|
||||
"description": "<@" + taggedUser + ">" + " You have been snuggled by " + "<@" + messageAuthor + ">!",
|
||||
"color": 9442302,
|
||||
"footer": {
|
||||
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||
"text": "Made with ❤ in Illinois | Anitrox by IDeletedSystem64"
|
||||
},
|
||||
"image": {
|
||||
"url": gif
|
||||
}
|
||||
async parseMessage (client, config, message) {
|
||||
await message.channel.send(this.handle(client, config, message.author, message.mentions.users.first()));
|
||||
},
|
||||
|
||||
async parseInteraction (client, config, interaction) {
|
||||
await interaction.reply(this.handle(client, config, interaction.user, interaction.options.getUser('user')));
|
||||
},
|
||||
|
||||
handle (client, config, user, target) {
|
||||
if (!target) return client.generateErrorMessage('You need to @mention a user!', user.displayAvatarURL());
|
||||
|
||||
const gif = gifchoices[Math.floor(Math.random() * gifchoices.length)];
|
||||
return {
|
||||
embeds: [{
|
||||
title: '<:BlobSnuggleCat:806759753450782731> Snuggle',
|
||||
description: `${target} You have been snuggled by ${user}!`,
|
||||
color: 9442302,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
},
|
||||
image: {
|
||||
url: gif
|
||||
}
|
||||
|
||||
|
||||
message.channel.send({ embed: embed });
|
||||
}
|
||||
}
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,32 +1,35 @@
|
|||
module.exports = {
|
||||
name: "stop",
|
||||
description: "Stops the bot",
|
||||
execute(client, message, args) {
|
||||
if (message.author.id == 309427567004483586) {
|
||||
const embed = {
|
||||
"title": "<a:AnitroxWorking:697147309531594843> **Shutting Down...**",
|
||||
"description": "See you next time!",
|
||||
"color": 9442302,
|
||||
"footer": {
|
||||
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||
"text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64"
|
||||
}
|
||||
};
|
||||
message.channel.send({ embed });
|
||||
setTimeout(function(){
|
||||
client.destroy()
|
||||
}, 5000);
|
||||
} else {
|
||||
const denied = {
|
||||
"title": ":AnitroxDenied: Access Denied",
|
||||
"description": "You need to be the bot owner to execute this command!",
|
||||
"color": 13632027,
|
||||
"footer": {
|
||||
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||
"text": "Made with ❤ in Illinois | Anitrox © 2018-2021 IDeletedSystem64"
|
||||
}
|
||||
};
|
||||
message.channel.send({ denied });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
name: require('path').parse(__filename).name,
|
||||
description: "IT'S TIME TO STOP!... the bot",
|
||||
options: [],
|
||||
|
||||
async parseMessage (client, config, message) {
|
||||
await this.handle(client, config, message.author, message.channel);
|
||||
},
|
||||
|
||||
async parseInteraction (client, config, interaction) {
|
||||
await this.handle(client, config, interaction.user, interaction.channel);
|
||||
},
|
||||
|
||||
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: [{
|
||||
title: 'Shut down the bot',
|
||||
description: '<a:AnitroxWorking:997565411212144730> Shutting down now, Until next time!',
|
||||
color: 9442302,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
}
|
||||
}]
|
||||
});
|
||||
process.exit();
|
||||
} else {
|
||||
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 channel.send(client.generateErrorMessage('You do not have permission to run this command.', user.displayAvatarURL()));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
73
commands/uinfo.js
Normal file
73
commands/uinfo.js
Normal file
|
@ -0,0 +1,73 @@
|
|||
const { ApplicationCommandOptionType } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
|
||||
name: require('path').parse(__filename).name,
|
||||
description: 'Gets info about an user, such as ID, Discord Join date and more',
|
||||
options: [{
|
||||
name: 'user',
|
||||
description: 'Another user',
|
||||
required: false,
|
||||
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) {
|
||||
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));
|
||||
},
|
||||
|
||||
handle (client, config, user, target) {
|
||||
return {
|
||||
embeds: [{
|
||||
title: `Everything you've ever wanted to know about ${target.user.username}!`,
|
||||
color: 9442302,
|
||||
footer: {
|
||||
icon_url: user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
},
|
||||
thumbnail: {
|
||||
url: target.displayAvatarURL()
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: 'Username',
|
||||
value: target.user.username,
|
||||
inline: true
|
||||
},
|
||||
{
|
||||
name: 'Discriminator',
|
||||
value: target.user.discriminator,
|
||||
inline: true
|
||||
},
|
||||
{
|
||||
name: 'Full Username',
|
||||
value: target.user.tag,
|
||||
inline: true
|
||||
},
|
||||
{
|
||||
name: 'User Profile Picture',
|
||||
value: target.user.displayAvatarURL()
|
||||
},
|
||||
{
|
||||
name: 'User Status',
|
||||
value: target.presence?.status ?? (config.intents.includes('GUILD_PRESENCES') ? 'Offline' : 'Missing GUILD_PRESENCES intent')
|
||||
},
|
||||
{
|
||||
name: 'User ID',
|
||||
value: `\`${target.user.id}\``
|
||||
},
|
||||
{
|
||||
name: 'User Joined Discord',
|
||||
value: target.user.createdAt.toString(),
|
||||
inline: true
|
||||
}
|
||||
]
|
||||
}]
|
||||
};
|
||||
}
|
||||
};
|
|
@ -1,66 +0,0 @@
|
|||
module.exports = {
|
||||
|
||||
name: "userinfo",
|
||||
description: "Gets info about an user, such as ID, Discord Join date and more.",
|
||||
execute(client, message, args) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const user = message.mentions.users.first();
|
||||
var i=0;i<user.presence.activities.length;i
|
||||
const activity = user.presence.activities[i];
|
||||
|
||||
if(!activity) {
|
||||
const activity = "This user doesn't have a set status"
|
||||
// Checks if a user was mentioned. If not, returns error message.
|
||||
}
|
||||
|
||||
|
||||
|
||||
const embed = {
|
||||
"title": "Everything you've ever wanted to know about " + user.username + "!",
|
||||
"color": 9442302,
|
||||
"footer": {
|
||||
"icon_url": "https://media.discordapp.net/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||
"text": "Made with ❤ in Illinois | Anitrox by IDeletedSystem644"
|
||||
},
|
||||
|
||||
"thumbnail": {
|
||||
"url": user.displayAvatarURL()
|
||||
},
|
||||
"fields": [
|
||||
|
||||
{
|
||||
"name": "Full Username",
|
||||
"value": user.tag
|
||||
},
|
||||
{
|
||||
"name": "User Profile Picture",
|
||||
"value": user.displayAvatarURL()
|
||||
},
|
||||
{
|
||||
"name": "User Presence",
|
||||
value: user.presence.status
|
||||
},
|
||||
{
|
||||
"name": "Custom Status",
|
||||
value: activity.state
|
||||
},
|
||||
{
|
||||
"name": "User ID",
|
||||
"value": "``" + user.id + "``"
|
||||
},
|
||||
{
|
||||
"name": "User Joined Discord",
|
||||
"value": user.createdAt,
|
||||
inline: true
|
||||
},
|
||||
|
||||
]
|
||||
};
|
||||
message.channel.send({ embed: embed });
|
||||
}
|
||||
}
|
73
config-example.json
Normal file
73
config-example.json
Normal file
|
@ -0,0 +1,73 @@
|
|||
{
|
||||
"prefix": "n!",
|
||||
"build": "1.4",
|
||||
"footerTxt": "Anitrox, made with <3 by IDeletedSystem64 | 2018-2023",
|
||||
"imageApi": "",
|
||||
"updater": {
|
||||
"enabled": true,
|
||||
"frequency": "360",
|
||||
"gitRepo": "IDeletedSystem64/anitrox"
|
||||
},
|
||||
"sandbox": {
|
||||
"enabled": false,
|
||||
"id": "0",
|
||||
"refreshLocal": false,
|
||||
"refreshGlobal": false
|
||||
},
|
||||
|
||||
"statuses": [
|
||||
"with /help",
|
||||
"with Sophie!",
|
||||
"Trans Rights!",
|
||||
"in your computer",
|
||||
"with my internet router",
|
||||
"ssh: system64@borkeonv2",
|
||||
"YouTube",
|
||||
"with source code",
|
||||
"Visual Studio Code",
|
||||
"Minecraft",
|
||||
"with the network connections.",
|
||||
"VLC Media Player",
|
||||
"Chromium"
|
||||
],
|
||||
"locations": [
|
||||
"Microsoft",
|
||||
"LinusTechTips",
|
||||
"Linus Torvalds",
|
||||
"borkeonv2",
|
||||
"Google",
|
||||
"192.168.1.1",
|
||||
"127.0.0.1",
|
||||
"Sophie's computer",
|
||||
"Mars",
|
||||
"Netro Corporation",
|
||||
"System64 Technologies",
|
||||
"myself",
|
||||
"Twilight Sparkle",
|
||||
"the Pokemon Center",
|
||||
"Who asked?",
|
||||
"you",
|
||||
"your mother"
|
||||
|
||||
],
|
||||
"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"
|
||||
]
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"prefix": "np!",
|
||||
|
||||
"token": "token",
|
||||
"ownerID": "309427567004483586",
|
||||
"release": "anitrox_ptb",
|
||||
"build": "Stable Release Canidiate 2, PSC3 "
|
||||
}
|
5
events/error.js
Normal file
5
events/error.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
module.exports = {
|
||||
event: require('path').parse(__filename).name,
|
||||
once: false,
|
||||
listener: () => e => { console.log(`[ERROR] ${e}`); }
|
||||
};
|
24
events/interactionCreate.js
Normal file
24
events/interactionCreate.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
module.exports = {
|
||||
event: require('path').parse(__filename).name,
|
||||
once: false,
|
||||
listener: (client, config) =>
|
||||
async (interaction) => {
|
||||
try {
|
||||
await client.commands.get(interaction.commandName)?.parseInteraction(client, config, interaction);
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
interaction.reply({
|
||||
embeds: [{
|
||||
title: '<:AnitroxError:809651936563429416> **Something went wrong!**',
|
||||
description: error.stack,
|
||||
color: 13632027,
|
||||
footer: {
|
||||
icon_url: interaction.user.displayAvatarURL(),
|
||||
text: config.footerTxt
|
||||
}
|
||||
}],
|
||||
ephemeral: false
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
30
events/messageCreate.js
Normal file
30
events/messageCreate.js
Normal file
|
@ -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
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
63
events/ready.js
Normal file
63
events/ready.js
Normal file
|
@ -0,0 +1,63 @@
|
|||
const { Collection } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
event: require('path').parse(__filename).name,
|
||||
once: true,
|
||||
listener: (client, config) =>
|
||||
async () => {
|
||||
const sandboxSettings = config.sandbox;
|
||||
const localCommands = client.guilds.cache.get(sandboxSettings.id)?.commands;
|
||||
const globalCommands = client.application?.commands;
|
||||
let existingLocal = await localCommands?.fetch();
|
||||
let existingGlobal = await globalCommands?.fetch();
|
||||
|
||||
if (sandboxSettings.enabled) {
|
||||
if (sandboxSettings.refreshLocal && localCommands) {
|
||||
console.log('deleting previous local commands');
|
||||
existingLocal?.forEach(async (x) => {
|
||||
await localCommands?.delete(x);
|
||||
});
|
||||
existingLocal = new Collection();
|
||||
}
|
||||
|
||||
if (sandboxSettings.refreshGlobal) {
|
||||
console.log('deleting previous global commands');
|
||||
existingGlobal?.forEach(async x => {
|
||||
await client.application?.commands.delete(x);
|
||||
});
|
||||
existingGlobal = new Collection();
|
||||
}
|
||||
}
|
||||
|
||||
client.commands.forEach(async (command) => {
|
||||
if (sandboxSettings.enabled && !existingLocal?.map(x => x.name).includes(command.name)) {
|
||||
await localCommands?.create(command);
|
||||
// console.log(`created new local command ${command.name}`);
|
||||
}
|
||||
if (!existingGlobal?.map(x => x.name).includes(command.name)) {
|
||||
await globalCommands?.create(command);
|
||||
// console.log(`created new global command ${command.name}`);
|
||||
}
|
||||
});
|
||||
|
||||
console.clear();
|
||||
console.log(' ___ _ __ ');
|
||||
console.log(' / | ____ (_) /__________ _ __');
|
||||
console.log(' / /| | / __ \\/ / __/ ___/ __ \\| |/_/');
|
||||
console.log(' / ___ |/ / / / / /_/ / / /_/ /> w < ');
|
||||
console.log(`/_/ |_/_/ /_/_/\\__/_/ \\____/_/|_| ${config.build}`);
|
||||
console.log('Ready!| Anitrox by IDeletedSystem64 | Also check out Novetus!');
|
||||
if (config.updater.enabled === true) {
|
||||
await client.updater.checkUpdates(true); // This is probably the wrong way to do it
|
||||
setInterval(async () => {
|
||||
await client.updater.checkUpdates(true);
|
||||
}, parseInt(config.updater.frequency * 60000)); // This is set to 6 hours (360 minutes) by default.
|
||||
}
|
||||
|
||||
// Statuses
|
||||
setInterval(async () => {
|
||||
const index = Math.floor(Math.random() * config.statuses.length); // Picks a status from the config file
|
||||
await client.user?.setActivity(config.statuses[index]);
|
||||
}, 20000);
|
||||
}
|
||||
};
|
5
events/warn.js
Normal file
5
events/warn.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
module.exports = {
|
||||
event: require('path').parse(__filename).name,
|
||||
once: false,
|
||||
listener: () => e => (`[WARN] ${e}`)
|
||||
};
|
7
functions/getTime.js
Normal file
7
functions/getTime.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
module.exports = () => {
|
||||
const date = new Date();
|
||||
const timeDate = date.toLocaleDateString();
|
||||
const time = date.toLocaleTimeString();
|
||||
|
||||
return ` ${time} | ${timeDate} `;
|
||||
};
|
50
functions/updateCheck.js
Normal file
50
functions/updateCheck.js
Normal file
|
@ -0,0 +1,50 @@
|
|||
/* eslint-disable brace-style */ // Tell eslint to stfu :)
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
const config = require('../config.json');
|
||||
|
||||
class updateChecker {
|
||||
constructor () {
|
||||
this.status = null;
|
||||
this.failReason = null;
|
||||
}
|
||||
|
||||
checkUpdates = (notify) => {
|
||||
const repo = `https://api.github.com/repos/${config.updater.gitRepo}/releases/latest`;
|
||||
const getUpdates = () => {
|
||||
return fetch(repo)
|
||||
.then(async (response) => {
|
||||
if (response.status !== 200) {
|
||||
this.status = 2; // Error
|
||||
this.failReason = response.statusText;
|
||||
} else {
|
||||
response = await response.json();
|
||||
if (!response) { this.status = 2; } // Something went wrong while checking for updates :(
|
||||
const version = {
|
||||
latest: response.name,
|
||||
current: config.build
|
||||
};
|
||||
|
||||
if (version.current === version.latest) { this.status = 0; return version; } // Up-to-date!
|
||||
else if (version.current < version.latest) { this.status = 1; return version; } // Not up to date.
|
||||
else this.status = 2; // Something went wrong while checking for updates :(
|
||||
|
||||
return response;
|
||||
};
|
||||
})
|
||||
.catch(err => { console.error(err); });
|
||||
};
|
||||
return getUpdates().then(response => {
|
||||
if (notify === true) {
|
||||
if (this.status === 1) console.log(`\n✨ It must be your lucky day! Anitrox ${response.latest} is now available! Download it from github.com/${config.updater.gitRepo}/releases!`); // Log to console about the new release!
|
||||
else if (this.status === 2) console.error(`\nSomething went wrong while checking for updates... :( | ${this.failReason}`); // This can probably be done more properly, But quite honestly I'm tired of working at this. ^system64
|
||||
else if (this.status === 0) {} // Up-to-date
|
||||
else console.error(`Unknown Update Status!! ${this.status}`);
|
||||
} else return this.status;
|
||||
});
|
||||
};
|
||||
|
||||
getStatus = () => { return this.status; };
|
||||
}
|
||||
|
||||
module.exports = function () { return new updateChecker(); };
|
15
functions/uptime.js
Normal file
15
functions/uptime.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
module.exports = (uptime) => {
|
||||
const tSeconds = (uptime / 1000);
|
||||
|
||||
const tDays = parseInt(tSeconds / 86400);
|
||||
const tHrs = parseInt((tSeconds % 86400) / 3600);
|
||||
const tMins = parseInt((tSeconds % 3600) / 60);
|
||||
const tSecs = parseInt(tSeconds % 60);
|
||||
|
||||
const days = tDays + (tDays === 1 ? ' day' : ' days');
|
||||
const hours = tHrs + (tHrs === 1 ? ' hour' : ' hours');
|
||||
const minutes = tMins + (tMins === 1 ? ' minute' : ' minutes');
|
||||
const seconds = tSecs + (tSecs === 1 ? ' second' : ' seconds');
|
||||
|
||||
return `${days}, ${hours}, ${minutes}, ${seconds}`;
|
||||
};
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"denied": "<:AnitroxDenied:809651936642203668>",
|
||||
"error": "<:AnitroxError:809651936563429416> ",
|
||||
"info": "<:AnitroxInfo:809651936831733791>",
|
||||
"success": "<:AnitroxSuccess:809651936819019796>",
|
||||
"warning": "<:AnitroxWarning:809651934717804555>"
|
||||
}
|
2763
package-lock.json
generated
2763
package-lock.json
generated
File diff suppressed because it is too large
Load diff
20
package.json
20
package.json
|
@ -4,13 +4,19 @@
|
|||
"description": "Discord Bot Based on Discord.JS",
|
||||
"main": "start.js",
|
||||
"dependencies": {
|
||||
"discord.js": "^12.5.1",
|
||||
"node-os-utils": "^1.3.2",
|
||||
"discord.js": "^14.7.1",
|
||||
"dotenv": "^16.0.3",
|
||||
"node-fetch": "^2.6.6",
|
||||
"node-os-utils": "^1.3.7",
|
||||
"require-all": "^3.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "Anthony Mondz",
|
||||
"license": "ISC"
|
||||
"author": "IDeletedSystem64",
|
||||
"license": "GPLv3",
|
||||
"devDependencies": {
|
||||
"eslint": "^8.32.0",
|
||||
"eslint-config-standard": "^17.0.0",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-n": "^15.6.1",
|
||||
"eslint-plugin-promise": "^6.1.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
:anitroxaddserver: **Anitrox has been updated.**
|
||||
**Old Version: Anitrox Stable Release Canidiate 1, Build 500**
|
||||
**New Version: Stable Release Canidiate 2, Version PR3**
|
||||
This new major release brings new features, and bug fixes to Anitrox and paves the way towards Stable release.
|
||||
|
||||
**What's New**
|
||||
Anitrox Source code has been released to the public, If ya want to poke around or make contributions either run ``np!opensource`` and select "Anitrox Project"
|
||||
Reduced the amount of statuses that Anitrox uses, it used more lines than actual code I think >w>. Also added some new ones!
|
||||
Changed the footer
|
||||
Localization updates-nahjk (maybe one day? 🤔)
|
||||
Simplified error message
|
||||
Patched a security vulnerbility in one of the dependencies, I forget what it was but Dependabot gave me a heads up about it soo ¯\_(ツ)_
|
||||
Probably a bunch of other stuff I've forgot about 🙃
|
||||
https://www.youtube.com/watch?v=_WW2JWIv6G8
|
131
start.js
Normal file → Executable file
131
start.js
Normal file → Executable file
|
@ -1,88 +1,55 @@
|
|||
console.log('(Info) Preparing to start!')
|
||||
#!/usr/bin/env -S node
|
||||
|
||||
const fs = require('fs');
|
||||
console.log('(Info) Loaded Filesystem successfully!')
|
||||
const Discord = require('discord.js');
|
||||
console.log('(Info) Loaded Discord successfully!')
|
||||
const { build, release, prefix, token } = require('./config.json');
|
||||
const { denied, error, info, success, warning } = require('./icons.json');
|
||||
const os = require("os");
|
||||
console.log('(Info) Loaded OS successfully!')
|
||||
|
||||
const activities_list = [
|
||||
"with np!help",
|
||||
"with Sophie!",
|
||||
"Trans Rights!",
|
||||
"in your computer",
|
||||
"with my internet router",
|
||||
"ssh: system64@borkeonv2",
|
||||
"YouTube",
|
||||
"with source code",
|
||||
"Visual Studio Code"
|
||||
];
|
||||
|
||||
console.log('Starting! This should only take a moment.')
|
||||
const client = new Discord.Client();
|
||||
client.commands = new Discord.Collection();
|
||||
const footicon = "https://cdn.discordapp.com/attachments/803658122299572255/805506708352008232/system64.png"
|
||||
const footer = "Made with ❤ in Illinois | Anitrox, by IDeletedSystem64"
|
||||
|
||||
const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));
|
||||
|
||||
for (const file of commandFiles) {
|
||||
const command = require(`./commands/${file}`);
|
||||
client.commands.set(command.name, command);
|
||||
}
|
||||
|
||||
client.on("error", (e) => console.error(e));
|
||||
client.on("warn", (e) => console.warn(e));
|
||||
|
||||
client.once('ready', () => {
|
||||
console.clear()
|
||||
console.log(' ___ _ __ ');
|
||||
console.log(' / | ____ (_) /__________ _ __');
|
||||
console.log(' / /| | / __ \/ / __/ ___/ __ \| |/_/');
|
||||
console.log(' / ___ |/ / / / / /_/ / / /_/ /> < ');
|
||||
console.log('/_/ |_/_/ /_/_/\__/_/ \____/_/|_| ')
|
||||
console.log(release + ", " + build)
|
||||
console.log("All Systems Go. | Anitrox by IDeletedSystem64 | We're now open-source! Check it out at bit.ly/anitroxsource");
|
||||
const { Client, Collection, GatewayIntentBits } = require('discord.js');
|
||||
const config = require('./config.json');
|
||||
require('dotenv').config();
|
||||
console.log('Starting!');
|
||||
// const client = new Discord.Client({ intents: config.intents.map(intent => eval(`Discord.Intents.FLAGS.${intent}`)) });
|
||||
const client = new Client({
|
||||
intents: [
|
||||
GatewayIntentBits.Guilds,
|
||||
GatewayIntentBits.GuildMessages,
|
||||
GatewayIntentBits.GuildPresences
|
||||
]
|
||||
});
|
||||
setInterval(() => {
|
||||
const index = Math.floor(Math.random() * (activities_list.length - 1) + 1);
|
||||
client.user.setActivity(activities_list[index]);
|
||||
}, 20000);
|
||||
// todo: move back to file
|
||||
client.commands = new Collection();
|
||||
fs.readdirSync('./commands')
|
||||
.filter(file => file.endsWith('.js'))
|
||||
.forEach(file => {
|
||||
const command = require(`./commands/${file}`);
|
||||
client.commands.set(command.name, command);
|
||||
});
|
||||
// Create a collection using those command files
|
||||
|
||||
client.on('message', message => {
|
||||
if (!message.content.startsWith(prefix) || message.author.bot) return;
|
||||
fs.readdirSync('./events')
|
||||
.filter(file => file.endsWith('.js'))
|
||||
.map(file => require(`./events/${file}`))
|
||||
.forEach(({ once, event, listener }) => {
|
||||
client[once ? 'once' : 'on'](event, listener(client, config));
|
||||
});
|
||||
// Create listeners from the event files.
|
||||
|
||||
const args = message.content.slice(prefix.length).split(/ +/);
|
||||
const command = args.shift().toLowerCase();
|
||||
|
||||
if (!client.commands.has(command)) return;
|
||||
|
||||
try {
|
||||
client.commands.get(command).execute(client, message, args, Discord);
|
||||
} catch (error) {
|
||||
console.stack
|
||||
const embed = {
|
||||
"title": "<:AnitroxError:809651936563429416> **Well that happened...**",
|
||||
"color": 13632027,
|
||||
"footer": {
|
||||
"icon_url": "https://cdn.discordapp.com/attachments/549707869138714635/793524910172667964/Screenshot_26.png",
|
||||
"text": footer
|
||||
},
|
||||
"fields": [
|
||||
{
|
||||
"name": "**What Happened?**",
|
||||
"value": "The command you tried to run failed to execute due to an error."
|
||||
},
|
||||
{
|
||||
"name": "Error Info",
|
||||
"value": error.stack
|
||||
}
|
||||
]
|
||||
};
|
||||
message.channel.send({ embed });
|
||||
}
|
||||
client.generateErrorMessage = (errorMsg, avatarURL) => ({
|
||||
embeds: [{
|
||||
title: '<:AnitroxError:809651936563429416> Error',
|
||||
color: 13632027,
|
||||
footer: {
|
||||
icon_url: avatarURL,
|
||||
text: config.footerTxt
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: 'Something went wrong!',
|
||||
value: errorMsg
|
||||
}
|
||||
]
|
||||
}]
|
||||
});
|
||||
// Error message generator.
|
||||
|
||||
client.login(token);
|
||||
client.updater = require('./functions/updateCheck.js')(); // da update checker (real)
|
||||
|
||||
client.login(process.env.TOKEN);
|
||||
// Login to Discord!
|
||||
|
|
Reference in a new issue