Commit graph

139 commits

Author SHA1 Message Date
01dec14b6c Merge branch 'develop' into feature/CD-415 2025-04-24 19:15:08 +01:00
f38451a7b4 Merge branch 'main' into develop 2025-04-23 10:41:27 +01:00
c4e345cc46 Fix linting 2025-04-23 10:41:20 +01:00
633e5fe95f Merge branch 'main' into develop 2025-04-23 10:40:21 +01:00
659906e562 Add catch to image grid generator 2025-04-23 10:40:06 +01:00
c3e328d538 Merge branch 'main' into develop 2025-04-22 16:15:16 +01:00
1796f2519e Add error handler to series view command 2025-04-22 16:12:04 +01:00
0eda06fe3d Merge branch 'main' into develop 2025-04-22 15:40:02 +01:00
9b34bc65a7 Fix droprarity and dropnumber commands ()
- Fix the droprarity and dropnumber commands with the changes previously made regarding image urls
- Add a `CatchError` function to the app logger to easily send caught errors to the error logs
- Add choices to the droprarity command to make them easier to select



Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2025-04-22 15:12:10 +01:00
ad34cc7b7f Fix remote image urls not showing up in image grids ()
- Update the Image Grid helper to download images that are urls instead of trying (and failing) to load them locally



Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2025-04-20 10:52:54 +01:00
f32a39331d Plan tests 2025-04-07 18:42:47 +01:00
673f0d0810 Remove restriction that the last drop can only be claimed by the user who dropped it 2025-04-04 19:03:54 +01:00
2ab3ea1105 Update PurgeClaims timer to purge after 2 minutes 2025-04-04 19:03:21 +01:00
aafcfd664a Update the time until anyone can claim the card to 2 minutes 2025-04-04 18:56:58 +01:00
f98f15b06a Update drop mechanic to take currency on drop instead of claim 2025-04-04 18:56:13 +01:00
5089ad6ab6 Command to allow the user to buy more effects ()
# Description

- Create a command to generate an embed for the user to be able to buy more effects
- This embed will contain the details about the effect as well as 2 buttons; Confirm and Cancel
- The confirm button will call the button event to:
    - Remove the currency from the user
    - Give the user the effect to their inventory
- The cancel button will just disable the buttons, so the user can't accidentally use it if they don't want to.



## Type of change

Please delete options that are not relevant.

- [x] New feature (non-breaking change which adds functionality)

# How Has This Been Tested?

- Have created unit tests and tested locally

# Checklist

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that provde my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules

Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2025-03-26 18:30:16 +00:00
c6b458199c Add friendly name and active effect to user effect list embed ()
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

- Add friendly name to list embed
- Add currently active effect to list



## Type of change

Please delete options that are not relevant.

- [x] New feature (non-breaking change which adds functionality)

# How Has This Been Tested?

Please describe the tests that you ran to verify the changes. Provide instructions so we can reproduce. Please also list any relevant details to your test configuration.

# Checklist

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that provde my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules

Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2025-02-03 18:24:27 +00:00
a3248e978a Create use effect command ()
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.



## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

# How Has This Been Tested?

Please describe the tests that you ran to verify the changes. Provide instructions so we can reproduce. Please also list any relevant details to your test configuration.

# Checklist

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that provde my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules

Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2025-01-25 17:29:01 +00:00
3e81f8ce1d Update id command from merge 2025-01-19 15:19:28 +00:00
7213703f66 Merge branch 'main' into develop 2025-01-19 15:18:50 +00:00
b8623398a6 Implement ability to add images in the drop via an external url 2025-01-19 15:07:40 +00:00
3d143e7c73 Create list effects command ()
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.



## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

# How Has This Been Tested?

Please describe the tests that you ran to verify the changes. Provide instructions so we can reproduce. Please also list any relevant details to your test configuration.

# Checklist

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that provde my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules

Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-12-07 22:32:19 +00:00
d7a5472759 Create effects concept ()
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.



## Type of change

Please delete options that are not relevant.

- [x] New feature (non-breaking change which adds functionality)

# How Has This Been Tested?

Please describe the tests that you ran to verify the changes. Provide instructions so we can reproduce. Please also list any relevant details to your test configuration.

# Checklist

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that provde my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules

Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-11-09 21:31:11 +00:00
e67efd4197 Upgrade packages 2024-10-28 12:03:12 +00:00
73caf9315d Fix build 2024-10-12 20:56:13 +01:00
76af70da06 Merge branch 'main' into develop 2024-10-12 20:53:47 +01:00
ffdf2eb04c Fix Trade command not giving a card if they don't already have it in their inventory 2024-10-12 20:51:22 +01:00
8352b377bb Create ability to drop multiple cards in a row ()
- Create a `/multidrop` command
  - This will take the price of 10 drops from you and give you 11 cards to sort through
  - You then have a choice to keep the card or sacrifice it
