Skip to content

Commit

Permalink
use buttons instead of plaintext link
Browse files Browse the repository at this point in the history
  • Loading branch information
artifishvr committed May 19, 2024
1 parent df601e9 commit ccf893c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/commands/forget.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ModelInteractions } from "../util/models/index.js";
import { fetch } from "undici";
import { ButtonBuilder, ButtonStyle, ActionRowBuilder } from "discord.js";

/** @type {import('./index.js').Command} */
export default {
Expand Down Expand Up @@ -56,9 +57,16 @@ export default {
}),
},
)

const button = new ButtonBuilder()
.setLabel('Chat Logs')
.setURL(`${process.env.WASTEBIN_HOST}${(await request.json()).path}`)
.setStyle(ButtonStyle.Link);

await interaction?.editReply({
content: `${toSay}\n\n${process.env.WASTEBIN_HOST}${(await request.json()).path}`,
content: `${toSay}`,
failIfNotExists: true,
components: [new ActionRowBuilder().addComponents(button)],
});

return;
Expand Down

0 comments on commit ccf893c

Please sign in to comment.