make variadic lists force at least one parameter + grammar corrections
This commit is contained in:
parent
7d10366f01
commit
5a7040767e
|
@ -7,7 +7,7 @@ module.exports = {
|
||||||
options: [...Array(10).keys()].map(i => ({
|
options: [...Array(10).keys()].map(i => ({
|
||||||
name: `option${i + 1}`,
|
name: `option${i + 1}`,
|
||||||
description: 'Another option',
|
description: 'Another option',
|
||||||
required: false,
|
required: i === 0,
|
||||||
type: Constants.ApplicationCommandOptionTypes.STRING
|
type: Constants.ApplicationCommandOptionTypes.STRING
|
||||||
})),
|
})),
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ const gifchoices = [
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
||||||
name: require('path').parse(__filename).name,
|
name: require('path').parse(__filename).name,
|
||||||
description: 'Noms an user!',
|
description: 'Noms a user!',
|
||||||
options: [{
|
options: [{
|
||||||
name: 'user',
|
name: 'user',
|
||||||
description: 'The user to nom',
|
description: 'The user to nom',
|
||||||
|
|
|
@ -7,7 +7,7 @@ module.exports = {
|
||||||
options: [...Array(10).keys()].map(i => ({
|
options: [...Array(10).keys()].map(i => ({
|
||||||
name: `option${i + 1}`,
|
name: `option${i + 1}`,
|
||||||
description: 'Another option',
|
description: 'Another option',
|
||||||
required: false,
|
required: i === 0,
|
||||||
type: Constants.ApplicationCommandOptionTypes.STRING
|
type: Constants.ApplicationCommandOptionTypes.STRING
|
||||||
})),
|
})),
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ const { Constants } = require('discord.js');
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
||||||
name: require('path').parse(__filename).name,
|
name: require('path').parse(__filename).name,
|
||||||
description: 'Slaps an user!',
|
description: 'Slaps a user!',
|
||||||
options: [{
|
options: [{
|
||||||
name: 'user',
|
name: 'user',
|
||||||
description: 'The user to slap',
|
description: 'The user to slap',
|
||||||
|
|
|
@ -9,7 +9,7 @@ const gifchoices = [
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
||||||
name: require('path').parse(__filename).name,
|
name: require('path').parse(__filename).name,
|
||||||
description: 'Snuggle an user!',
|
description: 'Snuggle a user!',
|
||||||
options: [{
|
options: [{
|
||||||
name: 'user',
|
name: 'user',
|
||||||
description: 'The user to snuggle',
|
description: 'The user to snuggle',
|
||||||
|
|
1
start.js
1
start.js
|
@ -57,7 +57,6 @@ client.once('ready', async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
client.commands.forEach(async command => {
|
client.commands.forEach(async command => {
|
||||||
console.log(command);
|
|
||||||
if (sandboxSettings.enabled && !existingLocal.map(x => x.name).includes(command.name)) {
|
if (sandboxSettings.enabled && !existingLocal.map(x => x.name).includes(command.name)) {
|
||||||
await localCommands.create(command);
|
await localCommands.create(command);
|
||||||
// console.log(`created new local command ${command.name}`);
|
// console.log(`created new local command ${command.name}`);
|
||||||
|
|
Reference in New Issue