Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
cataclym committed Nov 6, 2024
2 parents 288d016 + 7c5325c commit b8250d2
Show file tree
Hide file tree
Showing 223 changed files with 9,436 additions and 8,240 deletions.
9 changes: 8 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ DB_NAME=kaikidb
# Docker
NODE_DOCKER_PORT=8080
NODE_ENV=production
# Same as DATABASE_URL but with localhost instead of db as host.
DATABASE_URL_DOCKER_BUILD=

# Bot settings
DADBOT_MAX_LENGTH=256
DADBOT_NICKNAME_LENGTH=32
DADBOT_DEFAULT_ROLENAME=Dadbot-excluded
DADBOT_DEFAULT_ROLENAME=Dadbot-excluded

# Web API
SELF_API_PORT=3636
SELF_API_TOKEN=
CMDLIST_URL=
6 changes: 5 additions & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ rules:
object-curly-spacing:
- error
- always
indent:
- error
- 4
no-mixed-spaces-and-tabs: off
"@typescript-eslint/no-explicit-any": "off"
ignorePatterns:
- dist
- "./CHANGELOG.md"
- "*.md"
3 changes: 1 addition & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ on:

jobs:
build-and-publish-latest:
runs-on: self-hosted

runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected] # Checking out the repo

Expand Down
2 changes: 0 additions & 2 deletions .prettierignore

This file was deleted.

5 changes: 0 additions & 5 deletions .prettierrc.yml

This file was deleted.

94 changes: 89 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,74 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

## [v6.1.15](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.14...v6.1.15)
## [v6.1.21](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.20...v6.1.21)

### Commits

- Reworked emote argument (UNTESTED) [`e4ceea5`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/e4ceea5578722e618b8ad32504cd918f1f7ad704)
- Reworked addemote [`706304f`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/706304f0f0ca8f8644406537a7f5cb7a9a97269c)
- Improved formatting in anime and manga commands [`81735ec`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/81735ecdabd7a3105dae5d6e101cf468c59bf745)

## [v6.1.20](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.20-5...v6.1.20) - 2024-08-06

## [v6.1.20-5](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.20-4...v6.1.20-5) - 2024-08-04

### Commits

- forgot something [`415fa8b`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/415fa8b883f1ad099aa5619aa14ee30652a4443f)

## [v6.1.20-4](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.20-3...v6.1.20-4) - 2024-08-04

### Commits

- Added prisma generate to build script [`ec11afe`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/ec11afe32b27bb3aa7878fe59f4b01877c2a3cce)
- Hotfix for bad filtering?? [`2ac79fa`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/2ac79fae87d5b3cf1bdf62c9f265fabd270c068e)

## [v6.1.20-3](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.20-2...v6.1.20-3) - 2024-08-03

## [v6.1.20-2](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.19...v6.1.20-2) - 2024-07-23

### Commits

- Change: fetching members & enum types in api endpoints [`c9c764d`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/c9c764d53ad8232a4990fcccdc7481f95074cce1)
- Added: Daily reminders [`f0a32ba`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/f0a32bae59b68e92120988ab191585833c4f7638)
- Updated user number strings; Removed broken animequote cmd [`4148b5b`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/4148b5b6a586678c9adf0f9c0a5fe4a8625d8043)

## [v6.1.19](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.18...v6.1.19) - 2024-06-29

### Commits

- Removed unused privileged intent [`b7059ba`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/b7059ba09a9565dd82d945938721722fbd2a23e6)

## [v6.1.18](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.17...v6.1.18) - 2024-06-29

### Merged

