K
Docs
API ReferencePiecesFetch Member
🔎

Fetch Member

base.member.fetchBase SetUser

Finds a member of your server by their Discord user ID and loads their info — username, roles, join date, and more — as a Spark you can use anywhere. Useful when you need data about someone other than whoever triggered the flow.

When to use this
  • Great with slash command options — {{options.user}} lets the invoker pick someone
  • Access their data like {{member.name}}, {{member.roles}}, {{member.joinedAt}}

On the canvas

This is what Fetch Member looks like when you place it on your flow. Each field below is something you configure in the inspector panel.

🔎
Fetch Member
base.member.fetch
User
userIdrequired
{{user.id}} or paste an ID
asrequired
member (becomes a Spark!)
found
empty

Config fields

FieldTypeReqWhat it does
userId
{{user.id}} or paste an ID
textyesUser ID 👤
as
member (becomes a Spark!)
textyesSave as ✨

Sparks this piece adds

After this piece runs, these values are available as sparks in every node downstream.

{{member}}stringFetched member's data
{{member.name}}stringMember's username

Output ports

foundMember found — their info is available as a Spark
emptyNo member with that ID in this server
📐

In TypeScript, this would be…

Not something you need to write — just a look at what Kitcord does for you.

TypeScript
const member = await guild.members.fetch(userId);
// {{member.name}}, {{member.roles}}, {{member.joinedAt}}
if (!member) {
  // Not found port
}