From 2f757710e1680e56ed0aa2abbf2fae663ed51dcf Mon Sep 17 00:00:00 2001 From: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com> Date: Wed, 9 Aug 2023 13:04:50 -0500 Subject: [PATCH] publish + --- docs/cli/README.md | 25 +++++++++++++++++++++++++ docs/cli/publish.md | 4 +++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/docs/cli/README.md b/docs/cli/README.md index e44b810d9..2afcb8236 100644 --- a/docs/cli/README.md +++ b/docs/cli/README.md @@ -2,4 +2,29 @@ Publish commands to the API, install plugins, and use other tools provided by our cli. +The CLI is your pocketknife for discord bot development. It'll have all features necessary for developing and shipping to production. +``` +Usage: sern [options] [command] + + ___ ___ _ __ _ __ + / __|/ _ \ '__| '_ \ + \__ \ __/ | | | | | + |___/\___|_| |_| |_| + + Welcome! + If you're new to sern, run npm create @sern/bot for an interactive setup to your new bot project! + + If you have any ideas, suggestions, bug reports, kindly join our support server: https://sern.dev/discord + +Options: + -v, --version output the version number + -h, --help display help for command + +Commands: + init [options] Quickest way to scaffold a new project [DEPRECATED] + plugins [options] Install plugins from https://github.com/sern-handler/awesome-plugins + extra Easy way to add extra things in your sern project + commands Defacto way to manage your slash commands + help [command] display help for command +``` diff --git a/docs/cli/publish.md b/docs/cli/publish.md index 309ab2228..bbbb2f6d9 100644 --- a/docs/cli/publish.md +++ b/docs/cli/publish.md @@ -19,7 +19,7 @@ DISCORD_TOKEN= APPLICATION_ID= MODE= ``` -- Calls the discord API with the [PUT route](https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands). What this means is that whatever is in your commands directory will override the existing application commands at Discord. Existing commands do not count towards the command limit creation daily. +- Calls the discord API with the [PUT route](https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands). Wherever your commands directory is located, publish will override the existing application commands at Discord. Existing commands do not count towards the command limit creation daily. You may pass these in as command line arguments as well. **CLI arguments take precedence.** If you do not know how to obtain either of these credentials, @@ -60,6 +60,8 @@ import { Client } from 'discord.js' await makeDependencies({ root => root.add({ '@sern/client': single(() => new Client(...options) })) }) + +await Service('@sern/client').login() ``` This will create a container for publishing. (as of 0.6.0, client is required or this will crash)