Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Tip Event

The Tip event fires whenever a gold transaction occurs. This includes transfers between two players in a room, between a player and a bot, or via DM bot tips. It is commonly used to automate gold-based subscriptions.

Event structure

bot.on('Tip', async (sender, receiver, currency) => {

});

You get three things: the sender who sent the tip, the receiver who received it, and the currency object containing the specific tip information like the amount and type.

The sender and receiver objects

Both the sender and receiver objects inherit from the User object, which contains the id and username.

bot.on('Tip', async (sender, receiver, currency) => {
    console.log(sender.id)        // sender unique Highrise ID
    console.log(sender.username)  // sender display name

    console.log(receiver.id)        // receiver unique Highrise ID
    console.log(receiver.username)  // receiver display name
});

the currency object

bot.on('Tip', async (sender, receiver, currency) => {
    console.log(currency.amount)  // currency amount that got tipped
    console.log(currency.type)  // type of the currency that got tipped (usually gold)
});

Gold tips in Highrise can only be sent in specific denominations. You will always get one of these values for currency.amount:

AmountName
11 gold bar
55 gold bars
1010 gold bars
5050 gold bars
100100 gold bars
500500 gold bars
10001k gold bars
50005k gold bars
1000010k gold bars

Common patterns

Thanking tippers

The most basic use of this event is acknowledging tips in chat:

bot.on('Tip', async (sender, receiver, currency) => {
    await bot.message.send(
        `Thank you ${sender.username} for the ${currency.amount} gold!`
    );
});

Detecting tips to the bot specifically

If you only want to react when someone tips the bot and not when users tip each other:

bot.on('Tip', async (sender, receiver, currency) => {
    if (receiver.id !== bot.metadata.bot_id) return;

    await bot.message.send(
        `${sender.username} just tipped the bot ${currency.amount} gold!`
    );
});

Summary

  • The Tip event fires every time someone tips in the room
  • You get the sender, receiver, and currency objects
  • currency.amount is always one of the valid gold bar denominations
  • Check receiver.id === bot.metadata.bot_id if you only want to react to tips sent to the bot
  • Common uses are thank you messages, leaderboards, tip rewards, and voting systems
  • Use rewardedUsers sets or similar guards to prevent rewards from triggering multiple times