commit
c0a7435a4b
@ -5,6 +5,7 @@ module.exports = {
|
|||||||
name: 'joint',
|
name: 'joint',
|
||||||
description: 'Send a random weed-themed phrase.',
|
description: 'Send a random weed-themed phrase.',
|
||||||
usage: '.joint',
|
usage: '.joint',
|
||||||
|
alias: ['bong', 'blunt', 'bowl', 'pipe'],
|
||||||
execute(message, commandData) {
|
execute(message, commandData) {
|
||||||
let joints = [];
|
let joints = [];
|
||||||
for (const entry of message.client.joints.map(joint => joint.content)) {
|
for (const entry of message.client.joints.map(joint => joint.content)) {
|
||||||
|
13
functions.js
13
functions.js
@ -56,10 +56,13 @@ const functions = {
|
|||||||
setvalidCommands(client) {
|
setvalidCommands(client) {
|
||||||
for (const entry of client.dotCommands.map(command => command)) {
|
for (const entry of client.dotCommands.map(command => command)) {
|
||||||
config.validCommands.push(entry.name);
|
config.validCommands.push(entry.name);
|
||||||
if (entry.alias != undefined) {
|
if (Array.isArray(entry.alias)) {
|
||||||
|
entry.alias.forEach(element => {
|
||||||
|
config.validCommands.push(element);
|
||||||
|
});
|
||||||
|
} else if (entry.alias != undefined) {
|
||||||
config.validCommands.push(entry.alias);
|
config.validCommands.push(entry.alias);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (isDev) console.log(`Valid Commands Added to Config\n${config.validCommands}`);
|
if (isDev) console.log(`Valid Commands Added to Config\n${config.validCommands}`);
|
||||||
},
|
},
|
||||||
@ -69,7 +72,11 @@ const functions = {
|
|||||||
for (const file of dotCommandFiles) {
|
for (const file of dotCommandFiles) {
|
||||||
const dotCommand = require(`./dot-commands/${file}`);
|
const dotCommand = require(`./dot-commands/${file}`);
|
||||||
client.dotCommands.set(dotCommand.name, dotCommand);
|
client.dotCommands.set(dotCommand.name, dotCommand);
|
||||||
if (dotCommand.alias != undefined) {
|
if (Array.isArray(dotCommand.alias)) {
|
||||||
|
dotCommand.alias.forEach(element => {
|
||||||
|
client.dotCommands.set(element, dotCommand);
|
||||||
|
});
|
||||||
|
} else if (dotCommand.alias != undefined) {
|
||||||
client.dotCommands.set(dotCommand.alias, dotCommand);
|
client.dotCommands.set(dotCommand.alias, dotCommand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nodbot",
|
"name": "nodbot",
|
||||||
"version": "3.0.3",
|
"version": "3.0.4",
|
||||||
"description": "Nods and Nod Accessories.",
|
"description": "Nods and Nod Accessories.",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
Loading…
Reference in New Issue
Block a user