use less files and fix footer

This commit is contained in:
night0721 2022-03-02 22:37:01 +08:00
parent 182c2a21d6
commit ca5813d12c
9 changed files with 50 additions and 61 deletions

View file

@ -27,7 +27,7 @@ module.exports = {
const user2 = interaction.guild.members.cache.get(args[1]).user.username; const user2 = interaction.guild.members.cache.get(args[1]).user.username;
const loveEmbed = new MessageEmbed() const loveEmbed = new MessageEmbed()
.setColor("dd2e44") .setColor("dd2e44")
.setFooter(`Shipped by ${interaction.user.tag}`) .setFooter({ text: `Shipped by ${interaction.user.tag}` })
.setTimestamp() .setTimestamp()
.setTitle(`💘 | Shipping ${user1} and ${user2} | 💘`) .setTitle(`💘 | Shipping ${user1} and ${user2} | 💘`)
.setDescription(`🔻 | ${user1} \n${ship()}\n🔺 | ${user2}`); .setDescription(`🔻 | ${user1} \n${ship()}\n🔺 | ${user2}`);

View file

@ -22,7 +22,10 @@ module.exports = {
.setTitle(`${user.user.username}'s simp rate`) .setTitle(`${user.user.username}'s simp rate`)
.setDescription(`${user.user.username} is a ${simp}% simp`) .setDescription(`${user.user.username} is a ${simp}% simp`)
.setColor(client.color) .setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp(), .setTimestamp(),
], ],
}); });

View file

