mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-23 03:01:03 +00:00
BREAKING CHANGE: In `@revanced/discord-bot`, its environment variable
`DATABASE_URL` has been renamed to `DATABASE_PATH`
and the `file:` prefix is no longer needed
15 lines
451 B
TypeScript
15 lines
451 B
TypeScript
import { api, discord, logger } from '$/context'
|
|
import { getMissingEnvironmentVariables } from '@revanced/bot-shared'
|
|
|
|
import './events/register'
|
|
|
|
// Check if token exists
|
|
const missingEnvs = getMissingEnvironmentVariables(['DISCORD_TOKEN', 'DATABASE_PATH'])
|
|
if (missingEnvs.length) {
|
|
for (const env of missingEnvs) logger.fatal(`${env} is not defined in environment variables`)
|
|
process.exit(1)
|
|
}
|
|
|
|
api.client.connect()
|
|
discord.client.login()
|