diff --git a/package.json b/package.json index 97edb3eea..948133ce5 100644 --- a/package.json +++ b/package.json @@ -49,5 +49,6 @@ "prettier": "^3.2.5", "prettier-plugin-astro": "^0.13.0", "prettier-plugin-tailwindcss": "^0.5.14" - } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/src/components/PackageManagers.astro b/src/components/PackageManagers.astro index 26104b2a6..83601a78e 100644 --- a/src/components/PackageManagers.astro +++ b/src/components/PackageManagers.astro @@ -1,7 +1,7 @@ --- import { Tabs, TabItem, Code } from "@astrojs/starlight/components"; -type Command = "add" | "update" | "remove" | "create"; +type Command = "add" | "update" | "remove" | "create" | "dev"; type PackageManager = (typeof packageManagers)[number]; const packageManagers = ["NPM", "PNPM", "Yarn", "Bun"] as const; @@ -41,6 +41,12 @@ const packageManagerCode = ( PNPM: `pnpm create ${text}`, Bun: `bun create ${text}`, }, + dev: { + NPM: `npm run build && npm start`, + Yarn: `yarn build && yarn start`, + PNPM: `pnpm build && pnpm start`, + Bun: `bun build && bun start`, + } }; return commands[command][manager]; diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx index 238da1f88..9276b0947 100644 --- a/src/content/docs/index.mdx +++ b/src/content/docs/index.mdx @@ -8,7 +8,7 @@ hero: file: ~/assets/logo/sern-logo.svg actions: - text: npm create @sern/bot - link: /v4/reference/getting-started + link: /v4/reference/quickstart-guide icon: right-arrow variant: primary --- diff --git a/src/content/docs/v4/reference/error-handling.mdx b/src/content/docs/v4/reference/error-handling.mdx index 5722b9bc0..84abc278c 100644 --- a/src/content/docs/v4/reference/error-handling.mdx +++ b/src/content/docs/v4/reference/error-handling.mdx @@ -1,5 +1,5 @@ --- -title: Error handling +title: Error Handling description: Properly handle unexpected errors. sidebar: order: 9 diff --git a/src/content/docs/v4/reference/getting-started.mdx b/src/content/docs/v4/reference/getting-started.mdx deleted file mode 100644 index 12e5b234b..000000000 --- a/src/content/docs/v4/reference/getting-started.mdx +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Getting Started -description: Get started with the sern framework -sidebar: - order: 1 ---- - -import PackageManagers from '~/components/PackageManagers.astro'; - - - -Once you've used this command, follow the interactive prompts to create your new project. - -If you need help, feel free to ask on our [Discord](https://sern.dev/discord). - -:::tip -This script will create a new folder for the project so you don't have to manually create it first. -::: diff --git a/src/content/docs/v4/reference/quickstart-guide.mdx b/src/content/docs/v4/reference/quickstart-guide.mdx new file mode 100644 index 000000000..c9cca25bb --- /dev/null +++ b/src/content/docs/v4/reference/quickstart-guide.mdx @@ -0,0 +1,32 @@ +--- +title: Quickstart Guide +description: Get started with the sern framework +sidebar: + order: 1 +--- +import PackageManagers from '~/components/PackageManagers.astro'; + +### Step 1: Create a new project + + +sern has been created with the goal of making it easier to create Discord bots, so we've made it simple to get a boilerplate up and running with a single command. + +### Step 2: Adding a token + +Rename `.env.example` to `.env` and add your bot token to the `DISCORD_TOKEN` field. +If you're not familiar with how to get a bot token, you can follow the tutorial on [discordjs.guide](https://discordjs.guide/preparations/setting-up-a-bot-application.html#creating-your-bot). +:::caution +Make sure to enable the "Server Members" and "Message Content" intents! +![Intents](https://i.imgur.com/DgTOOgb.png) +::: + +### Step 3: Invite the bot to your server + +Again, we recommend using [discordjs.guide](https://discordjs.guide/preparations/adding-your-bot-to-servers.html#creating-and-using-your-invite-link) for this step. + +### Step 4: Run the bot! + +A development command inside the CLI is in the works. For now, you have to restart the bot manually for your changes to take effect. + + +If you need help, feel free to ask on our [Discord](https://sern.dev/discord)! \ No newline at end of file diff --git a/src/overrides/SiteTitle.astro b/src/overrides/SiteTitle.astro index c0aebd140..1c088143d 100644 --- a/src/overrides/SiteTitle.astro +++ b/src/overrides/SiteTitle.astro @@ -12,7 +12,7 @@ interface Link { const links: Link[] = [ { name: "Docs", - href: "/v4/reference/getting-started", + href: "/v4/reference/quickstart-guide", }, { name: "Plugins",