Skip to content

Commit 8d20125

Browse files
committed
commands refined
also fixed prettier format for your easy code reading
1 parent 4bc5b1b commit 8d20125

26 files changed

+120
-370
lines changed

commands/8.js

+2-9
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,8 @@ const wait = require("node:timers/promises").setTimeout;
55
module.exports = {
66
data: new SlashCommandBuilder()
77
.setName("8")
8-
.setDescription(
9-
"Ask any yes/no question, and it will answer you something!"
10-
)
11-
.addStringOption((option) =>
12-
option
13-
.setName("question")
14-
.setDescription("Yes/No questions only")
15-
.setRequired(true)
16-
),
8+
.setDescription("Ask any yes/no question, and it will answer you something!")
9+
.addStringOption((option) => option.setName("question").setDescription("Yes/No questions only").setRequired(true)),
1710

1811
async execute(interaction) {
1912
let botOwner = `${process.env.BOTOWNER}`;

commands/about.js

+6-10
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ require("dotenv").config();
22
const { SlashCommandBuilder } = require("discord.js");
33

44
module.exports = {
5-
data: new SlashCommandBuilder()
6-
.setName("about")
7-
.setDescription("Shows you the info about the bot!"),
5+
data: new SlashCommandBuilder().setName("about").setDescription("Shows you the info about the bot!"),
86
async execute(interaction) {
97
const { client } = interaction;
108
const botOwner = `${process.env.BOTOWNER}`;
@@ -28,21 +26,19 @@ module.exports = {
2826
},
2927
{
3028
name: "Bot Website",
31-
value: "[https://hackerman14.tk](https://hackerman14.github.io/)",
29+
value: "<https://hackerman14.github.io/>",
3230
},
3331
{
3432
name: "Creator",
35-
value: "[Raymond#2829](https://raymond-1227.github.io/)",
33+
value: "[rhsu](https://raymond-1227.github.io/)",
3634
},
3735
{
38-
name: "Host",
39-
value:
40-
"[Oracle Cloud Infrastructure](https://www.oracle.com/cloud/)",
36+
name: "Host Provider",
37+
value: "[Oracle Cloud Infrastructure](https://www.oracle.com/cloud/)",
4138
},
4239
{
4340
name: "Open Source",
44-
value:
45-
"[hackerman14/bot-code](https://github.com/hackerman14/bot-code)",
41+
value: "[hackerman14/bot-code](https://github.com/hackerman14/bot-code)",
4642
},
4743
{
4844
name: "Library",

commands/ban.js

+3-11
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,9 @@ module.exports = {
88
.setDescription("Fake bans people!")
99
.setDefaultMemberPermissions(PermissionFlagsBits.BanMembers)
1010
.setDMPermission(false)
11-
.addUserOption((option) =>
12-
option
13-
.setName("user")
14-
.setDescription("The user you want to ban")
15-
.setRequired(true)
16-
)
11+
.addUserOption((option) => option.setName("user").setDescription("The user you want to ban").setRequired(true))
1712
.addStringOption((option) =>
18-
option
19-
.setName("reason")
20-
.setDescription("Reason why you are banning the user")
21-
.setRequired(true)
13+
option.setName("reason").setDescription("Reason why you are banning the user").setRequired(true)
2214
),
2315
async execute(interaction) {
2416
const { guild } = interaction;
@@ -32,7 +24,7 @@ module.exports = {
3224
},
3325
],
3426
});
35-
27+
3628
try {
3729
await user.send({
3830
embeds: [

commands/btcabuse.js

-78
This file was deleted.

commands/changelog.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,18 @@ module.exports = {
1212
{
1313
color: 0x0ccab6,
1414
title: "**Bot Changelog**",
15-
description: "Date: November 15, 2022",
15+
description: "Date: June 21, 2024",
1616
timestamp: new Date().toISOString(),
1717
fields: [
1818
{
19-
name: "Redefined /lawsuit into /sue",
19+
name: "Removed `/covid` command",
2020
value:
21-
"Redesigned the /lawsuit command into /sue now in order to make it more logical and fun!",
21+
"`/covid` was removed due to COVID-19 being unrevalent now, and the API that was being used reached its end of life on 2023.",
22+
},
23+
{
24+
name: "Removed `/btcabuse` command",
25+
value:
26+
"`/btc` was removed due to the updated API being too strict on rate limits.",
2227
},
2328
{
2429
name: "Command enhancements",

commands/covid.js

-47
This file was deleted.

commands/fact.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ const { SlashCommandBuilder } = require("discord.js");
33
const fetch = require("node-fetch");
44

55
module.exports = {
6-
data: new SlashCommandBuilder()
7-
.setName("fact")
8-
.setDescription("Tells you a boring fact!"),
6+
data: new SlashCommandBuilder().setName("fact").setDescription("Tells you a boring fact!"),
97
async execute(interaction) {
108
const botOwner = `${process.env.BOTOWNER}`;
119
fetch("https://useless-facts.sameerkumar.website/api")

commands/feedback.js

+4-15
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,14 @@
11
require("dotenv").config();
2-
const {
3-
ActionRowBuilder,
4-
Events,
5-
ModalBuilder,
6-
TextInputBuilder,
7-
TextInputStyle,
8-
} = require("discord.js");
2+
const { ActionRowBuilder, Events, ModalBuilder, TextInputBuilder, TextInputStyle } = require("discord.js");
93
const { SlashCommandBuilder } = require("discord.js");
104

115
module.exports = {
12-
data: new SlashCommandBuilder()
13-
.setName("feedback")
14-
.setDescription("Send some feedback to the bot developer!"),
6+
data: new SlashCommandBuilder().setName("feedback").setDescription("Send some feedback to the bot developer!"),
157
async execute(interaction) {
168
const { client } = interaction;
179
const botOwner = `${process.env.BOTOWNER}`;
1810

19-
const modal = new ModalBuilder()
20-
.setCustomId("sendFeedback")
21-
.setTitle("Send Feedback");
11+
const modal = new ModalBuilder().setCustomId("sendFeedback").setTitle("Send Feedback");
2212
const subjectInput = new TextInputBuilder()
2313
.setCustomId("subjectInput")
2414
.setLabel("Subject")
@@ -44,8 +34,7 @@ module.exports = {
4434
if (!interaction.isModalSubmit()) return;
4535

4636
const userSubject = interaction.fields.getTextInputValue("subjectInput");
47-
const userFeedback =
48-
interaction.fields.getTextInputValue("feedbackInput");
37+
const userFeedback = interaction.fields.getTextInputValue("feedbackInput");
4938
console.log({ userSubject, userFeedback });
5039

5140
if (interaction.customId === "sendFeedback") {

commands/fuckoff.js

+6-10
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ module.exports = {
1111
const { guild } = interaction;
1212
const botOwner = `${process.env.BOTOWNER}`;
1313
const cancelAction = new ActionRowBuilder().addComponents(
14-
new ButtonBuilder()
15-
.setCustomId("cancel")
16-
.setLabel("Cancel")
17-
.setStyle("DANGER")
14+
new ButtonBuilder().setCustomId("cancel").setLabel("Cancel").setStyle("DANGER")
1815
);
1916
if (!interaction.member.permissions.has("KICK_MEMBERS"))
2017
return interaction.reply({
@@ -53,7 +50,7 @@ module.exports = {
5350
});
5451
collector.on("collect", async (i) => {
5552
if (i.customId === "cancel") {
56-
cancelAction.components[0].setDisabled(true)
53+
cancelAction.components[0].setDisabled(true);
5754
await i.update({
5855
embeds: [
5956
{
@@ -73,16 +70,15 @@ module.exports = {
7370
});
7471
collector.on("end", (collection) => {
7572
if (collection.first()?.customId === "cancel") {
76-
return
73+
return;
7774
} else {
78-
cancelAction.components[0].setDisabled(true)
75+
cancelAction.components[0].setDisabled(true);
7976
interaction.editReply({
8077
embeds: [
8178
{
8279
color: 0x0ccab6,
8380
title: "**You Hate Me™**",
84-
description:
85-
"Thank you for using hackerman14 bot, have a nice day!",
81+
description: "Thank you for using hackerman14 bot, have a nice day!",
8682
timestamp: new Date().toISOString(),
8783
footer: {
8884
text: `Made with ❤️ created by ${botOwner}`,
@@ -96,4 +92,4 @@ module.exports = {
9692
}
9793
});
9894
},
99-
};
95+
};

commands/gif.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ const { SlashCommandBuilder } = require("discord.js");
33
const fetch = require("node-fetch");
44

55
module.exports = {
6-
data: new SlashCommandBuilder()
7-
.setName("gif")
8-
.setDescription("Sends you a random GIF!"),
6+
data: new SlashCommandBuilder().setName("gif").setDescription("Sends you a random GIF!"),
97
async execute(interaction) {
108
const botOwner = `${process.env.BOTOWNER}`;
119
fetch(`http://api.giphy.com/v1/gifs/random?api_key=${process.env.GIPHY}&rating=g`)

0 commit comments

Comments
 (0)