- Create the `multidrop keep` and `multidrop sacrifice` button events



Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-10-12 17:30:20 +01:00
f4c02d3613 Update the User entity to be nullable ()
- Update the user entity to be nullable in the typescript side
- The migration script already did this, but if you have the `DB_SYNC` environment variable sync it then it doesn't get set to nullable



Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-10-12 17:26:13 +01:00
1762b525b2 Add dropdown to /inventory command for quick navigation ()
- Add ability to handle dropdown menus with the bot
- Add a dropdown to the inventoryhelper
- Add handler for the dropdown to navigate to that page



Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-09-21 18:09:24 +01:00
c0e9378813 Add ability to sacrifice multiple cards at once ()
- The `/sacrifice` command now accepts an optional parameter to be able to specify the quantity
- The `Sacrifice` button event now accepts a parameter to specify the quantity, this one is required but the command will default it to 1 if not supplied



Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-09-15 16:57:25 +01:00
52c93c7803 Ability to trade multiple cards at once ()
- Add the ability to trade multiple cards at once using an optional quantity field



Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-09-15 16:55:18 +01:00
711d36698b Merge branch 'main' into develop 2024-08-31 13:37:28 +01:00
e8b20004bd Create an admin command to give a breakdown of card stats
- Created a  command for admins to see what cards have been added by type
- Added this information to the logger

2024-08-30 18:47:04 +01:00
5deb6fcc14 Add a colour override for embed colours
- Using a new optional  value in the JSON, if set overrides the default one set by the rarity
- Added a failsafe if the override colour is invalid to default and log a warning

2024-08-29 19:21:53 +01:00
a10eaf7d75 Make the rarity text on the series embed lower case
To be more consistent with the inventory command

2024-08-29 18:53:09 +01:00
66243e6742 Fix fuzzy /view to be consistent with its pages ()
- Fix the `/view` command to have a set amount of cards in its page rotation
- This is done now by updating it so instead of requerying each page turn it instead queries once at the start and passes the top 5 results to the button event



Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-08-24 17:26:26 +01:00
5defb682c1 Update view command to use fuzzy search instead of direct card number ()
- Install `fuse.js` package to allow for fuzzy finding
- Update the `/view` command to use fuzzy search by name instead of the card number
- Add pagination for the command via the `View` button event



Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-08-17 17:26:31 +01:00
097b7284e6 Fix list not being sorted ()
- Fix list on `/allbalance` command not being sorted by currency



Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-07-26 18:29:57 +01:00
b8cd73c570 Create allbalance command to get list of everyone's currency ()
- Create `/allbalance` command for server administrators to be able to get a list of everyone's currency
- This will allow admins to adjust and rebalance currency as desired



Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-07-20 21:42:37 +01:00
f28254e407 Add a subseries field to card metadata ()
- Add an optional "subseries" field to the card metadata function
- If this is present, it overrides the main series field



Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-07-18 19:46:23 +01:00
c0bc71c304 Fix the series view next button not disabling when on the last page ()
- Fix the button disable logic on the `/series view` command not disabling the next button on the last page



Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-07-13 15:17:04 +01:00
42e7bda1ce Fix there being a black background on the image grid ()
- Fix there being a black background on the card image grid
- This was being caused me loading the images as a jpeg by mistake



Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-07-13 15:16:10 +01:00
b6f814f895 Update the series view command to be in greyscale if the user has not claimed the card ()
- Install `Jimp` package so we can manipulate images
- Update the `ImageHelper` class to accept the user id so we can check if a user has claimed the card
- Update the `/series view` command to pass the user id into the ImageHelper



Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-07-12 17:35:12 +01:00
29bb22a819 Update the series list command to say cards instead of x ()
- Update the /series list command so that it says "cards" instead if "x", for example `39 cards`



Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-07-12 16:09:26 +01:00
acfdcb17f2 Add image grid to the series view command ()
- Add the image grid to the series view command
- Moved the image generation logic to its own class so we can have common logic between them
- Fixed a bug where paginated commands that deferred (series view, inventory) were creating new messages, rather than updating



Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-07-09 17:45:50 +01:00
1b9857dfe5 Add card count onto the series list command ()
- Add the card count to the series list command
- Fixed the series view command showing the card count excluding the current page, due to the splicing logic



Reviewed-on: 
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-07-08 17:55:55 +01:00
1360452ffd Fix the view command having the claimed by field when it doesn't need it ()
- Remove the "claimed by" field from the card embed generator if its not supplied
- This does affect the drop command, now the drop command only shows the field upon claim, but I think that looks better



Reviewed-on: 
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-07-08 17:55:12 +01:00
b06fe11871 Add the amount of currency a user has to the drop command ()
- Updated the card embed generator to use fields instead of just dumping everything in the description
- Add the currency a user has to the embed as a field



Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-07-06 19:16:16 +01:00
5c317be4d5 Add how much currency the user will lose if they claim a card ()


Reviewed-on: 
Reviewed-by: VylpesTester <tester@vylpes.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2024-07-06 19:14:16 +01:00