Skip to content

Commit

Permalink
publish +
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoobes committed Aug 9, 2023
1 parent d77ee3f commit 2f75771
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
25 changes: 25 additions & 0 deletions docs/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
4 changes: 3 additions & 1 deletion docs/cli/publish.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ DISCORD_TOKEN=<YOUR_TOKEN>
APPLICATION_ID=<YOUR_APPLICATION_ID>
MODE=<DEV|PROD>
```
- 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,
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 2f75771

Please sign in to comment.