Files
discord.js/packages/create-discord-bot/scripts/rename-to-app.mjs
Vlad Frangu cd76c9a47b chore: fix create-discord-bot -> create-discord-app formatting (#10951)
* chore: fix create-discord-bot -> create-discord-app formatting

* chore: readme for bun

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2025-06-22 22:37:55 +00:00

15 lines
538 B
JavaScript

import { readFile, writeFile } from 'node:fs/promises';
import { URL } from 'node:url';
const pkgJsonPath = new URL('../package.json', import.meta.url);
const pkgJson = JSON.parse(await readFile(pkgJsonPath, 'utf8'));
pkgJson.name = 'create-discord-app';
await writeFile(pkgJsonPath, JSON.stringify(pkgJson, null, '\t') + '\n');
const readmePath = new URL('../README.md', import.meta.url);
const readme = await readFile(readmePath, 'utf8');
await writeFile(readmePath, readme.replaceAll('create discord-bot', 'create discord-app'));