forked from creations/badgeAPI
Compare commits
8 commits
Author | SHA1 | Date | |
---|---|---|---|
0ba0181e2b | |||
0f36203c1c | |||
4ff0577906 | |||
53a1bb7d6b | |||
49ab7d6f19 | |||
50c5d5d551 | |||
9d7bd605b7 | |||
e4af3be2ad |
3 changed files with 47 additions and 42 deletions
41
LICENSE
41
LICENSE
|
@ -1,21 +1,28 @@
|
||||||
MIT License
|
BSD 3-Clause License
|
||||||
|
|
||||||
Copyright (c) 2025 [fullname]
|
Copyright (c) 2025, creations.works
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Redistribution and use in source and binary forms, with or without
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
modification, are permitted provided that the following conditions are met:
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
1. Redistributions of source code must retain the above copyright notice, this
|
||||||
copies or substantial portions of the Software.
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
this list of conditions and the following disclaimer in the documentation
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
and/or other materials provided with the distribution.
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
3. Neither the name of the copyright holder nor the names of its
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
contributors may be used to endorse or promote products derived from
|
||||||
SOFTWARE.
|
this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
27
README.md
27
README.md
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
A fast Discord badge aggregation API built with [Bun](https://bun.sh) and Redis caching.
|
A fast Discord badge aggregation API built with [Bun](https://bun.sh) and Redis caching.
|
||||||
|
|
||||||
|
# Preview
|
||||||
|
https://badges.creations.works
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Aggregates custom badge data from multiple sources (e.g. Vencord, Nekocord, Equicord, etc.)
|
- Aggregates custom badge data from multiple sources (e.g. Vencord, Nekocord, Equicord, etc.)
|
||||||
|
@ -56,11 +59,11 @@ GET /:userId
|
||||||
|
|
||||||
### Query Parameters
|
### Query Parameters
|
||||||
|
|
||||||
| Name | Description |
|
| Name | Description |
|
||||||
|--------------|--------------------------------------------------------------------------|
|
|--------------|---------------------------------------------------------------------------------------------------|
|
||||||
| `services` | A comma or space separated list of services to fetch badges from |
|
| `services` | A comma or space separated list of services to fetch badges from, if this is empty it fetches all |
|
||||||
| `cache` | Set to `true` or `false` (default: `true`). `false` bypasses Redis |
|
| `cache` | Set to `true` or `false` (default: `true`). `false` bypasses Redis |
|
||||||
| `seperated` | Set to `true` to return results grouped by service, else merged array |
|
| `seperated` | Set to `true` to return results grouped by service, else merged array |
|
||||||
|
|
||||||
### Supported Services
|
### Supported Services
|
||||||
|
|
||||||
|
@ -68,6 +71,8 @@ GET /:userId
|
||||||
- Equicord
|
- Equicord
|
||||||
- Nekocord
|
- Nekocord
|
||||||
- ReviewDb
|
- ReviewDb
|
||||||
|
- Enmity
|
||||||
|
- Discord ( some )
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
|
@ -75,20 +80,12 @@ GET /:userId
|
||||||
GET /209830981060788225?seperated=true&cache=true&services=equicord
|
GET /209830981060788225?seperated=true&cache=true&services=equicord
|
||||||
```
|
```
|
||||||
|
|
||||||
## Development
|
|
||||||
|
|
||||||
Run formatting and linting with BiomeJS:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
bun run lint
|
|
||||||
bun run lint:fix
|
|
||||||
```
|
|
||||||
|
|
||||||
## Start the Server
|
## Start the Server
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
bun i
|
||||||
bun run start
|
bun run start
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
[MIT](LICENSE)
|
[BSD 3](LICENSE)
|
||||||
|
|
|
@ -1,23 +1,24 @@
|
||||||
export const discordBadges = {
|
export const discordBadges = {
|
||||||
// User badges
|
// User badges
|
||||||
|
STAFF: 1 << 0,
|
||||||
|
PARTNER: 1 << 1,
|
||||||
HYPESQUAD: 1 << 2,
|
HYPESQUAD: 1 << 2,
|
||||||
|
BUG_HUNTER_LEVEL_1: 1 << 3,
|
||||||
HYPESQUAD_ONLINE_HOUSE_1: 1 << 6,
|
HYPESQUAD_ONLINE_HOUSE_1: 1 << 6,
|
||||||
HYPESQUAD_ONLINE_HOUSE_2: 1 << 7,
|
HYPESQUAD_ONLINE_HOUSE_2: 1 << 7,
|
||||||
HYPESQUAD_ONLINE_HOUSE_3: 1 << 8,
|
HYPESQUAD_ONLINE_HOUSE_3: 1 << 8,
|
||||||
|
PREMIUM_EARLY_SUPPORTER: 1 << 9,
|
||||||
STAFF: 1 << 0,
|
TEAM_USER: 1 << 10,
|
||||||
PARTNER: 1 << 1,
|
SYSTEM: 1 << 12,
|
||||||
CERTIFIED_MODERATOR: 1 << 18,
|
BUG_HUNTER_LEVEL_2: 1 << 14,
|
||||||
|
|
||||||
VERIFIED_DEVELOPER: 1 << 17,
|
VERIFIED_DEVELOPER: 1 << 17,
|
||||||
|
CERTIFIED_MODERATOR: 1 << 18,
|
||||||
|
SPAMMER: 1 << 20,
|
||||||
ACTIVE_DEVELOPER: 1 << 22,
|
ACTIVE_DEVELOPER: 1 << 22,
|
||||||
|
|
||||||
PREMIUM_EARLY_SUPPORTER: 1 << 9,
|
|
||||||
|
|
||||||
BUG_HUNTER_LEVEL_1: 1 << 3,
|
|
||||||
BUG_HUNTER_LEVEL_2: 1 << 14,
|
|
||||||
|
|
||||||
// Bot badges
|
// Bot badges
|
||||||
|
VERIFIED_BOT: 1 << 16,
|
||||||
|
BOT_HTTP_INTERACTIONS: 1 << 19,
|
||||||
SUPPORTS_COMMANDS: 1 << 23,
|
SUPPORTS_COMMANDS: 1 << 23,
|
||||||
USES_AUTOMOD: 1 << 24,
|
USES_AUTOMOD: 1 << 24,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue