Mention Arguments
Sometimes instead of receiving a value, like a string or a number, argument must be a mention.
In this chapter we will show you how to write the PokeCommand
, that will receive the argument:
user
The user argument must be a mention. We will then send a private message to the user.
PokeCommand
#
Writing the path/to/your/app/src/Commands/PokeCommand.ts
info
The Mention
type extends from User
of Discord.js so you can use all the methods from it.
PokeCommand
#
Testing You can test the PokeCommand
by sending:
Your bot should send ๐
as a private message.