@ -9,7 +9,7 @@ module.exports = {
name: interaction.user.tag, name: interaction.user.tag,
iconURL: interaction.user.displayAvatarURL({ dyamic: true }), iconURL: interaction.user.displayAvatarURL({ dyamic: true }),
}) })
.setTitle(tnd.truth[Math.round(Math.random() * tnd.truth.length)]) .setTitle(tnd.truth[Math.round(Math.random() * tnd.truth.length - 1)])
.setColor(client.color) .setColor(client.color)
.setFooter({ .setFooter({
text: `Made by ${client.author}`, text: `Made by ${client.author}`,

View file

@ -1,6 +1,5 @@
const { MessageEmbed } = require("discord.js"); const { MessageEmbed } = require("discord.js");
const questions = require("../../util/Data/wyr.json"); const questions = require("../../util/Data/wyr.json");
module.exports = { module.exports = {
name: "wyr", name: "wyr",
description: "Send some would-you rather questions", description: "Send some would-you rather questions",
@ -15,12 +14,15 @@ module.exports = {
.setDescription( .setDescription(
`🇦 ${Option1} \n\n **OR** \n\n :regional_indicator_b: ${Option2}` `🇦 ${Option1} \n\n **OR** \n\n :regional_indicator_b: ${Option2}`
) )
.setAuthor( .setAuthor({
interaction.user.tag, name: interaction.user.tag,
interaction.user.displayAvatarURL({ dynamic: true }) iconURL: interaction.user.displayAvatarURL({ dyamic: true }),
) })
.setColor(client.color) .setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp(); .setTimestamp();
wyrmessage = await interaction.followUp({ embeds: [embed] }); wyrmessage = await interaction.followUp({ embeds: [embed] });
wyrmessage.react("🇦"); wyrmessage.react("🇦");

View file

@ -17,10 +17,10 @@ module.exports = {
const member = const member =
interaction.guild.members.cache.get(args[0]) || interaction.member; interaction.guild.members.cache.get(args[0]) || interaction.member;
const embed = new MessageEmbed() const embed = new MessageEmbed()
.setAuthor( .setAuthor({
member.user.tag, text: member.user.tag,
member.user.displayAvatarURL({ dynamic: true, size: 1024 }) iconURL: member.user.displayAvatarURL({ dynamic: true, size: 1024 }),
) })
.setColor(client.color) .setColor(client.color)
.setTitle(`${member.user.username}'s Avatar`) .setTitle(`${member.user.username}'s Avatar`)
.setDescription( .setDescription(
@ -41,7 +41,10 @@ module.exports = {
.setImage( .setImage(
member.user.avatarURL({ size: 2048, dynamic: true, format: "png" }) member.user.avatarURL({ size: 2048, dynamic: true, format: "png" })
) )
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setURL(client.web) .setURL(client.web)
.setTimestamp(); .setTimestamp();
interaction.followUp({ embeds: [embed] }); interaction.followUp({ embeds: [embed] });

View file

@ -1,14 +1,12 @@
const { MessageEmbed, version: djsversion } = require("discord.js"); const { MessageEmbed, version: djsversion } = require("discord.js");
const version = require("../../../package.json").version; const version = require("../../../package.json").version;
const { utc } = require("moment"); const { utc } = require("moment");
// const os = require("os");
module.exports = { module.exports = {
name: "botinfo", name: "botinfo",
description: "Check the info of the bot", description: "Check the info of the bot",
category: "Information", category: "Information",
type: "CHAT_INPUT", type: "CHAT_INPUT",
run: async (client, interaction, args, utils) => { run: async (client, interaction) => {
// const core = os.cpus()[0];
const embed = new MessageEmbed() const embed = new MessageEmbed()
.setTitle(`NYX - CODM Gunsmith Bot`) .setTitle(`NYX - CODM Gunsmith Bot`)
.setURL( .setURL(
@ -43,36 +41,23 @@ module.exports = {
inline: true, inline: true,
} }
) )
.addFields( .addFields({
{
name: `Platform`, name: `Platform`,
value: ` value: `
NYX \`v${version}\` NYX \`v${version}\`
Discord.js \`v${djsversion}\` Discord.js \`v${djsversion}\`
Node.js \`${process.version}\``, Node.js \`${process.version}\``,
} })
// Removed OS Info for troubleshooting.
//
// {
// name: `Hardware`,
// value: `
// Uptime:** ${utils.timer(os.uptime() * 1000, { long: true })}
// Platform:** ${process.platform}
// CPU:**
// \u3000 Cores: ${os.cpus().length}
// \u3000 Model: ${core.model}
// \u3000 Speed: ${core.speed}MHz
// **`,
// inline: true,
// }
)
.addFields({ .addFields({
name: `**${client.author}**`, name: `**${client.author}**`,
value: `**Development Management**\n\u3000Ń1ght#0001\n\u3000Cat drinking a cat#0795\n\u3000mightyful#6536\n\u3000Thunder#2128\n\u3000mobo#9277\n value: `**Development Management**\n\u3000Ń1ght#0001\n\u3000Cat drinking a cat#0795\n\u3000mightyful#6536\n\u3000Thunder#2128\n\u3000mobo#9277\n
**Research & Documentation**\n\u3000𝔔𝓻𝔦𝔁𝔖𝔦ӄø#0690\n\u3000Thunder#2128\n **Research & Documentation**\n\u3000𝔔𝓻𝔦𝔁𝔖𝔦ӄø#0690\n\u3000Thunder#2128\n
**Website**\n\u3000Chunchunmaru#8570`, **Website**\n\u3000Chunchunmaru#8570`,
}) })
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp(); .setTimestamp();
interaction.followUp({ embeds: [embed] }); interaction.followUp({ embeds: [embed] });
}, },

View file

@ -122,7 +122,9 @@ module.exports = {
) )
.setTimestamp() .setTimestamp()
.setColor(client.color) .setColor(client.color)
.setFooter(`Please use /help (Command Name) for more details`) .setFooter({
text: `Please use /help (Command Name) for more details`,
})
.setDescription( .setDescription(
category.commands category.commands
.map(cmd => { .map(cmd => {
@ -168,28 +170,26 @@ module.exports = {
"**Command**:", "**Command**:",
command.name ? `\`${command.name}\`` : "N/A" command.name ? `\`${command.name}\`` : "N/A"
); );
if (command.usage) { if (command.usage)
embed.addField("**Usage**:", `\`/${command.name} ${command.usage}\``); embed.addField("**Usage**:", `\`/${command.name} ${command.usage}\``);
} else { else embed.addField("**Usage**:", `\`/${command.name}\``);
embed.addField("**Usage**:", `\`/${command.name}\``);
} if (command.description)
if (command.description) {
embed.addField("**Description**:", command.description); embed.addField("**Description**:", command.description);
}
if (command.timeout) { if (command.timeout)
embed.addField("**Cooldown**:", utils.timer(command.timeout)); embed.addField("**Cooldown**:", utils.timer(command.timeout));
}
if (command.UserPerms) { if (command.UserPerms)
embed.addField("**Required User Permission**:", UserPerms); embed.addField("**Required User Permission**:", UserPerms);
}
if (command.BotPerms) { if (command.BotPerms)
embed.addField("**Required Bot Permission**:", BotPerms); embed.addField("**Required Bot Permission**:", BotPerms);
}
embed embed
.setFooter( .setFooter({
`Requested by ${interaction.user.tag}`, text: `Requested by ${interaction.user.tag}`,
interaction.user.displayAvatarURL({ dynamic: true }) iconURL: interaction.user.displayAvatarURL({ dynamic: true }),
) })
.setTimestamp() .setTimestamp()
.setURL(client.web) .setURL(client.web)
.setColor(client.color); .setColor(client.color);

View file

@ -1 +0,0 @@
[]

View file

@ -1,7 +1,5 @@
const { DiscordAPIError, HTTPError } = require("discord.js");
const fs = require("fs"); const fs = require("fs");
const cmds = []; const cmds = []ownercmds = [];
const ownercmds = [];
module.exports = async client => { module.exports = async client => {
fs.readdirSync("./events").forEach(file => { fs.readdirSync("./events").forEach(file => {
require(`${process.cwd()}/events/${file}`); require(`${process.cwd()}/events/${file}`);
@ -29,8 +27,7 @@ module.exports = async client => {
ownercmds.push(file); ownercmds.push(file);
}); });
client.on("ready", async () => { client.on("ready", async () => {
const gg = client.guilds.cache.get("840225563193114624"); await client.guilds.cache.get("840225563193114624").commands.set(ownercmds);
await gg.commands.set(ownercmds);
await client.application.commands await client.application.commands
.set(cmds) .set(cmds)
.then(async cmd => { .then(async cmd => {