πŸ’° On_tip

πŸ’° On_tip

Added on version 23.1.0b0
on_tip(self, sender: User, receiver: User, tip: CurrencyItem | Item) -> None Called when a tip is received in the room.

βš™οΈ Use cases

This method return the User class of the sender, the User class of the receiver and the CurrencyItem class when a tip is sent in the room.
async def on_tip(self, sender: User, receiver: User, tip: CurrencyItem | Item) -> None: print (f"{sender.username} tipped {receiver.username} an amount of {tip.amount}")
In this example the bot will print on the terminal the Sender’s username, the Receiver’s username and the amount of the tip given.
notion image
notion image

Built with Potion.so