Skip to content

refLib

refLib

refLib provides tools for creating and tracking referral systems.

It is useful for invite programs, growth tracking, and reward-based user onboarding.

refLib is available through the Libs instance.

Generate a referral link for the bot.

let refLink = Libs.refLib.getRefLink(bot.name)

This creates a unique referral link that can be shared with others.

Count User Referrals

Get the number of users referred by a specific user.

let count = Libs.refLib.getRefCount(user.id)

This returns the total referral count for that user.

Notes

  • Referral tracking is handled automatically
  • Works across user sessions
  • Useful for reward or invite-based systems

Full Documentation

refLib Documentation