This repository has been archived by the owner on Jan 28, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
How to command
Elias Schaut edited this page Dec 21, 2021
·
9 revisions
- Create a new JS file named <command name>.js inside a folder in the folder
commands
.
Note: Every command has to be in a folder in the foldercommands
. A command, which is directly in the foldercommands
or in a folder in a folder incommands
is not allowed! But you can create own folders incommands
. - Fill the newly created JS file with the command skeleton
- Set the command modifications and write your execution code.
const { get_text: gt } = require("../../lang/lang_helper")
const s = "commands.<name>."
module.exports = {
name: '<name>',
description: async function (msg) { return await gt(msg, s + "help") },
aliases: ['<alias_1>', '<alias_2>'],
args_needed: false,
args_min_length: 0,
args_max_length: 0,
usage: async function (msg) { return await gt(msg, s + "usage") },
guild_only: false,
dm_only: false,
need_permission: ['<permission1>', '<permission2>'],
admin_only: false,
nsfw: false,
disabled: false,
enable_slash: false,
async execute(msg, args) { // msg = discord.js 'Message' object; args = given arguments as list
// your lovely code to execute
},
};