Skip to content

Client.onPrefix()

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

adds a new listener to prefix command run events

JS
client.onPrefix(async (ctx) => {       
    console.log("any command has been run");
});   

client.onPrefix("my_command", async (ctx) => {       
    console.log("my command has been run");
});   

Function Sync

Arguments:

  • ?name String
    specific command name 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