-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathexample_command.js
More file actions
22 lines (21 loc) · 1.12 KB
/
example_command.js
File metadata and controls
22 lines (21 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
const { Client, Message, EmbedBuilder } = require("discord.js");
module.exports = {
name: "name-of-command",
description: "Example Command",
usage: "example", // The usage of the command (HB!example <user> <message>)
example: "example", // The example of the command (HB!example @Wumpus#0000 test)
requiredPermissions: [], // The required permissions to use the command (MANAGE_MESSAGES) ETC
checks: [{ // Checks are a few things you can do/check for before the command runs, This is an example of a check where the user is not allowed to run the command in a channel called example
check: (message, args) => message.channel.name !== "example", // check should return true and or false. The arguments it has is the message and the args.
error: "You can't run this in a channel called example" // Error is the message it should respond with if the user failed the check.
}],
cooldown: 30000,
/**
* @param {Client} client
* @param {Message} message
* @param {Array} args
*/
run: async (client, message, args) => {
message.reply("You passed the checks :)")
},
}