Functionalities
Other
$findUser
Returns the ID of the user with the provided ID/name/mention. Define the 2nd field as `mention` to return the ID as a mention. If the bot cannot find a valid user, bot will return `undefined`.

FUNCTION USAGE

  • $findUser[user]
  • $findUser[user;mention]
  • $findUser[user;name]
  • $findUser[user;tag]

Properties:

user - Define a user to return it's ID. Can be name, ID or mention. mention - Type the word mention to have the bot mention the user. name - Type the word name to have the bot return the user's username. tag - Type the word tag to have the bot return the user's tag.

Example 1: Getting the user ID.

1
bot.Command({
2
name: "test",
3
code: `
4
$findUser[$message[]]
5
`
6
})
Copied!

Example 2: Type the word mention in the 2nd field to return the user mention.

1
bot.Command({
2
name: "test",
3
code: `
4
$findUser[$message[];mention]
5
`
6
})
Copied!

Example 3: Type the word name in the 2nd field to return the user's username.

1
bot.Command({
2
name: "test",
3
code: `
4
$findUser[$message[];name]
5
`
6
})
Copied!

Example 4: Type the word tag in the 2nd field to return the user's tag.

1
bot.Command({
2
name: "test",
3
code: `
4
$findUser[$message[];tag]
5
`
6
})
Copied!
Last modified 9mo ago
Copy link
Contents
Properties: