Giter Club home page Giter Club logo

tipbot's People

Contributors

cryptrip avatar fr1t2 avatar jackalyst avatar successor1 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

tipbot's Issues

Create bounties and track with Tipbot

Describe the solution you'd like

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

Initiation

  • Only a moderator or higher can submit a new bounty or close one.
  • to open one must give { BOUNTY_NAME, ITERATIONS or PAID_IN_FULL, TTL, PAYOUT, INITIATOR, DESCRIPTION }
    • Bot will open a new entry in DATABASE.TABLE for the bounty, assign an ID, and create an entry in the bounties page {qrl.tips website repo}
    • Users can send tips to the bounty, using name or ID to help fund and give incentive
    • Users can also simply vote on the bounty, adding importance to the task, giving better insight to what the community wants worked on first

Submission

  • When a user believes they have completed a bounty, they send a message to the bot which notifies a moderator or core member, with some proof of completion {link to work, repo, photo, description etc.}
    • Moderator reviews the task complete and the bounty, and upon approval sends a bounty-verify approval with {users ID, bounty ID,
    • Once 2 mods or admin agree on the completion the bot sends funds to the users tipbot address

Stale Bounties

  • If no users complete the task in allotted TTL the bot returns the tipped funds to...
    • The users who donated?
    • Sends them to a general bounty fund?
    • Sends them to the faucet?

Database New tables

Added tables to the database to track the bounty system

bounty

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      |              |      |     |         |                |
+-----------------+--------------+------+-----+---------+----------------+

bounty_votes

Table to hold the votes users send

+------------+--------------+------+-----+---------+----------------+
| Field      | Type         | Null | Key | Default | Extra          |
+------------+--------------+------+-----+---------+----------------+
| id         |              |      |     |         |                |
| bounty_id  |              |      |     |         |                |
| user_id    |              |      |     |         |                |
| vote       |              |      |     |         |                |
| time_stamp |              |      |     |         |                |
+------------+--------------+------+-----+---------+----------------+

bounty_fund

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  |              |      |     |         |                |
+-------------+--------------+------+-----+---------+----------------+

bounty_submissions

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  |              |      |     |         |                |
+-------------+--------------+------+-----+---------+----------------+

Bounty_payout

Table to hold the information from contribution payouts

+--------------+--------------+------+-----+---------+----------------+
| Field        | Type         | Null | Key | Default | Extra          |
+--------------+--------------+------+-----+---------+----------------+
| id           |              |      |     |         |                |
| bounty_id    |              |      |     |         |                |
| paid_user_id |              |      |     |         |                |
| tx_id        |              |      |     |         |                |
| time_stamp   |              |      |     |         |                |
+--------------+--------------+------+-----+---------+----------------+

[BUG] - UTF-8 in Usernames

Describe the bug

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.

To Reproduce

Steps to reproduce the behavior:

  1. Either by signing up with utf-8 in username or tipping a user who has this condition in place.
  2. see that the bot no longer responds to a message

Expected behavior

User added to database accordingly or a future tip sent with user name as shown stored

[IMPROVEMENT] - Clean tipbot tip messages after a set duration

What would you like improved?

After a period of time, (15min?), clear the inline tipbot confirmation messages when sending a tip.

Improvement

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.

Missing information in the `+random` DM response - TYPO

Describe the bug

The private message for +random output is missing some information

To Reproduce

Steps to reproduce the behavior:

  1. enter +random in the chat
  2. Read DM and see it is missing information "...public blockchain to the , helping make..."

Expected behavior

Expected the sentence to read "...public blockchain to the drand network, helping make..." with drand network linking to the https://drand.love site

Screenshots

image

Allow tipping to groups of users per role in Discord

Describe the solution you'd like

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.

Describe alternatives you've considered

Alternative is typing out each user in the chat window

Additional context

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.

[BUG] - Different tip amounts results in an error and no transaction sent

Describe the bug

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)

To Reproduce

Steps to reproduce the behavior:

  1. Go to the QRL Discord
  2. Enter the values 64.01, 32.307, 32.258, or 4.2288 as a tipbot amount
  3. See error

Expected behavior

No error with the transaction going through

Screenshots

Screenshot from 2021-12-22 14-29-10

Environment

  • Discord linux application

[IMPROVEMENT] - Add message field to +tip command

What would you like improved?

Add message functionality to the +tip command, adding optional message text to the transfer transaction on-chain.

Improvement

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:

  • Additional parsing of the message sent from users
  • Validation and sanitation of text entered
  • Additional field for message in the tips database
  • A deliminator to signify a message is to be sent.
  • Additional checks for message length
  • Procedure for message over length
    • Strip additional text
    • Fail entire tip
    • Send tip without message
  • Additional function to the send transaction function to add message text

Is this improvement request related to a Bug Report?

no

[IMPROVEMENT] - Faucet pull countdown/timer in negative faucet response

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

[IMPROVEMENT] - Add additional `+info` args to the Help command

What would you like improved?

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

Improvement

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 infoThis information should be added to the general help output args: {market | exchange | faucet | bot | user | qrl}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.