mirror of
https://github.com/sern-handler/website
synced 2026-06-13 11:22:20 +00:00
Compare commits
1 Commits
feat/tutor
...
feat/clear
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9d8ef511a |
28
docs/cli/clear.md
Normal file
28
docs/cli/clear.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
```sh
|
||||||
|
Usage: sern commands clear [options]
|
||||||
|
|
||||||
|
Clear and reset commands-data-remote.json and the api
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-y, --yes Say yes to all prompts
|
||||||
|
-e, --env [path] Supply a path to a .env
|
||||||
|
-h, --help display help for command
|
||||||
|
```
|
||||||
|
## Implicits
|
||||||
|
- Automatically reads a .env in the working directory. For seamless integration, your .env file should look like this:
|
||||||
|
```txt title=".env"
|
||||||
|
DISCORD_TOKEN=<YOUR_TOKEN>
|
||||||
|
APPLICATION_ID=<YOUR_APPLICATION_ID>
|
||||||
|
NODE_ENV=<development|production>
|
||||||
|
```
|
||||||
|
- Calls the discord API with the [PUT route](https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands) with an EMPTY array, essentially setting all registered commands to nothing.
|
||||||
|
|
||||||
|
- Optionally override an .env path as a command line argument as well. **CLI arguments take precedence.**
|
||||||
|
If you do not know how to obtain either of these credentials, [click here](https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token)
|
||||||
|
|
||||||
|
- Automatically confirm with the **-y** flag.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
- Clears all application data and sern-commands-data.json
|
||||||
|
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ Options:
|
|||||||
```txt title=".env"
|
```txt title=".env"
|
||||||
DISCORD_TOKEN=<YOUR_TOKEN>
|
DISCORD_TOKEN=<YOUR_TOKEN>
|
||||||
APPLICATION_ID=<YOUR_APPLICATION_ID>
|
APPLICATION_ID=<YOUR_APPLICATION_ID>
|
||||||
MODE=<DEV|PROD>
|
NODE_ENV=<production|development>
|
||||||
```
|
```
|
||||||
- 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.
|
- 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.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user