From ac2561845f4ef3e9970f03d2a90304aa3a366bfc Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Thu, 23 Jan 2025 21:27:54 -0600 Subject: [PATCH 1/3] Update goal.mdx --- src/content/docs/v4/reference/goal.mdx | 61 +++++++------------------- 1 file changed, 15 insertions(+), 46 deletions(-) diff --git a/src/content/docs/v4/reference/goal.mdx b/src/content/docs/v4/reference/goal.mdx index 8fe3eb815..e92ee00cc 100644 --- a/src/content/docs/v4/reference/goal.mdx +++ b/src/content/docs/v4/reference/goal.mdx @@ -5,54 +5,23 @@ sidebar: order: 2 --- -This walkthrough will be written in [TypeScript](https://www.typescriptlang.org/) but will have JavaScript snippets throughout. +This reference will have JavaScript but many snippets are easily transferrable to Typescript. -## Make robust, modular, bots +# why? +Theres a lack of sane ways to build Discord bots. +Some advocate to *build your own abstractions*, use clunky archaic codebases that are rarely maintained, or install frameworks that don't satisfy your needs. + +**Keep it simple!** + + +# sern is built for these things in mind - **Modularity**: sern is built with modularity in mind. You can swap pieces and parts easily. -- **Familiar**: Commands and structures are similar to classic v12 handlers and the official Discord.js command handler guide, while packing many features! +- **Familiarity**: Commands and structures are similar to classic v12 handlers and the official Discord.js command handler guide, while packing many features! - **Concise**: Too much code is a liability. With sern, write less for more. 🤯 -## Why sern? - -import { Tabs, TabItem } from '@astrojs/starlight/components'; - - - - ```ts title="commands/ping.ts" - import { Command } from "@sapphire/framework"; - import type { CommandInteraction } from "discord.js"; - - export class PingCommand extends Command { - public constructor(context: Command.Context) { - super(context, { - description: "Pong!", - chatInputCommand: { - register: true, - }, - }); - } - public async chatInputRun(interaction: CommandInteraction) { - await interaction.reply("Pong!"); - } - } - ``` - - - ```ts title="commands/ping.ts" - import { commandModule, CommandType } from "@sern/handler"; - - export default commandModule({ - type: CommandType.Both, - description: "Pong!", - execute: async (ctx, args) => { - await ctx.reply("Pong!"); - }, - }); - ``` - - - -Keep in mind the sern example acts as both a slash command AND a text command. The Sapphire example is only a slash command, and it's more code than sern. - -## Be smart. Choose sern. +# Our community + +As of 01/23/2025, our [discord](https://sern.dev/discord) is considered small, but it is no excuse for helping those who want to build bots with us. Feel free to join us! + + From cc7d02ff21ecc8c659852e8e5ee737ee97d32f94 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Thu, 23 Jan 2025 21:29:00 -0600 Subject: [PATCH 2/3] update order --- src/content/docs/v4/reference/config.mdx | 2 +- src/content/docs/v4/reference/tasks.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/v4/reference/config.mdx b/src/content/docs/v4/reference/config.mdx index 0bbc1fdb8..66578aecd 100644 --- a/src/content/docs/v4/reference/config.mdx +++ b/src/content/docs/v4/reference/config.mdx @@ -2,7 +2,7 @@ title: Config description: Configure your bot sidebar: - order: 2 + order: 3 --- Your app needs a way to store constants and required variables for the framework to work. diff --git a/src/content/docs/v4/reference/tasks.mdx b/src/content/docs/v4/reference/tasks.mdx index 95fb518d9..6cd5e13db 100644 --- a/src/content/docs/v4/reference/tasks.mdx +++ b/src/content/docs/v4/reference/tasks.mdx @@ -2,7 +2,7 @@ title: Tasks description: Schedule and execute functions at certain times sidebar: - order: 2 + order: 3 --- Your app may need to execute tasks in the future on intervals or over a long time. From 8b8191b7dad8ba1493af244c562678fdd6af6203 Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Fri, 24 Jan 2025 17:02:51 -0600 Subject: [PATCH 3/3] moveorder --- src/content/docs/v4/reference/conclusion.mdx | 2 +- src/content/docs/v4/reference/goal.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/v4/reference/conclusion.mdx b/src/content/docs/v4/reference/conclusion.mdx index c0b7994d2..8e00605dd 100644 --- a/src/content/docs/v4/reference/conclusion.mdx +++ b/src/content/docs/v4/reference/conclusion.mdx @@ -2,7 +2,7 @@ title: Conclusion description: Thank you for reading the sern guide sidebar: - order: 10 + order: 11 --- If you reached this far, thank you for reading! diff --git a/src/content/docs/v4/reference/goal.mdx b/src/content/docs/v4/reference/goal.mdx index e92ee00cc..c9a1ae0fd 100644 --- a/src/content/docs/v4/reference/goal.mdx +++ b/src/content/docs/v4/reference/goal.mdx @@ -2,7 +2,7 @@ title: Goal description: sern's goal is to make bot development easier and more efficient sidebar: - order: 2 + order: 10 --- This reference will have JavaScript but many snippets are easily transferrable to Typescript.