JSX component support and time command

This commit is contained in:
JB
2026-01-02 16:08:20 -05:00
parent eece9b1257
commit bba8c4f6f1
71 changed files with 1214 additions and 429 deletions

View File

@@ -1,12 +1,12 @@
# Star Kitten Discord Bot
A Discord bot for [EVE Online](https://www.eveonline.com/).
A Discord bot for [EVE Online](https://www.eveonline.com/) built with [bun](https://bun.sh/) and [@star-kitten/lib](https://git.f302.me/jb/star-kitten)
# [Click this link to use this bot!](https://discord.com/oauth2/authorize?client_id=1288711114388930601)
# [Install Star Kitten](https://discord.com/oauth2/authorize?client_id=1288711114388930601)
## Running the Bot
This bot runs on [Bun](https://bun.sh/)! To install, run one of the following commands.
This bot runs on [Bun](https://bun.sh/)! To install Bun, run one of the following commands.
_Linux & MacOS_
@@ -22,44 +22,22 @@ powershell -c "irm bun.sh/install.ps1 | iex"
---
Install dependencies.
### Install bot dependencies
```bash
bun install
```
### Link the Library & download static data
`star-kitten-lib` has not been published, so link to it locally before running this web project.
### Download static eve reference data & Hoboleaks archive from [EVE Ref](https://everef.net/)
```bash
cd star-kitten-lib
bun link
cd ../web
bun link star-kitten-lib
```
### Download static eve reference data & Hoboleaks archive from [EVE Ref](https://everef.net/).
```bash
cd star-kitten-lib
bun get-data
```
### Initialize the sqlite database
```bash
cd star-kitten-lib
bun generate-migrations
bun migrate
```
Drizzle's migrations seems to fail on the first try sometimes, so just grab the .sql from the generation and run those against the kitten.db file to create the tables & indexes.
### Run the bot
Run the bot locally.
```bash
bun run dev
bun dev
```
## Environment Variables
@@ -67,6 +45,9 @@ bun run dev
Create a .env file in the root directory with the following values:
```yaml
# Discord - https://discord.com/developers/applications
DISCORD_BOT_TOKEN=YOUR_BOT_TOKEN
#General
BASE_URL=http://localhost:3000
DEBUG=true
@@ -74,26 +55,13 @@ PORT=3000
NODE_ENV=development
LOG_LEVEL=debug
# EVE - https://developers.eveonline.com/applications
EVE_CLIENT_ID=YOUR_EVE_CLIENT_ID
EVE_CLIENT_SECRET=YOUR_EVE_SECRET
EVE_CALLBACK_URL=http://localhost:3000/auth/callback
ESI_USER_AGENT=ADD_YOUR_USER_AGENT_INFO_HERE
#Discord - https://discord.com/developers/applications
DISCORD_APP_ID=YOUR_APP_ID
DISCORD_CLIENT_SECRET=YOUR_CLIENT_SECRET
DISCORD_PUBLIC_KEY=YOUR_PUBLIC_KEY
DISCORD_BOT_TOKEN=YOUR_BOT_TOKEN
# ID of a test server to have immediate command refreshes
DISCORD_TEST_GUILD_ID=YOUR_TEST_SERVER_ID
# For using Janice's Appraisal API
JANICE_KEY=XXX
# For using Perplexities AI API
PERPLEXITY_API_KEY=XXX
```