This commit is contained in:
night0721 2022-01-25 06:42:19 +08:00
parent 6e8fbe15e7
commit c52c2880c6
2 changed files with 5 additions and 5 deletions

View file

@ -1,6 +1,6 @@
const common = require("../../util/functions/common"); const common = require("../../util/functions/common");
const data = require("../../util/Data/data.json"); const data = require("../../util/Data/data.json");
const Discord = require("discord.js"); const { MessageEmbed } = require("discord.js");
let currGun, let currGun,
currStats, currStats,
@ -54,10 +54,10 @@ module.exports = {
run: async (client, interaction, args) => { run: async (client, interaction, args) => {
recoilAvailable = false; recoilAvailable = false;
hasError = false; hasError = false;
console.log(args); console.log(args, args.join("+"));
const repEmb = statsHandler(args.join(" ").replace("\n", " ")); const repEmb = statsHandler(args.join(" ").replace("\n", " "));
if (hasError) { if (hasError) {
interaction.followUp({ embeds: [repEmb] }); interaction.followUp({ embeds: [new MessageEmbed(repEmb)] });
} }
if (recoilAvailable) { if (recoilAvailable) {
repEmb.fields.push({ repEmb.fields.push({
@ -68,7 +68,7 @@ module.exports = {
const recoilImageLink = await chart.getShortUrl(); const recoilImageLink = await chart.getShortUrl();
repEmb.image = { url: recoilImageLink }; repEmb.image = { url: recoilImageLink };
} }
interaction.followUp({ embeds: [repEmb] }); interaction.followUp({ embeds: [new MessageEmbed(repEmb)] });
}, },
}; };

View file

@ -166,7 +166,7 @@ module.exports = {
inline: false, inline: false,
} }
) )
.setThumbnail(`${d.preview}`) .setThumbnail(d.preview)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL())
.setColor( .setColor(
d.type == "lethal" d.type == "lethal"