Formatting changes
This commit is contained in:
15
index.js
15
index.js
@@ -34,8 +34,7 @@ for (const file of cmdFiles) {
|
|||||||
if ('data' in cmd && 'execute' in cmd && cmd.type === 'slash') {
|
if ('data' in cmd && 'execute' in cmd && cmd.type === 'slash') {
|
||||||
client.commands.set(cmd.data.name, cmd);
|
client.commands.set(cmd.data.name, cmd);
|
||||||
} else {
|
} else {
|
||||||
console.log(`[WARNING] The command at ${
|
console.log(`[WARNING] The command at ${filePath} is missing a required "data", "execute" or "type" property.`);
|
||||||
filePath} is missing a required "data", "execute" or "type" property.`);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,8 +51,7 @@ for (const file of cmdTestFiles) {
|
|||||||
if ('data' in cmd && 'execute' in cmd && cmd.type === 'slash') {
|
if ('data' in cmd && 'execute' in cmd && cmd.type === 'slash') {
|
||||||
client.commands.set(cmd.data.name, cmd);
|
client.commands.set(cmd.data.name, cmd);
|
||||||
} else {
|
} else {
|
||||||
console.log(`[WARNING] The command at ${
|
console.log(`[WARNING] The command at ${filePath} is missing a required "data", "execute" or "type" property.`);
|
||||||
filePath} is missing a required "data", "execute" or "type" property.`);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,8 +91,7 @@ for (const file of contextMenuFiles) {
|
|||||||
if ('data' in cmd && 'execute' in cmd && cmd.type === 'contextmenu') {
|
if ('data' in cmd && 'execute' in cmd && cmd.type === 'contextmenu') {
|
||||||
client.commands.set(cmd.data.name, cmd);
|
client.commands.set(cmd.data.name, cmd);
|
||||||
} else {
|
} else {
|
||||||
console.log(`[WARNING] The command at ${
|
console.log(`[WARNING] The command at ${filePath} is missing a required "data", "execute" or "type" property.`);
|
||||||
filePath} is missing a required "data", "execute" or "type" property.`);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,8 +130,7 @@ for (const file of btnFiles) {
|
|||||||
if ('name' in btn && 'execute' in btn && btn.type === 'button') {
|
if ('name' in btn && 'execute' in btn && btn.type === 'button') {
|
||||||
client.events.set(btn.name, btn);
|
client.events.set(btn.name, btn);
|
||||||
} else {
|
} else {
|
||||||
console.log(`[WARNING] The button at ${
|
console.log(`[WARNING] The button at ${filePath} is missing a required "name", "execute" or "type" property.`);
|
||||||
filePath} is missing a required "name", "execute" or "type" property.`);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -174,8 +170,7 @@ for (const file of modalFiles) {
|
|||||||
if ('name' in modal && 'execute' in modal && modal.type === 'modal') {
|
if ('name' in modal && 'execute' in modal && modal.type === 'modal') {
|
||||||
client.on(Events.InteractionCreate, modal.execute);
|
client.on(Events.InteractionCreate, modal.execute);
|
||||||
} else {
|
} else {
|
||||||
console.log(`[WARNING] The modal at ${
|
console.log(`[WARNING] The modal at ${filePath} is missing a required "name", "execute" or "type" property.`);
|
||||||
filePath} is missing a required "name", "execute" or "type" property.`);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user