Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/puddyclub/discord-command-editor
Discord Slash Commands Editor.
https://github.com/puddyclub/discord-command-editor
command customizable discord editor express javascript json node nodejs npm-module slash-commands website
Last synced: 3 days ago
JSON representation
Discord Slash Commands Editor.
- Host: GitHub
- URL: https://github.com/puddyclub/discord-command-editor
- Owner: PuddyClub
- License: mit
- Created: 2021-02-11T17:30:11.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-06T18:29:49.000Z (over 3 years ago)
- Last Synced: 2024-12-13T19:58:28.170Z (21 days ago)
- Topics: command, customizable, discord, editor, express, javascript, json, node, nodejs, npm-module, slash-commands, website
- Language: JavaScript
- Homepage:
- Size: 406 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Discord-Command-Editor
Discord Slash Commands Editor.
## How to use
By entering the website for the first time, you will agree to the terms of use of the application.
Your next step is to get your bot client ID and your bot token to login.
After you log in, you will have to choose where you want to open your command editor: Global commands or Guild commands (Guild is a Discord Server).To get a guild ID, you need to activate developer mode in your Discord Configuration and right click on the guild icon.
After you choose where you want to use your command editor, you will see a JSON editor.The JSON shown is the list of commands installed in your bot. Here you will have your complete freedom to edit your command list. Do not forget that the list of commands is always made through an Array, and you will also have buttons to export or import a list of commands.
Your entire list of commands needs to be done using what is being said in official Discord Documentation: https://discord.com/developers/docs/interactions/slash-commands#example-walkthrough
## How to install
```js// Prepare Express
const express = require('express');
const app = express();// Prepare Module
const commandEditor = require('@tinypudding/discord-command-editor');// Start Module
commandEditor(express, app, options, callback);```
### express (Express Module)
The express Module from require(). If you don't use the callback, this option will be used to use the module's default image folder.### app (Express App)
The express app made by express().### options (Object)
Configuration of the website customization.### callback (Function)
Here you can send more methods to your Express application. Example? It is recommended that you define the static file folder here.
## Dependent static files
```
/img/error.png
```
## Example
```js// Prepare Module
const express = require('express');
const app = express();
require('@tinypudding/discord-command-editor')(express, app, {// File Cache (You need to install the "moment-timezone" module for this configuration to work.)
fileMaxAge: 2592000000,// Allow the application to check the installed version to warn a new version update on the website's homepage.
checkVersion: true,// Allow the version to be shown on the website's homepage.
showVersion: true,// Meta
meta: '' +
'' +
'' +
'' +
'' +
'' +
'',// JS
js: {// https://github.com/puleos/object-hash/
'objecthash': '',// https://github.com/eligrey/FileSaver.js
'filesaver': '',// https://jquery.com
'jquery': '',// https://getbootstrap.com/docs/4.6/getting-started/introduction/
'bootstrap': '',// https://github.com/gasparesganga/jquery-loading-overlay
// https://gasparesganga.com/labs/jquery-loading-overlay/
'jqueryloadingoverlay': '',// https://github.com/jillix/url.js
// http://jillix.github.io/url.js/
'urljs': '',
// https://github.com/saribe/eModal
// https://saribe.github.io/eModal/
'emodal': '',
// https://github.com/julien-maurel/jQuery-Storage-API
'jquerystorageapi': '',// https://github.com/josdejong/jsoneditor
// https://jsoneditoronline.org
'jsoneditor': '',// https://github.com/pvorb/clone
'clone': '',
},// CSS
css: {// Module CSS
'index': '',
// https://fontawesome.com/
'fontawesome': '',// https://getbootstrap.com/docs/4.6/getting-started/introduction/
'bootstrap': '',// https://github.com/josdejong/jsoneditor
// https://jsoneditoronline.org
'jsoneditor': '',
}}, function () {
// Path
const path = require('path');// Static Files
app.use(express.static(path.join(__dirname, '/public'), {
maxAge: '2592000000' // uses milliseconds per docs
}));});
// Start Server
app.listen(80);```