Commit graph

10 commits

Author SHA1 Message Date
Ethan Lane 037608e059 Add error codes and error messages to failed results (#89)
All checks were successful
continuous-integration/drone/push Build is passing
# Description

- Added an Error Code (enum) and Error Message (string) to all the failed results

#53

## Type of change

Please delete options that are not relevant.

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

# How Has This Been Tested?

- This has been tested both manually as well as the unit tests

# 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: https://gitea.vylpes.xyz/RabbitLabs/random-bunny/pulls/89
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2023-09-15 15:18:57 +01:00
Ethan Lane 07c37e2c06 Add default value to sortBy variable (#87)
All checks were successful
continuous-integration/drone/push Build is passing
# Description

- Add default value to the sortBy variable ('hot')

#50

## 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: https://gitea.vylpes.xyz/RabbitLabs/random-bunny/pulls/87
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Co-committed-by: Ethan Lane <ethan@vylpes.com>
2023-09-15 15:15:34 +01:00
Ethan Lane e766a42235 Fix bug where the randomiser would pick -1
All checks were successful
continuous-integration/drone/push Build is passing
This was caused by the randomiser using the wrong brackets.

We needed the maximum index of the length - 1, but the randomiser would
take the 1 AFTER randomising, adding brackets made it do this BEFORE.
2023-05-29 16:48:01 +01:00
Vylpes 06485e0a88 Setup Jest (#57)
All checks were successful
continuous-integration/drone/push Build is passing
- Setup Jest
- Add test scripts
- Configure Drone

Fixes #1

Co-authored-by: Ethan Lane <ethan@vylpes.com>
Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/random-bunny/pulls/57
2023-04-22 13:20:30 +01:00
Ethan Lane cd541ddd4f Update project to allow for ESM modules 2023-02-27 18:33:32 +00:00
Ethan Lane 089f693413 Remove maxTries variable 2023-02-22 18:18:50 +00:00
Vylpes 031a5455b5 hotfix/2.0.3 (#41)
- Bump minimatch from 3.0.4 to 3.1.2
- Update discord links

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ethan Lane <ethan@vylpes.com>
Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/random-bunny/pulls/41
Reviewed-by: VylpesTester <tester@vylpes.com>
2022-12-18 15:27:03 +00:00
Ethan Lane dbf1d03524
Make sortBy optional 2021-12-01 20:53:45 +00:00
Ethan Lane d32b44052c
Replace fetch with got 2021-12-01 20:39:02 +00:00
Ethan Lane f673339d90
rewrite in typescript 2021-12-01 20:32:20 +00:00