Open furlongi opened 2 years ago
Probably gonna start working on this soon
Initial Embed Creation is done, as well as primitive implementation of both bill
and form
!bill chai 12.12
, which will have the same effect as !bill @chai#0002 12.12
Created UID Generator in utils
folder. Takes in a int and generates a UID of that length using alphanumeric characters excluding vowels
bc, billc, billcollection
displays your invoices from others
bi
displays your latest invoice, but can be refined to search for a specific one given you have the right code
pay
allows you to pay the most recent one, as well as specify. Likewise, doing bi
will also allow you to pay
Addressed issue where people would be able to bill themselves. I was gonna address it later but someone decided to charge themselves 10000000.
Re-factored code that was being re-used. Such as creating the confirmation buttons in a util file rather than each implementation. However, each functions usage of the confirm button is different, so each function has it's own confirm_button
callback, so that it can do it's own unique actions:
bill
- confirms bill and puts it in the databasepay
& bi
- pay for bills and set paid
and paid_on
variables in databasesFuture commands such as remove_charge
would also use this feature.
Dynamic Timestamps added to anything that uses them! Hovering over the date or clicking on it will tell you exactly when the bill was created or paid.
Started working on billmultiple
feature. This one is most likely gonna take the longest but mainly because of how data needs to be parsed and obtained. Once data is obtained though, it's relatively easy as only one Invoice Entry needs to be created, and then one Invoice_Participant entry for each participant.
Database design is as follows:
Invoice | ID | Payer_ID| Amount | Timestamp |
Invoice Particpants | ID | Invoice_ID (Above) | Payee_ID || Amount | Paid? | Paid Timestamp
The mindset of this though, is that since bi
queries the participant database with id=participant_id
only their respective bills will come up
I can bill Manny for $12.12 and Ivan for $15.12 in the same invoice with say key GJ1M
. If Manny bi
it will show his bill, and if Ivan bi
it will show his bill respectively. This way, the invoice can still exist, but others can pay.
Future updates and implementations will allow owners of invoice to see which members have yet to pay!
Split Transactions from Multi-Bill are live and live in the billmultiple
command. More aliases may come in the future while developing.
Important issues to still address would be how to split a bill, or how to fundamentally store a bill. For example, as of right now:
The Split Evenly feature works as follows:
The potential confusion in this lies in the fact that the bills "total" is fundamentally displayed as $300, but only $200 dollars needs to be collected. May need further discussion on how to fully implement.
If anything, this can be a quick statement in the bill description saying that owner has already paid x amount
As friends, we tend to owe money to each other after eating out and stuff. Having a way to keep track will be nice
A db is needed.
Commands should list what you owe to who, who owes you what, and ability to "pay" (reduce amount owe after money sent)
Up to you to figure out the design. But here are some recommendations: