Custom Command
FunctionsMember Functions

$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

Member
9/5/2026
!!exec $findMember[user2;no]
Custom Command
APP
9/5/2026
123456789123456789

Searching for invalid user

Member
9/5/2026
!!exec $findMember[user123;no]
Custom Command
APP
9/5/2026
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.

Related Functions: $userID $authorID

Function difficulty: Medium

Tags: search find member

On this page