This commit is contained in:
Christopher Cookman 2023-07-30 22:31:48 -06:00
parent 3e105a5b92
commit 0b0ad1c6d0
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -149,11 +149,19 @@ client.on("interactionCreate", async interaction => {
content: `Gave ${interaction.options.getMember("user").user.username} ${interaction.options.getNumber("amount")} coins.`, content: `Gave ${interaction.options.getMember("user").user.username} ${interaction.options.getNumber("amount")} coins.`,
ephemeral: true ephemeral: true
}); });
// add + or - to the amount
let amount = interaction.options.getNumber("amount");
if (amount > 0) {
amount = `+${amount}`;
} else {
amount = `-${amount}`;
}
// Send the log to the log channel
// Tell the user their coins were modified // Tell the user their coins were modified
interaction.options.getMember("user").user.send({ interaction.options.getMember("user").user.send({
embeds: [{ embeds: [{
title: "Coins Modified", title: "Coins Modified",
description: `${config.discord.coin} ${interaction.options.getNumber("amount")}`, description: `${config.discord.coin} ${amount}`,
color: 0xFFff00 color: 0xFFff00
}] }]
}); });