Button Click false
- Link Button - Button Disable
This commit is contained in:
@@ -165,10 +165,11 @@ class MessageButton extends BaseMessageComponent {
|
||||
/**
|
||||
* Click the button
|
||||
* @param {Message} message Discord Message
|
||||
* @returns true if the button is clicked
|
||||
* @returns {boolean}
|
||||
*/
|
||||
async click(message) {
|
||||
if (!message instanceof Message) throw new Error("[UNKNOWN_MESSAGE] Please pass a valid Message");
|
||||
if (!this.customId || this.style == 5 || this.disabled) return false; // Button URL, Disabled
|
||||
await message.client.api.interactions.post(
|
||||
{
|
||||
data: {
|
||||
|
Reference in New Issue
Block a user