mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-24 11:41:02 +00:00
18 lines
510 B
TypeScript
18 lines
510 B
TypeScript
import { AdminCommand } from '$/classes/Command'
|
|
import { join, dirname } from 'path'
|
|
|
|
import type { Config } from 'config.schema'
|
|
|
|
export default new AdminCommand({
|
|
name: 'reload',
|
|
description: 'Reload configuration',
|
|
async execute(context, trigger) {
|
|
context.config = ((await import(join(dirname(Bun.main), '..', 'config.js'))) as { default: Config }).default
|
|
|
|
await trigger.reply({
|
|
content: 'Reloaded configuration',
|
|
ephemeral: true,
|
|
})
|
|
},
|
|
})
|