https://github.com/ky28059/kevin-yu
literally me.
https://github.com/ky28059/kevin-yu
Last synced: 25 days ago
JSON representation
literally me.
- Host: GitHub
- URL: https://github.com/ky28059/kevin-yu
- Owner: ky28059
- License: mit
- Created: 2022-05-10T01:27:08.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-02T21:33:03.000Z (3 months ago)
- Last Synced: 2025-03-31T01:31:46.315Z (2 months ago)
- Language: TypeScript
- Size: 626 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kevin yu
literally me.https://discord.com/oauth2/authorize?client_id=973385182566580344&scope=bot+applications.commands&permissions=8
To run, create a `config.ts` exporting your discord token and channel / server configs:
```ts
import type { BirthdayInfo } from './modules/birthdays';
import { DateTime } from 'luxon';export const timeZone = 'America/Indiana/Indianapolis';
export const token = 'real-discord-token-trust';export const wooperChannels = [
'...'
];export const thisFishServers = [
'...'
];export const birthdays: BirthdayInfo[] = [
{
userId: '...',
channelIds: ['...', ...],
date: DateTime.fromISO('...', { zone: timeZone })
},
...
];
```
Run
```bash
npm run registerSlashCommands
```
to update slash commands and
```bash
npm start
```
to start the bot.### Running on a Raspberry Pi
When installing `node` on Raspbian, note that the node version included with `apt install nodejs` is v12.22.9; the current LTS version as of writing is v22.14.0. To
get a more modern version, you'll have to use [`nvm`](https://github.com/nvm-sh/nvm), e.g.
```bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source "$HOME/.nvm/nvm.sh"
nvm install 22
```
Then, to ensure the bot runs once per system startup, set up a crontab via
```bash
crontab -e
```
that looks something like:
```crontab
PATH=/home/ky28059/.nvm/versions/node/v22.13.1/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin@reboot (sleep 15; cd /home/ky28059/kevin-yu && npm start) >> /home/ky28059/kevin-yu.log
```
(make sure to include the `PATH` extension that lets the crontab user access the newly installed `node` / `npm` binaries).