theqrl-community / tipbot Goto Github PK
View Code? Open in Web Editor NEWTipbot written in JavaScript to enable tipping of QRL across social media sites.
Home Page: https://qrl.tips
License: MIT License
Tipbot written in JavaScript to enable tipping of QRL across social media sites.
Home Page: https://qrl.tips
License: MIT License
Bounty submission and tipping system for the tipbot
Add the ability to create and vote on plus sponsor activities through a bounty system. Tipbot tracks the bounty details, votes, and donations. Once bounty is completed the bot will pay out the contributor that completed the task.
Set it up so that only Discord moderators can create and complete the bounties. Once a bounty is created any user can vote on and donate to the bounty from the tipbot account. A contributor can submit a completed task to more than one moderator with proof and the moderators vote to pay out the bounty. Once the bounty payout has received 2 votes it pays out.
Requires a few new commands or one large multiplexed command
bounty-create
bounty-vote
bounty-fund
bounty-submit
bounty-verify
bounty-verify
approval with {users ID, bounty ID,Added tables to the database to track the bounty system
Table to hold the bounty information
+-----------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+--------------+------+-----+---------+----------------+
| id | | | | | |
| bounty_name | | | | | |
| mod_id | | | | | |
| guild_id | | | | | |
| payout_limit | | | | | |
| payout_min | | | | | |
| ttl | | | | | |
| initiating_user | | | | | |
| description | | | | | |
| active | | | | | |
| status | | | | | |
| time_stamp | | | | | |
+-----------------+--------------+------+-----+---------+----------------+
Table to hold the votes users send
+------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+----------------+
| id | | | | | |
| bounty_id | | | | | |
| user_id | | | | | |
| vote | | | | | |
| time_stamp | | | | | |
+------------+--------------+------+-----+---------+----------------+
Table to hold the users fund information. If user dictates they can leave any un-spent funds to be donated to the faucet.
Any use that is no longer active or banned after placing bounty funds forfeits their funding contribution.
All fees are taken from the contribution upon returning.
+-------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+----------------+
| id | | | PRI | | |
| bounty_id | | | | | |
| user_id | | | | | |
| fund_amount | | | | | |
| donate | | | | | |
| time_stamp | | | | | |
+-------------+--------------+------+-----+---------+----------------+
Table to hold the submissions for a user to collect funds. Requires 2 entries from seperate moderators or core members
+-------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+----------------+
| id | | | PRI | | |
| bounty_id | | | | | |
| mod_id | | | | | |
| sub_user_id | | | | | |
| proof | | | | | |
| time_stamp | | | | | |
+-------------+--------------+------+-----+---------+----------------+
Table to hold the information from contribution payouts
+--------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+--------------+------+-----+---------+----------------+
| id | | | | | |
| bounty_id | | | | | |
| paid_user_id | | | | | |
| tx_id | | | | | |
| time_stamp | | | | | |
+--------------+--------------+------+-----+---------+----------------+
When a user has signed up with discord and gives a utf-8 type symbols in a username the MySQL database cant process and fails.
Steps to reproduce the behavior:
User added to database accordingly or a future tip sent with user name as shown stored
After a period of time, (15min?), clear the inline tipbot confirmation messages when sending a tip.
It seems that the tipbot messages are there to indicate a successful transfer, but after they are read, they served its purpose. Beyond that, for record keeping, a message is also sent in the DM.
Should a public way to indicate a tip is sent be still desired, a cleaner way could be to add an emoji to the person tipping when it's been complete.
The private message for +random
output is missing some information
Steps to reproduce the behavior:
+random
in the chatExpected the sentence to read "...public blockchain to the drand network, helping make..." with drand network linking to the https://drand.love site
When user already has an account, and they attempt to sign up again the DM message with the users address is incorrect. Leads to https://explorer.theqrl.org/a/undefined
Steps to reproduce the behavior:
Link to user wallet in the QRL explorer
Allow the ability to tip a role, sending that amount of tip to each user in the role if tipping user has the balance.
example +tip @developer
to send a tip to all users in that role.
Alternative is typing out each user in the chat window
Transactions are limited to 100 receiving addresses and if the role is over this amount the bot will either need to split into 2 transactions or deny the request.
Certain amounts when tipping results in the error: "Invalid Amount Given", when it is a completely valid amount (a positive Float of between 10^-9 and 105000000 QRL)
Steps to reproduce the behavior:
No error with the transaction going through
Add message functionality to the +tip
command, adding optional message text to the transfer transaction on-chain.
Add a way to append a message to the tip transaction giving a user ability to send textual messages on-chain through the tipbot. Message should have some delineation from the tip command to indicate to the bot the message should be sent with the tip.
Possible examples:
+tip @fr1t2 1 msg: MESSAGE TEXT TO SEND, MAX 80 bytes
+tip @fr1t2 1 {MESSAGE TEXT TO SEND, MAX 80 bytes}
Requires:
no
Right now when someone issues a the +faucet
command when they've already withdrawn within a 24 hour period, it responds back with the information that they've already pulled from the faucet recently.
As it can be difficult to discern when the faucet will be ready to pull from again, adding a timer to the faucet response to indicate the next time someone can initiate the faucet command would help.
Suggested by Discord user MrTr3
Add the optional argument outputs to the help for +info
when you enter the +help
command
Currently the help output only states .info - Information about this bot and the QRL Network
Would like to have all of the various arguments to give user an idea of what the command can do
Better output can be found with +help info
This information should be added to the general help output args: {market | exchange | faucet | bot | user | qrl}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.