forked from syntaxbullet/AuroraBot-discord
refactor: trigger application reload by appending to entry file instead of updating its times.
This commit is contained in:
@@ -48,8 +48,8 @@ export const reload = createCommand({
|
||||
}));
|
||||
|
||||
// Trigger restart by touching entry point
|
||||
const now = new Date();
|
||||
await utimes("src/index.ts", now, now);
|
||||
const { appendFile } = await import("fs/promises");
|
||||
await appendFile("src/index.ts", " ");
|
||||
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
Reference in New Issue
Block a user