Client.onPress() - shysolocup/noscord.js GitHub Wiki

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




⚠️ **GitHub.com Fallback** ⚠️