- Add bettest [`#56`](https://github.com/cataclym/Kaiki-Deishu-Bot/pull/56)

### Commits

- Addresses CVE-2024-21512 [`c6db5c7`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/c6db5c7ab734bc223c2e9f9560c0a161a05bd409)
- Fixes: Show correct error lines + stop registering slash command twice [`670b42c`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/670b42c9e70e837696167278c2efe7286a43a5a1)
- Changed: neofetch command is compatible with fastfetch [`fdf453c`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/fdf453c9f1f94426991dffb044d9ccf464a13002)

## [v6.1.17](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.16...v6.1.17) - 2024-05-28

### Commits

- Added: Ability to upload commandlist to specific endpoint. [`719d949`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/719d94970729579b092f660dd06ccb41c24f1242)
- Docs: Fixed some inconsistencies [`40d9177`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/40d9177793abc58d16dbfd0d9ff9ced14f2ec40e)
- Changed: glb is no longer guild-only; Added: unban description text [`437e9cd`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/437e9cd8a19b8b79d0d27ce5b101677bf72a7a70)

## [v6.1.16](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.15...v6.1.16) - 2024-05-23

### Commits

- Updated github url [`0354b69`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/0354b697feb874030e4322733dc22c47a2ed0f2c)
- Updated docs and configs [`288d016`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/288d0163e08bfa202c55af591632879c40f4ba4d)
- Fix minor vulnerability [`b94b1b5`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/b94b1b5113057ae33cfbd50b2d5b61d73344b605)

## [v6.1.15](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.14...v6.1.15) - 2024-05-23

### Commits

Expand Down Expand Up @@ -36,13 +103,19 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- Re-add counting to dadbot; Linting; [`0188c04`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/0188c04f68b06dc21f2b092cba7aeac922a111e3)
- Missing embed color [`fb9a3b6`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/fb9a3b66a2520c1d38958cfeb136892a905cd47c)

## [v6.1.11](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.9...v6.1.11) - 2024-05-07
## [v6.1.11](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.10...v6.1.11) - 2024-05-07

### Commits

- Fixed dbl vote rewards; Improved argument missing error! [`9663872`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/966387275874d67d74281eeb3f25ac8cfbb9b57b)

## [v6.1.10](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.9...v6.1.10) - 2024-05-07

### Commits

- Added DiscordBotList stuff, what could go wrong [`31e2350`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/31e23508c44c495fe275b8a8163c47fcde76ba6a)
- Minor improvements [`f0fe301`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/f0fe301657432c9deb35c94273e0775c2a6c050c)
- Fixed dbl vote rewards; Improved argument missing error! [`9663872`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/966387275874d67d74281eeb3f25ac8cfbb9b57b)
- Added -y flag to die cmd [`174ce55`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/174ce55766b6999f23e3cd2ba2e8056aed32c67d)

## [v6.1.9](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.8...v6.1.9) - 2024-04-30

Expand Down Expand Up @@ -79,14 +152,25 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

- Hotfix for setbanner cmd [`805bee9`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/805bee9c61bdae66cc67798c03efd28d854c2a6b)

## [v6.1.4](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.1...v6.1.4) - 2024-03-17
## [v6.1.4](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.3...v6.1.4) - 2024-03-17

### Commits

- Feat: New command "setbanner"! 🆕 [`dc0d333`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/dc0d333bf0a333e1c03d37186a4412cbcec03763)

## [v6.1.3](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.2...v6.1.3) - 2024-03-01

### Commits

- hotfix for node-fetch issues [`681863d`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/681863d3ab65beedf9febbe4d8c41920d33b3808)
- Fixed: emotecount.ts filter [`15ea317`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/15ea3175c353a7c9cf59d9fedf7d0437b5c484fb)
- Just a small change to emotecount formatting...! Fixes formatting errors [`2ee5d6e`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/2ee5d6e2da2567647a452add7b63b95cb5f30083)

## [v6.1.2](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.1...v6.1.2) - 2024-03-01

### Commits

- hotfix for node-fetch issues [`681863d`](https://github.com/cataclym/Kaiki-Deishu-Bot/commit/681863d3ab65beedf9febbe4d8c41920d33b3808)

## [v6.1.1](https://github.com/cataclym/Kaiki-Deishu-Bot/compare/v6.1.0...v6.1.1) - 2024-03-01

### Commits
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM node:18
FROM node:20
LABEL authors="Ole"

WORKDIR /kaikibot
RUN apt update && apt install neofetch -y
RUN apt update && curl -sLO https://github.com/fastfetch-cli/fastfetch/releases/latest/download/fastfetch-linux-amd64.deb && dpkg -i fastfetch-linux-amd64.deb
COPY package*.json .
RUN npm install
COPY prisma .
Expand Down
8 changes: 5 additions & 3 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
FROM node:18
FROM node:20
LABEL authors="Ole"

WORKDIR /usr/app
RUN apt update && apt install neofetch -y
RUN apt update && curl -sLO https://github.com/fastfetch-cli/fastfetch/releases/latest/download/fastfetch-linux-amd64.deb && dpkg -i fastfetch-linux-amd64.deb
COPY package*.json ./
RUN npm install
COPY prisma .
RUN npx prisma generate
ARG DATABASE_URL
ENV DATABASE_URL $DATABASE_URL
RUN npx prisma migrate deploy && npx prisma generate
COPY . ./
RUN npm run build
CMD ["npm", "run", "dev"]
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
### Kaiki is a unique Discord bot, written in Typescript.

| [Website](https://kaikibot.xyz) | [Add Kaiki to your server](https://discord.com/oauth2/authorize?client_id=714695773534814238&scope=bot) |
| :------------------------------ | :-----------------------------------------------------------------------------------------------------: |
|:--------------------------------|:-------------------------------------------------------------------------------------------------------:|

<h3 style="color: #ea580c"> Economy </h3>
#### Economy
Gambling commands, daily currency claims, currency transactions

<h3 style="color: #ea580c"> Interactions </h3>
### Interactions
Anime reaction gifs for most situations, always +pat your homies

<h3 style="color: #ea580c"> Unique </h3>
### Unique

- See how many times each emote has been used in the server
- Ping your minecraft server to check it's status
Expand All @@ -26,18 +26,19 @@ Anime reaction gifs for most situations, always +pat your homies

... and much more.

Feel free to selfhost and/or contribute!

## Documentation

- Docs
- [Selfhosting guide](docs/GUIDE.md)
- [Placeholders](docs/PLACEHOLDERS.md) for greet and bye messages
- [.env setup](docs/ENV.md)
- [Selfhosting guide](docs/GUIDE.md)
- [Placeholders](docs/PLACEHOLDERS.md) for greet and bye messages
- [.env setup](docs/ENV.md)

## Contributing

Consider contributing. I appreciate all the help I can get!
Consider contributing! I appreciate all the help I can get.

### Upcoming plans
* Rework todo (TodoRework branch)
* Serve and Update commandlist to website automatically

---

Expand Down
Binary file added bun.lockb
Binary file not shown.
17 changes: 17 additions & 0 deletions db.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
services:
db:
image: mariadb:latest
restart: unless-stopped
env_file: ./.env
command: --wait-timeout=28800
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=$DB_ROOT_PASSWORD
- MYSQL_DATABASE=$DB_NAME
- MYSQL_USER=$DB_USER
- MYSQL_PASSWORD=$DB_PASSWORD
volumes:
- db:/var/lib/mysql
volumes:
db:
26 changes: 8 additions & 18 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,23 @@
version: "3.8"
include:
- db.yml

services:
db:
image: mariadb:latest
restart: unless-stopped
env_file: ./.env
command: --wait-timeout=28800
ports:
- "3307:3306"
environment:
- MYSQL_ROOT_PASSWORD=$DB_ROOT_PASSWORD
- MYSQL_DATABASE=$DB_NAME
- MYSQL_USER=$DB_USER
- MYSQL_PASSWORD=$DB_PASSWORD
volumes:
- db:/var/lib/mysql
kaikibot:
depends_on:
- db
links:
- db
ports:
- "6363:6363"
build:
context: .
dockerfile: Dockerfile.dev
network: host
args:
- DATABASE_URL=$DATABASE_URL
- DATABASE_URL=$DATABASE_URL_DOCKER_BUILD
restart: unless-stopped
env_file: ./.env
stdin_open: true
tty: true
volumes:
- ./src:/usr/app/src
volumes:
db:
17 changes: 0 additions & 17 deletions docs/ABOUT.md

This file was deleted.

21 changes: 11 additions & 10 deletions docs/ENV.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- [Readme](../README.md)
- Docs
- [Guide](GUIDE.md)
- [Placeholders](PLACEHOLDERS.md)

# .env setup guide

Expand Down Expand Up @@ -34,16 +35,6 @@ Example

Prefix is `+`

## KAWAIIKEY

- Login to https://kawaii.red/dashboard/ with your Discord account
- Reveal and copy the token
- Paste the token in the .env file. Make sure it looks like the example below.

Example

KAWAIIKEY=142788173885276162.DspDpD0isjuXAKD73vWs

## MySQL

Replace `yourUsername` and `yourPassword` with your MySQL user and password credentials
Expand All @@ -59,6 +50,16 @@ Example
DB_ROOT_PASSWORD=yourRootPassword
DB_NAME=kaikidb

## KAWAIIKEY (Optional)

- Login to https://kawaii.red/dashboard/ with your Discord account
- Reveal and copy the token
- Paste the token in the .env file. Make sure it looks like the example below.

Example

KAWAIIKEY=142788173885276162.DspDpD0isjuXAKD73vWs

## The rest of the file

Please leave this as is, unless you know what you're doing
Expand Down
Loading

0 comments on commit b8250d2

Please sign in to comment.