diff --git a/docs/Getting started/Advanced/author-button.md b/docs/Getting started/Advanced/author-button.md deleted file mode 100644 index 2fb0513..0000000 --- a/docs/Getting started/Advanced/author-button.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -sidebar_position: 3 ---- - -# Author button - -Author button is a way to allow the person who executed the command to be the only one able to interact with buttons -rather than everyone. This is useful to prevent interrupting with other people who're using your bot commands, for -example such as blackjack game, help command, etc. - -# Requirements - -* Aoi.parser installed (for ephemeral messages) otherwise ephemeral won't work except for the rest of the code -* Must have the event `onInteractionCreate` for this to work (if it wasn't obvious) -* Have command handler setup. Author buttons do not work in index.js with `bot.command` - -# Example author button code - -```js -module.exports = [{ - name: "authorButton", - info: { - description: "Shows an example of a Author Button" - }, - code: ` - $title[Author Button] - $description[Press the Button!] - $color[Random] - $addButton[1;Example;primary;customID_$authorID;false]` - }, { - type: "interaction", - prototype: "button", - code:` - $interactionReply[;{newEmbed:{title:Author Button}{description:First Page.}{color:Random}}] - - $onlyIf[$advancedTextSplit[$interactionData[customId];_;2]==$interactionData[author.id];You're not the author of this command! {options:{ephemeral:true}} - {extraOptions:{interaction:true}}] - $onlyIf[$advancedTextSplit[$interactionData[customId];_;1]==customID;]` - }] -``` - -# Explanation - -We start by adding the button using the function `$addButton`. - -We then make sure that it has `_$authorID` within the custom id like `customID_$authorID` but then we start to create an -author interaction using `$interactionData[customId]` which allows us to return the custom id name of the button we have -just created below. - -As a result, we remove the property `name:` from the button command and we start separating the custom id and the author -id using `$advancedTextSplit` as we have `_` in our custom id which makes it easy to do that! - -Finally, we then add our first `$onlyIf` at the bottom of our interaction code to check if the button has been clicked -by returning it's custom id name and second `$onlyif` to check if the user is the same person who just ran the command -to prevent other users from interacting with the author who ran the command. - -Obviously, we respond to the button using `$interactionReply` and we're done after that! Our author button should work -now! diff --git a/docs/Getting started/Guides/author-interactions.md b/docs/Getting started/Guides/author-interactions.md new file mode 100644 index 0000000..0429d24 --- /dev/null +++ b/docs/Getting started/Guides/author-interactions.md @@ -0,0 +1,83 @@ +--- +sidebar_position: 3 +--- +# Author interactions +This guide is dedicated to creating interactions that are only usable by a user. If you're here for that then go ahead reading this guide: + +# What are author interactions +Author interactions are interactions that only the user who ran the command will be able to use it. It helps preventing interruptions by other people and overall ensures that each user will use their own dedicated interaction rather than messing with the other's interactions! This guide will include both of author buttons and select menus. + +# Requirements +* Ensure that you're on aoi.js 6.6.0 or later. This guide won't work on much earlier versions without some modifications +* Have a command handler ready. The examples here rely on it but however you can modify the codes to work with non command handler method +* IT IS HIGHLY RECOMMENDED to have `onInteractionCreate` event added otherwise none of the examples below will ever work + + +# Notes +* Ephemeral errors will only work on v6.7 and above. You may need to use aoi.parser and modify the options to get the ephemeral to work in older versions +* The used custom ids in this guide can modified if it wasn't obvious + +# Author button Example +```js +module.exports = [{ + name: "authorButton", + info: { + description: "Shows an example of a Author Button" + }, + code: ` + $title[Author Button] + $description[Press the Button!] + $color[Random] + $addButton[1;Example;primary;customID_$authorID;false]` + }, { + type: "interaction", + prototype: "button", + code:` + $interactionReply[;{newEmbed:{title:Author Button}{description:First Page.}{color:Random}}] + + $onlyIf[$advancedTextSplit[$interactionData[customId];_;2]==$interactionData[author.id];You're not the author of this command! {ephemeral} + {interaction}] + $onlyIf[$advancedTextSplit[$interactionData[customId];_;1]==customID;]` + }] +``` + +# Author select menu Example +```js +module.exports = [ + { + name: "author-menu", + info: { + description: "Shows an example of a Author Menu" + }, + code: ` +$title[Author menu example] + $description[Select an option.] +$color[Random] + $addSelectMenu[1;string;yourCustomID_$authorID;This is a placeholder!;1;1;false;A Option:Description of option B:anotherCustomID:false;B Option:Description of option B:andAnotherCustomID:true] + `, + }, + { + type: "interaction", // clarifying that this command is an Interaction + prototype: "selectMenu", + code: ` + $interactionReply[Hello! :);;;;everyone;false] + +$onlyIf[$advancedTextSplit[$interactionData[customId];_;2]==$interactionData[author.id];You're not the author of this command! {ephemeral} + {interaction}] + + $onlyIf[$advancedTextSplit[$interactionData[customId];_;1]==yourCustomID;] + + $onlyIf[$interactionData[values[0]]==anotherCustomID;]`, + }] +``` + +# How do they work? +We start by adding both of buttons and select menus using their dedicated functions. + +We then make sure that they have ` _$authorID` within the custom id like `customID_$authorID` for buttons example but then we start to create an author interaction using `$interactionData[customId]` which allows us to return the custom id name of the button/select menu we have just created below. + +As a result, we remove the property `name:` from both interaction's commands and we start separating the custom id and the author id using `$advancedTextSplit` as we have `_` in our custom id which makes it easy to do that! + +Finally, we then add our first `$onlyIf` at the bottom of our interaction code to check if the button/select menu has been used by returning it's custom id name and second `$onlyif` to check if the user is the same person who just ran the command to prevent other users from interacting with the author who ran the command. To finish our final touches for our select menu, we add `$onlyIf[$interactionData[values[0]]==menu value;]` to respond to the option we want. + +Obviously, we respond to the interactions using `$interactionReply` and we're done after that! Our author interactions should work now! \ No newline at end of file diff --git a/docs/Getting started/interactions/context-menu-cmds.md b/docs/Getting started/Guides/context-menu-cmds.md similarity index 93% rename from docs/Getting started/interactions/context-menu-cmds.md rename to docs/Getting started/Guides/context-menu-cmds.md index 84bbe95..6b81c42 100644 --- a/docs/Getting started/interactions/context-menu-cmds.md +++ b/docs/Getting started/Guides/context-menu-cmds.md @@ -18,10 +18,10 @@ Let's say we want to have a context menu cmd, one for user type for the sake of ```js // For users -$createApplicationCommand[global;report This User;;true;user] +$createApplicationCommand[global;report This User;;true;true;user] // For messages -$createApplicationCommand[global;remind Me;;true;message] +$createApplicationCommand[global;remind Me;;true;true;message] // Note: descriptions are not required if you're creating context menu commands in the function meaning that you can leave them blank. ``` diff --git a/docs/Getting started/interactions/slash-choices.md b/docs/Getting started/Guides/slash-choices.md similarity index 98% rename from docs/Getting started/interactions/slash-choices.md rename to docs/Getting started/Guides/slash-choices.md index 11e12fe..8689e94 100644 --- a/docs/Getting started/interactions/slash-choices.md +++ b/docs/Getting started/Guides/slash-choices.md @@ -1,6 +1,7 @@ --- sidebar_position: 3 --- +# Slash command choices Welcome to the sequel of my take on slash commands tutorial! This guide is mainly dedicated to choices around slash commands and how to use them! It is advised to read on what’s in the guide if you’re new to this to avoid making mistakes. # What are choices? diff --git a/docs/Getting started/Guides/slash-commands.md b/docs/Getting started/Guides/slash-commands.md new file mode 100644 index 0000000..2e47ba6 --- /dev/null +++ b/docs/Getting started/Guides/slash-commands.md @@ -0,0 +1,217 @@ +# Slash Commands +This guide is dedicated to my take on slash command's tutorials. It aims to be simplified and mention the common mistakes when setting up slash commands. It is recommended that you read the entire guide otherwise you may end up making mistakes inevitably. + +# What are slash commands +Slash commands are supposedly new "generation" of bots by Discord's vision. The idea is that all bots do rely on one prefix that is `/` and so people do not have to guess prefixes of any bot they encounter whether it would be in a server or a random bot they have just added it to an server they're in. Slash commands has been around since April 2021 and has since been enforced into verified bots due to message content intent updates by DIscord! + +# Notes +* This guide requires you to have put `onInteractionCreate` onto your events code otherwise the example code for replying to the slash command won't work AT ALL +* You can create up to 100 slash commands both in private server and public +* The function `$createApplicationCommand` must be only executed for once, otherwise, you're spamming the discord api which can cause problems +* Highly recommend reading the usage from docs to get an idea +* The command code examples here are for command handler setups, so please do not put them directly into your `index.js` or whatever your main file is. You can modify the commands to match with the index.js ones + +# Creating the slash command +Slash commands can be created using `$createApplicationCommand`, it is a function that creates an slash command based on what you like such as options, name, description, etc. + + It is not a way to create a code to respond to a slash and SHOULD NOT be put under a aoi.js interaction command of a non existing slash command for example. Similar to running any regular functions, `$createApplicationCommand` can be run on anything but i recommend using eval command or at least a prefix command with it. + +Here, we can have a usage example: +```js +$createApplicationCommand[global;name;description;true;true;slash] +``` + +The type `global` is the public slash command, if you want to create a private slash command for one server then replace the word `global` with the server id manually or you can use `$guildID` to get the id automatically. Be aware that `$guildID` does not mean public commands so therefore, you're creating a private slash command for a server. + +Let's have a simple prefix command that executes `$createApplicationCommand` +```js +module.exports = { +name: "create", +code: `$createApplicationCommand[global;ping;Test command.;true;true;slash] +Created the \`ping\` slash command.` +} +``` + +This will create a public slash command named `ping` with our description called "Test command.", running it will do nothing as we still need to create a aoi.js interaction command to respond to it! What if we also wanted a example of creating an private slash command? + +Here's an example of creating a private slash command: +```js +module.exports = { +name: "create", +code: `$createApplicationCommand[$guildID;ping;Test command.;true;false;slash] +I have created a private slash command called \`ping\` for this one specific server.` +} +``` + +# Responding to the commands +We may use `$interactionReply` to respond to the slash command with the same name we used from `$createApplicationCommand` which is `ping` as it's the slash command name we have chose! + +Let's create an aoi.js interaction command for slash: +```js +module.exports = { +name: "ping", +type: "interaction", +prototype: "slash", +code: `$interactionReply[Hi.] +` +} +``` +Restart your commands using `$updateCommands` and the slash command will now respond with `Hi.`! + +# Creating options +`$createApplicationCommand` function has one extra parameter dedicated to options, it is usually a JSON format that goes like this: +```js +$createApplicationCommand[global;exampleslash;Simple example slash command.;true;true;slash;[{ + "name": "exampleoption", + "description": "example slash command option", + "required": true, + "type": 3 +}]] +``` +We will then use `$slashOption` to get the data inputted through the option from Discord. In this example, if our option starts with `exampleoption` then we will use the same below name on `$slashOption` thus resulting in `$slashOption[exampleoption]`. +```js +module.exports = { +name: "exampleslash", +type: "interaction", +prototype: "slash", +code: `$interactionReply[Hello! Your option input is $slashOption[exampleoption]] +` +} +``` + +Optionally, we can also create two options by separating each JSON format with a comma +```js +$createApplicationCommand[global;exampleslash;Simple example slash command.;true;true;slash;[{ + "name": "exampleoption1", + "description": "example slash command option", + "required": true, + "type": 3 +},{ + "name": "exampleoption2", + "description": "example slash command option2", + "required": true, + "type": 3 +}]] +``` + +`"type":` is the type of the slash option, we're using number `3` which is text type, more information on each option type can be seen [here](https://aoi.js.org/docs/application-cmds/interaction-commands#application-command-option-type). + +Be aware that you can create up to 25 slash options, so make sure to avoid limits! Getting the data from both of the options should be easy as using multiple of `$slashOption` as well: +```js +module.exports = { +name: "exampleslash", +type: "interaction", +prototype: "slash", +code: `$interactionReply[Hello! +Your option1 input is $slashOption[exampleoption1] +Your option2 input is $slashOption[exampleoption2] +] +` +} +``` + +# Optional options +You can also make slash command options not required, this can be done by setting `"required":` option to use `false` +```js +$createApplicationCommand[global;exampleslash;Simple example slash command.;true;true;slash;[{ + "name": "exampleoption", + "description": "example slash command option", + "required": false, + "type": 3 +}]] +``` + +When there's no input or if the option hasn't being touched yet, `$slashOption` will return nothing as expected! + +# DM Support + +### Note +This feature is only available for public slash commands under the `global` type from createApplicationCommand. You may need to set the parameter `allowDm` to `false` in case of creating a private slash command for an server. + +### Configuring DM Support +Since aoi.js 6.7.0, it is possible to choose whether or not a `global` slash command will appear in the bot's DM itself. This can be done by setting `allowDm` to either `true` or `false` depending on your needs. +```js +$createApplicationCommand[global;name;description;true;allowDm (true/false);slash] +``` +Setting the parameter to `true` will allow your bot's users to run your bot's slash commands in it's DMs, this can be useful for some bots otherwise, it might not be the best idea when it comes to economy bots that has trade features. + +You can disable DM Support for a slash command by setting the said parameter to `false`. +```js +$createApplicationCommand[global;name;description;true;false;slash] +``` +That's how you configure DM support for a specific global slash command! + + +That's it for basic level of slash commands understanding! There's more to the slash commands feature and if you would like to know on any other guides about slash commands then please, let me know through the comments here! + +# Frequently asked questions + +### I have created a slash command but Discord does not show it for me +Discord often has cache problems so it may not display the newly created slash command as a result. Restarting your discord should fix the problem. + +If it still persists then be sure to double check that your slash command is not private or at least have executed `$createApplicationCommand` function! + +### Is `$createApplicationCommand` associated with `onInteractionCreate`? +No, `$createApplicationCommand` is not part of any event as it can be ran on anything (much like what i said in the very beginning of this post). + +However, because slash commands are interactions, any slash commands created from the function are part of `onInteractionCreate`! + +### How do i make the slash option at user type return the author id if there's no one selected? +Make sure that your slash option is not required: +```js +$createApplicationCommand[global;exampleslash;Simple example slash command.;true;false;slash;[{ + "name": "exampleoption", + "description": "example slash command option", + "required": false, + "type": 6 +}]] +``` + +Using `$replaceText` and `$checkCondition`, you can replace the empty input from `$slashOption` with `$authorID` and so the end result is this code: +```js +$replaceText[$replaceText[$checkCondition[$slashOption[exampleOption]==];true;$authorID];false;$slashOption[exampleOption]] +``` +This code does so that if the option is empty then it replaces it with `$authorID`! You do not have to put the entire code around the entire command so you can use `$let` with `$get` to return the code quickly! +```js +// Return the code +$get[option] + +// Store the code +$let[option;$replaceText[$replaceText[$checkCondition[$slashOption[exampleOption]==];true;$authorID];false;$slashOption[exampleOption]]] +``` + +This is how the final result should look like +```js +module.exports = { +name: "exampleslash", +type: "interaction", +prototype: "slash", +code: `$interactionReply[The selected user is $get[option]] + +$let[option;$replaceText[$replaceText[$checkCondition[$slashOption[exampleOption]==];true;$authorID];false;$slashOption[exampleOption]]] +` +} +``` +### Can i have two slash commands under the same name in public and private? +It is possible to create two slash commands under the same name in public and private as Discord allows this by default. Note that you should refrain from accidentally modifying the current one if each one of them has different code than the other one! + +### What if i wanted to create a slash command under the same name? +Attempting to create a slash command under the same name will overwrite the current one! For example if you have used the function to create the same slash command but with options then it will overwrite the current one to include the options as well! + +Consider this as a way to edit your slash commands created (even tho $modifyApplicationCommand does exist)! + +### How to create a slash command without using any command to execute createApplicationCommand function? +This seems common for aoi.js verified bot's owners where they're unable to straight use prefix. As of now, there's no way around this except for using a ready event. Ready event is a way to execute things when bot starts. This way is NOT RECOMMENDED AT ALL and can result in spamming if you forget to remove the event that has the function itself to create a slash command. + +In case you accept the risk, you can make a ready event like this +```js +module.exports = { +name: "Create slash", +type: "ready", +channel: "", +code: `$createApplicationCommand[global;ping;Test command.;true;true;slash] +$log[the slash command ping has been created successfully!] +` +} +``` +Be sure to remove the command after that. \ No newline at end of file diff --git a/docs/Getting started/interactions/sub-commands.md b/docs/Getting started/Guides/sub-commands.md similarity index 98% rename from docs/Getting started/interactions/sub-commands.md rename to docs/Getting started/Guides/sub-commands.md index 4c6d6c0..5fab281 100644 --- a/docs/Getting started/interactions/sub-commands.md +++ b/docs/Getting started/Guides/sub-commands.md @@ -13,7 +13,7 @@ Let's say that if we want two sub commands then we will add them using `$createA ```js module.exports = { name: "sub", -code: `$createApplicationCommand[$guildID;slash;sub commands showcase!;true;slash;[ +code: `$createApplicationCommand[$guildID;slash;sub commands showcase!;true;true;slash;[ { "name": "sub1", "description": "an sub command example!", @@ -38,7 +38,7 @@ In case, we want an sub command to have a option then we're gonna modify our sub ```js module.exports = { name: "sub", -code: `$createApplicationCommand[$guildID;slash;sub commands showcase!;true;slash;[ +code: `$createApplicationCommand[$guildID;slash;sub commands showcase!;true;true;slash;[ { "name": "sub1", "description": "an sub command example!", diff --git a/docs/Getting started/Basic/error-logger-using-functionerror.md b/docs/Getting started/Others/error-logger-using-functionerror.md similarity index 82% rename from docs/Getting started/Basic/error-logger-using-functionerror.md rename to docs/Getting started/Others/error-logger-using-functionerror.md index 5e37cd5..c09f44b 100644 --- a/docs/Getting started/Basic/error-logger-using-functionerror.md +++ b/docs/Getting started/Others/error-logger-using-functionerror.md @@ -16,20 +16,18 @@ To start off, you need to add the following into your `events:` options: ```js const { AoiClient } = require("aoi.js") -const bot = new AoiClient({ +const client = new AoiClient({ token: "Discord Token", prefix: "Discord Prefix", intents: ["MessageContent", "GuildMessages", "Guilds"], events: ["onMessage", "onInteractionCreate", "onFunctionError"], -database: { - type: "aoi.db", - db: require("aoi.db"), - tables: ["main"], - path: "./database/", - extraOptions: { - dbType: "KeyValue" - }, - } + database: { + type: "aoi.db", + db: require("@akarui/aoi.db"), + dbType: "KeyValue", + tables: ["main"], + securityKey: "a-32-characters-long-string-here", + } }) ``` @@ -56,4 +54,4 @@ After filling up the channel id you want to on the **channel** property, you wil ## Conclusion -now you have an error logging system that is perfectly working with no issues, you can customize anything to your liking including changing the way on how should the errors be shown. +Now you have an error logging system that is perfectly working with no issues. You can customize anything to your liking including changing the way on how should the errors be shown. diff --git a/docs/Tips/parser-support.md b/docs/Tips/parser-support.md deleted file mode 100644 index a1f0985..0000000 --- a/docs/Tips/parser-support.md +++ /dev/null @@ -1,94 +0,0 @@ ---- -sidebar_position: 3 ---- - -# Setting up aoi.parser - -Aoi.parser is an extension for aoi.js parser system that adds features such as ephemeral messages for interaction error messages from `$onlyIf`, including the ability to use different types of select menu such as select menu for [channels](https://aoi-parser.vercel.app/documentation/parsers/component#channelinput) and other types like `{reply:}`, etc. - -## Understanding what you do - -When you setup aoi.parser, you agree that all of your usage of parsers will be changed to aoi.parser ones. We recommend viewing [aoi.parser docs](https://aoi-parser.vercel.app/documentation/parsers/embed) for viewing aoi.parser usages of parsers like components, embeds, etc (you may have to scroll down to see all of them though). - -:::info -If you want to use the original version of parser then you may use advanced setup which allows you to choose on which parser to change to aoi.parser one. -::: - -## Setting up parser support - -Run the following command to your terminal: - -```js -npm i @akarui/aoi.parser@latest -``` - -After the package is installed, add the following code to your index.js. - -```js -// Enable aoi.parser. -const { Util } = require("aoi.js"); -const { setup } = require("@akarui/aoi.parser"); - -setup(Util); -``` - -If you got no errors after restart then you're good to go. - -## What use cases are aoi.parser for - -**Example Use Cases:** - -* You want to use ephemeral for interaction error messages alongside with `{interaction}` option. - -* You want to try different types of select menu. - -* You want to make the bot use discord's reply feature from an function like `$sendMessage` in normal commands. - -* You want to control on what mentions are allowed in bot commands with allowedMentions Option inside functions like `$sendMessage` - -* Using slash option parsers for creating slash commands using `$createApplicationCommand` - -**Examples you don't need aoi.parser for:** - -* Using components parser inside functions like `$sendMessage` in normal commands (you can do that already without aoi.parser). - -* Using files parser for functions like `$sendMessage` in normal commands (you can do that without it as well). - -* Using slash option parsers for creating autocomplete commands (you can do it without it with this guide from [official Aoi.js Docs](https://aoi.js.org/docs/guides/interactioncommands#autocompleterespond-functions--examples)). + Note that it's up to your liking of which method you prefer for creating slash options so this is not a force. - - - -## Examples of aoi.parser features - -Buttons including embeds inside `$sendMessage`: - -```js -$sendMessage[{newEmbed:{title:embed}{description:click on the button below}} -{actionRow:{button:hello:1:helloButton}} -] - -// Fact: this code also works without aoi.parser -// As said in the not needed cases to use aoi.parser. -``` - -Interaction error from `$onlyIf` with ephemeral option including interaction option: - - -```js -$onlyif[disabled!=disabled; - Error. -{options:{ephemeral}} -{extraOptions:{interaction}} -] -``` - -Using select menu for selecting Text channels Only: - -```js -$sendMessage[{newEmbed:{title:menu}} -{actionRow:{channelInput:channelMenu:select a channel:1:1:no:{channelType:0}}} -] -// Use $interactionData[values[0]] for returning the selected channel id from the select menu when responding to select menu for channels in an interaction cmd. - -``` - diff --git a/docs/Tips/disabling-logs.md b/docs/To be updated/disabling-logs.md similarity index 100% rename from docs/Tips/disabling-logs.md rename to docs/To be updated/disabling-logs.md diff --git a/docs/Tips/making-usduptime-shorter.md b/docs/To be updated/making-usduptime-shorter.md similarity index 100% rename from docs/Tips/making-usduptime-shorter.md rename to docs/To be updated/making-usduptime-shorter.md diff --git a/docs/Getting started/Advanced/mention-buttons.md b/docs/To be updated/mention-buttons.md similarity index 100% rename from docs/Getting started/Advanced/mention-buttons.md rename to docs/To be updated/mention-buttons.md diff --git a/docs/Tips/organizing-database.md b/docs/To be updated/organizing-database.md similarity index 100% rename from docs/Tips/organizing-database.md rename to docs/To be updated/organizing-database.md diff --git a/docs/intro.md b/docs/intro.md index 8a2e69d..e6b0061 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -2,46 +2,13 @@ sidebar_position: 1 --- -# Tutorial Intro +# Introduction +This is my documentation dedicated to my take on some aoi.js stuff! It was mostly created to avoid having my guides lost one day while also helping aoi.js people on how to improve themselves at bot development! -Let's discover **Docusaurus in less than 5 minutes**. +# Note +This documentation is unofficial and it is not advised to use it as main help for any support server related to aoi.js. The reason is that, some support servers prefer having their own guides instead and this was not made either to encourage unofficial docs. If they allow this site to be used then i don't think you're gonna be in trouble with the staff. -## Getting Started +# Guides +Some guides here are from aoi.js forums. They're just listed here to avoid resulting in those being lost to time. If you're coming from aoi.js official forums then you will notice some of those are exactly the same with nearly no differences at all. -Get started by **creating a new site**. - -Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**. - -### What you'll need - -- [Node.js](https://nodejs.org/en/download/) version 16.14 or above: - - When installing Node.js, you are recommended to check all checkboxes related to dependencies. - -## Generate a new site - -Generate a new Docusaurus site using the **classic template**. - -The classic template will automatically be added to your project after you run the command: - -```bash -npm init docusaurus@latest my-website classic -``` - -You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor. - -The command also installs all necessary dependencies you need to run Docusaurus. - -## Start your site - -Run the development server: - -```bash -cd my-website -npm run start -``` - -The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there. - -The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/. - -Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes. +Consider this documentation as some sort of previews of what's to come from me as there're things that aren't posted anywhere else! \ No newline at end of file diff --git a/docusaurus.config.js b/docusaurus.config.js index accd14d..4051c27 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -4,13 +4,13 @@ const lightCodeTheme = require("prism-react-renderer/themes/github"); const darkCodeTheme = require("prism-react-renderer/themes/dracula"); -const organizationName = "dodoGames-s-Studios"; +const organizationName = "dodoGames-basement"; const projectName = "aoi.js-docs-by-dodo-v2"; /** @type {import('@docusaurus/types').Config} */ const config = { - title: "Dodo aoi.js Stuff", - tagline: "A docs dedicated to improving aoi dev's lifes!", + title: "dodoGames Aoi explained", + tagline: "A guy trying to explain aoi.js stuff under his own take...", url: `https://${organizationName}.github.io`, baseUrl: `/${projectName}/`, onBrokenLinks: "throw", @@ -63,7 +63,7 @@ const config = { defaultMode: 'dark', }, navbar: { - title: "Dodo aoi.js Stuff", + title: "dodoGames Aoi explained", logo: { alt: "My Site Logo", src: "img/favicon.ico", @@ -128,7 +128,7 @@ const config = { ], }, ], - copyright: `© dodoGames development 2019-${new Date().getFullYear()}.`, + copyright: `© dodoGames development 2020-${new Date().getFullYear()}.`, }, prism: { theme: lightCodeTheme, diff --git a/src/components/HomepageFeatures/index.tsx b/src/components/HomepageFeatures/index.tsx index 91ef460..9533e74 100644 --- a/src/components/HomepageFeatures/index.tsx +++ b/src/components/HomepageFeatures/index.tsx @@ -8,38 +8,7 @@ type FeatureItem = { description: JSX.Element; }; -const FeatureList: FeatureItem[] = [ - { - title: 'Easy to Use', - Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, - description: ( - <> - Docusaurus was designed from the ground up to be easily installed and - used to get your website up and running quickly. - - ), - }, - { - title: 'Focus on What Matters', - Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, - description: ( - <> - Docusaurus lets you focus on your docs, and we'll do the chores. Go - ahead and move your docs into the docs directory. - - ), - }, - { - title: 'Powered by React', - Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, - description: ( - <> - Extend or customize your website layout by reusing React. Docusaurus can - be extended while reusing the same header and footer. - - ), - }, -]; + function Feature({title, Svg, description}: FeatureItem) { return (