Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gx1285 committed Jul 18, 2023
1 parent 0048a41 commit 553b831
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/interactions/artifacter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { AttachmentBuilder, BaseInteraction, Colors, EmbedBuilder } from 'discor
import { writeFileSync } from 'node:fs';
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';

import './artifacter/keep.js';
export default async function (interaction: BaseInteraction) {
if (!interaction.isStringSelectMenu()) return;
if (!interaction.customId.includes('select_build1_uid_')) return;
Expand All @@ -14,7 +14,10 @@ export default async function (interaction: BaseInteraction) {
}&calcmethod=${await database.get(interaction.customId.replace('select_build1_uid_', ''))}`,
);
if (response.ok) {
writeFileSync('src/interactions/artifacter/' + interaction.id + '.png', Buffer.from(await response.arrayBuffer()));
writeFileSync(
'dist/src/interactions/artifacter/' + interaction.id + '.png',
Buffer.from(await response.arrayBuffer()),
);
} else {
return await interaction.editReply({
embeds: [
Expand Down
1 change: 1 addition & 0 deletions src/interactions/artifacter/keep.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// eslint-disable-next-line unicorn/no-empty-file

0 comments on commit 553b831

Please sign in to comment.