Compare commits

..

No commits in common. "7febc06f1e9d616e21bb38b37f77a6eca821dc90" and "de08fa26d77de28d4eb797acafaee4719daed6c7" have entirely different histories.

3 changed files with 5 additions and 5 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "card-drop",
"version": "0.4.1",
"version": "0.4.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "card-drop",
"version": "0.4.1",
"version": "0.4.0",
"license": "MIT",
"dependencies": {
"@discordjs/rest": "^2.0.0",

View file

@ -1,6 +1,6 @@
{
"name": "card-drop",
"version": "0.4.1",
"version": "0.4.0",
"main": "./dist/bot.js",
"typings": "./dist",
"scripts": {

View file

@ -36,11 +36,11 @@ export default class Drop extends Command {
}
try {
await interaction.deferReply();
const image = readFileSync(path.join(process.env.DATA_DIR!, "cards", randomCard.card.path));
const imageFileName = randomCard.card.path.split("/").pop()!;
await interaction.deferReply();
const attachment = new AttachmentBuilder(image, { name: imageFileName });
const inventory = await Inventory.FetchOneByCardNumberAndUserId(interaction.user.id, randomCard.card.id);