/rain
Split your JEWEL between 10 active members in the last 100 messages
Properties
Permissions
Public
Visibility
Public
Options
amount
Enter the amount of JEWEL you want to rain
true
Description
This command makes will split the specified amount of JEWEL between the last 10 active members.

Mechanics
First, the bot will take the last 100 messages in the current channel.
After that, it will loop through all 100 messages and filter out the user that used the command, all bots, all messages that were bot commands, and every user that either doesn't have an account or the account is not "tippable". If the member qualifies to receive the tip, and it has not yet been added to the array, it's ID will be pushed to an array of users.
Lastly, the top 10 users from that array will be taken and sent to the Tipper contract. The Tipper contract will then split the total amount and instruct the Bank account to update the account balances
In case the user count is below 10 after filtering out all "not-tippable" messages, the tip will be split among that amount.
For example: If 100 JEWEL is rained and only 8 users were active and tippable in the last 100 messages, those 6 users will each receive 12.5 JEWEL
Spamming nonsense messages to catch rain will be noticed and will result in your account being banned from sending and receiving tips
Last updated