mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-18 08:43:57 +00:00
- Migrated to a new command framework which looks better and works better - Fixed commands not being bundled correctly - Added message (prefix) commands with argument validation - Added a new CommandErrorType, for invalid arguments - `/eval` is now a bit safer - Corrected colors for the coinflip embed - `/stop` now works even when the bot is not connected to the API
25 lines
642 B
TypeScript
25 lines
642 B
TypeScript
import { createLogger } from '@revanced/bot-shared'
|
|
import { cp, rm } from 'fs/promises'
|
|
|
|
const logger = createLogger()
|
|
|
|
logger.warn('Cleaning previous build...')
|
|
await rm('./dist', { recursive: true })
|
|
|
|
logger.info('Building bot...')
|
|
await Bun.build({
|
|
entrypoints: ['./src/index.ts'],
|
|
outdir: './dist/src',
|
|
target: 'bun',
|
|
external: ['./config.js'],
|
|
minify: true,
|
|
sourcemap: 'external',
|
|
})
|
|
|
|
logger.info('Copying config...')
|
|
await cp('./config.js', './dist/config.js')
|
|
|
|
logger.info('Copying database schema...')
|
|
await cp('./.drizzle', './dist/.drizzle', { recursive: true })
|
|
await rm('./.drizzle', { recursive: true })
|