$findMember

Searches for a user in the current server by their nickname, ID, mention, username, or username with discriminator. Returns userID of the found user.

Usage:

$findMember[query;returnCurrentUser]
  1. query - Can be userID, nickname, mention, username, username#descriminator.
  2. returnCurrentUser - (Optional) default value: yes. Can be either yes or no. If this is set to yes, when user is not found, it will return $authorID. If it's no, and user is not found, it will return undefined.

Example

Searching for existing user

User04/23/2025
!!exec $findMember[user2;no]
Custom Command Bot 04/23/2025
123456789123456789

Searching for invalid user

User04/23/2025
!!exec $findMember[user123;no]
Custom Command Bot 04/23/2025
undefined

Cache

This function works on the bot's cache to find members. If the user is not cached, the function will not find them. User will be cached after they trigger any command from this bot, but eventually they will get deleted.
To have all members cached, you will need Tier 5 Bot.

Function difficulty: Medium
Tags: search find member