From 9cfb202014830e396792d23c47e44738073dc90c Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Tue, 12 Jul 2022 14:28:07 -0500 Subject: [PATCH] feat: requested changes --- guide-en/README.md | 6 +++--- guide-en/walkthrough/first-command.md | 29 ++++----------------------- guide-en/walkthrough/first-event.md | 20 +++--------------- guide-en/walkthrough/goal.md | 2 +- 4 files changed, 11 insertions(+), 46 deletions(-) diff --git a/guide-en/README.md b/guide-en/README.md index 02632a247..73b6bf6a1 100644 --- a/guide-en/README.md +++ b/guide-en/README.md @@ -1,11 +1,11 @@ # Introduction Welcome to sern's official guide. This guide will go through all the core features of the framework. -Thank you for choosing sern! +- 💖 Thank you for choosing sern to be your framework! -- Teaching the discord.js library and / or Javascript / Typescript is out of scope of this project, so the documentation assumes you already know these elements. +- Teaching the discord.js library and / or Javascript / Typescript is out of scope of this project, so the documentation assumes you already know these elements. -- discord.js@dev is the only supported version at the moment. There are plans to roll out a version of sern in discord.js@13.xx.xx in the future. +- discord.js@dev is the only supported version at the moment. There are plans to roll out a version of sern in discord.js@13.xx.xx in the future. ## You will learn * [sern's goal](walkthrough/goal.md) diff --git a/guide-en/walkthrough/first-command.md b/guide-en/walkthrough/first-command.md index 3198eacc4..c72594e91 100644 --- a/guide-en/walkthrough/first-command.md +++ b/guide-en/walkthrough/first-command.md @@ -30,33 +30,12 @@ exports.default = commandModule({ }, }) ``` -### Essential properties of a command - -- **module.type** (Required) - - The type of your module. For example, a command listening to messages would have the type CommandType.Text -- **module.execute** (Required) - - This function is called when the command is triggered. Do your logic here! -- **module.name** (Optional) - - Give your command a name. **(defaults to its filename)** -- **module.description** (Optional) - - Give your command a description. **(defaults to `..`)** -- **module.plugins** (Optional) - - A list of [plugins](plugins.md) that will modify and change the behavior of your command.
- +To view what each of these properties mean in depth, visit the [official documentation](https://sern-handler.js.org/docs). ### Types of command modules Every command module `type` is part of an enum. This field allows type inference for the rest of a module's fields.
-All available command types : -``` -CommandType.Text = A Text Command -CommandType.Slash = A Slash Command -CommandType.Both = A Command supporting either text or slash -CommandType.Modal = A Command listening to Modal interactions -CommandType.MenuSelect = A Command listening to select menu interactions -CommandType.MenuUser = A Command listening to context menu user interactions -CommandType.MenuMsg = A Command listening to context menu message interactions -CommandType.Button = A Command listening to button interactions -``` -So, lets say you want to make a command module that listens to modals.
+All the command types can be found in the [official documentation](https://sern-handler.js.org/docs)! +

So, lets say you want to make a command module that listens to modals.

+ **Note**: Keep in mind you'll need to send a modal with a custom id `dm-me`. This example below is the response to a modal being sent.
Typescript: diff --git a/guide-en/walkthrough/first-event.md b/guide-en/walkthrough/first-event.md index a8aaac70d..8934e9c48 100644 --- a/guide-en/walkthrough/first-event.md +++ b/guide-en/walkthrough/first-event.md @@ -22,24 +22,10 @@ exports.default = eventModule({ } }) ``` -Like command modules, the `type` property denotes what kind of event it is. -``` -EventType.Sern = an event listening to the SernEmitter -EventType.Discord = an event listening to the discord.js Client -EventType.External = an event listening to any class extending an EventEmitter -``` -### Essential properties of an event module +Like command modules, the `type` property denotes what kind of event it is, which +can be found [here](https://sern-handler.js.org/docs). -- **module.type** (Required) - - The type of your module. ( Check previous message ^^^) -- **module.execute** (Required) - - This function is called when the event module is triggered. Do your logic here! -- **module.name** (Optional) - - The name of the event. **(defaults to its filename, however it is recommended to fill this out!!)** -- **module.description** (Optional) - - Give your command a description. **(defaults to `..`)** -- **module.plugins** (Optional) -- A list of [plugins](plugins.md) that will modify and change the behavior of your command.
+To view what each of these properties mean in depth, visit the [official documentation](https://sern-handler.js.org/docs).
Event modules are laid out similarly to command modules. These listen to any and all event you provide. diff --git a/guide-en/walkthrough/goal.md b/guide-en/walkthrough/goal.md index 9c70bca5b..cdf6e54e4 100644 --- a/guide-en/walkthrough/goal.md +++ b/guide-en/walkthrough/goal.md @@ -1,6 +1,6 @@ # Goal -Sern strives to be minimalist, but with all batteries included. Meaning, this framework provides the necessary tools +sern strives to be minimalist, but with all batteries included. Meaning, this framework provides the necessary tools to start up a bot in minutes, and leaves plenty room space to customize your experience and create an amazing project. It should include all the tools for any bot at any scale.