Skip to content

Commit

Permalink
Merge pull request #23 from m1-dev/docs-changes
Browse files Browse the repository at this point in the history
Fix for ButtonKit & Signals Docs
  • Loading branch information
notunderctrl authored Nov 12, 2023
2 parents c323fa8 + bd53142 commit a3ba9d3
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 107 deletions.
9 changes: 4 additions & 5 deletions apps/docs/pages/docs/buttonkit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,16 @@ ButtonKit is a class that allows you to use buttons easily by extending native [
import { ButtonKit } from 'commandkit';
import { ButtonStyle, ButtonInteraction } from 'discord.js';

// create a button
// Create a button
const button = new ButtonKit()
.setEmoji('👍')
.setStyle(ButtonStyle.Primary)
// custom id is required to use onClick
.setCustomId('button');
.setCustomId('button'); // Required to use onClick

// listen to the button interaction right away
// Listen to the button interaction right away
button.onClick(
(interaction: ButtonInteraction) => {
// reply to the interaction
// Reply to the interaction
interaction.reply('You clicked the button!');
},
{ message },
Expand Down
Loading

0 comments on commit a3ba9d3

Please sign in to comment.