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 loveEmbed = new MessageEmbed()
.setColor("dd2e44")
.setFooter(`Shipped by ${interaction.user.tag}`)
.setFooter({ text: `Shipped by ${interaction.user.tag}` })
.setTimestamp()
.setTitle(`💘 | Shipping ${user1} and ${user2} | 💘`)
.setDescription(`🔻 | ${user1} \n${ship()}\n🔺 | ${user2}`);

View file

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

View file

@ -9,7 +9,7 @@ module.exports = {
name: interaction.user.tag,
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)
.setFooter({
text: `Made by ${client.author}`,

View file

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

View file

@ -17,10 +17,10 @@ module.exports = {
const member =
interaction.guild.members.cache.get(args[0]) || interaction.member;
const embed = new MessageEmbed()
.setAuthor(
member.user.tag,
member.user.displayAvatarURL({ dynamic: true, size: 1024 })
)
.setAuthor({
text: member.user.tag,
iconURL: member.user.displayAvatarURL({ dynamic: true, size: 1024 }),
})
.setColor(client.color)
.setTitle(`${member.user.username}'s Avatar`)
.setDescription(
@ -41,7 +41,10 @@ module.exports = {
.setImage(
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)
.setTimestamp();
interaction.followUp({ embeds: [embed] });

View file

@ -1,14 +1,12 @@
const { MessageEmbed, version: djsversion } = require("discord.js");
const version = require("../../../package.json").version;
const { utc } = require("moment");
// const os = require("os");
module.exports = {
name: "botinfo",
description: "Check the info of the bot",
category: "Information",
type: "CHAT_INPUT",
run: async (client, interaction, args, utils) => {
// const core = os.cpus()[0];
run: async (client, interaction) => {
const embed = new MessageEmbed()
.setTitle(`NYX - CODM Gunsmith Bot`)
.setURL(
@ -43,36 +41,23 @@ module.exports = {
inline: true,
}
)
.addFields(
{
.addFields({
name: `Platform`,
value: `
NYX \`v${version}\`
Discord.js \`v${djsversion}\`
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({
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
**Research & Documentation**\n\u3000𝔔𝓻𝔦𝔁𝔖𝔦ӄø#0690\n\u3000Thunder#2128\n
**Website**\n\u3000Chunchunmaru#8570`,
})
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL())
.setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp();
interaction.followUp({ embeds: [embed] });
},

View file

@ -122,7 +122,9 @@ module.exports = {
)
.setTimestamp()
.setColor(client.color)
.setFooter(`Please use /help (Command Name) for more details`)
.setFooter({
text: `Please use /help (Command Name) for more details`,
})
.setDescription(
category.commands
.map(cmd => {
@ -168,28 +170,26 @@ module.exports = {
"**Command**:",
command.name ? `\`${command.name}\`` : "N/A"
);
if (command.usage) {
if (command.usage)
embed.addField("**Usage**:", `\`/${command.name} ${command.usage}\``);
} else {
embed.addField("**Usage**:", `\`/${command.name}\``);
}
if (command.description) {
else embed.addField("**Usage**:", `\`/${command.name}\``);
if (command.description)
embed.addField("**Description**:", command.description);
}
if (command.timeout) {
if (command.timeout)
embed.addField("**Cooldown**:", utils.timer(command.timeout));
}
if (command.UserPerms) {
if (command.UserPerms)
embed.addField("**Required User Permission**:", UserPerms);
}
if (command.BotPerms) {
if (command.BotPerms)
embed.addField("**Required Bot Permission**:", BotPerms);
}
embed
.setFooter(
`Requested by ${interaction.user.tag}`,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setFooter({
text: `Requested by ${interaction.user.tag}`,
iconURL: interaction.user.displayAvatarURL({ dynamic: true }),
})
.setTimestamp()
.setURL(client.web)
.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 cmds = [];
const ownercmds = [];
const cmds = []ownercmds = [];
module.exports = async client => {
fs.readdirSync("./events").forEach(file => {
require(`${process.cwd()}/events/${file}`);
@ -29,8 +27,7 @@ module.exports = async client => {
ownercmds.push(file);
});
client.on("ready", async () => {
const gg = client.guilds.cache.get("840225563193114624");
await gg.commands.set(ownercmds);
await client.guilds.cache.get("840225563193114624").commands.set(ownercmds);
await client.application.commands
.set(cmds)
.then(async cmd => {