phone, and we will give it two sub commands,
call, so when we use them, they will be as follows:
slashcommandsdirectory at the root of the project and add a file named
PhoneCommand.ts. Then add the following code:
textis match, log "Texting!"
callis match, log "Calling!"
/phone textand the app will print "Texting!" to the console, or you can type
/phone calland the app will print "Calling!" to the console.
If you don't see the result, enable info logs in your instance at Administration > Logs > Log Level by selecting "1 - Errors and Information".
PhoneCommand.ts, add the following private method:
console.logs from the switch block of the
executormethod and call the
modifyare the arguments passed to the
executormethod and they will be passed over to the
/phone call, you'll receive the response in the chat, as your user.