Skip to content

Client.onPress()

github-actions[bot] edited this page Sep 30, 2024 · 8 revisions

adds a new listener to button press events

JS
client.onPress(async (ctx) => {       
    console.log("any button has been pressed");
});   

client.onPress("my_button", async (ctx) => {       
    console.log("my button has been pressed");
});   

Function Sync

Arguments:

  • ?id String
    specific button id to listen for

  • callback Function
    callback ran when the event is fired




🛈 Client

🛈 AddonService

🛈 AttachmentService

🛈 ChannelService

🛈 CommandService

🛈 ComponentService

🛈 ErrorService

🛈 EventService

🛈 ExpressionService

🛈 GuildService

🛈 LogService

🛈 MessageService

🛈 PermissionService

🛈 RoleService

🛈 StorageService

🛈 TypeService

🛈 UserService

🛈 UtilService

🛈 VoiceService


Clone this wiki locally