-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
2,645 additions
and
4,371 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,109 @@ | ||
{ | ||
"extends": "eslint:recommended", | ||
"env": { | ||
"node": true, | ||
"es6": true | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 2017 | ||
}, | ||
"rules": { | ||
"brace-style": ["error", "stroustrup", { "allowSingleLine": true }], | ||
"comma-dangle": ["error", "always-multiline"], | ||
"comma-spacing": "error", | ||
"comma-style": "error", | ||
"curly": ["error", "multi-line", "consistent"], | ||
"dot-location": ["error", "property"], | ||
"handle-callback-err": "off", | ||
"indent": ["error", "tab"], | ||
"max-nested-callbacks": ["error", { "max": 4 }], | ||
"max-statements-per-line": ["error", { "max": 2 }], | ||
"no-console": "off", | ||
"no-empty-function": "error", | ||
"no-floating-decimal": "error", | ||
"no-inline-comments": "error", | ||
"no-lonely-if": "error", | ||
"no-multi-spaces": "error", | ||
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }], | ||
"no-shadow": ["error", { "allow": ["err", "resolve", "reject"] }], | ||
"no-trailing-spaces": ["error"], | ||
"no-var": "error", | ||
"object-curly-spacing": ["error", "always"], | ||
"prefer-const": "error", | ||
"quotes": ["error", "single"], | ||
"semi": ["error", "always"], | ||
"space-before-blocks": "error", | ||
"space-before-function-paren": ["error", { | ||
"anonymous": "never", | ||
"named": "never", | ||
"asyncArrow": "always" | ||
}], | ||
"space-in-parens": "error", | ||
"space-infix-ops": "error", | ||
"space-unary-ops": "error", | ||
"spaced-comment": "error", | ||
"yoda": "error" | ||
} | ||
"extends": [ | ||
"eslint:recommended", | ||
"prettier" | ||
], | ||
"env": { | ||
"node": true, | ||
"es6": true | ||
}, | ||
"parserOptions": { | ||
"ecmaVersion": 2017 | ||
}, | ||
"rules": { | ||
"brace-style": [ | ||
"error", | ||
"stroustrup", | ||
{ | ||
"allowSingleLine": true | ||
} | ||
], | ||
"comma-dangle": [ | ||
"error", | ||
"always-multiline" | ||
], | ||
"comma-spacing": "error", | ||
"comma-style": "error", | ||
"curly": [ | ||
"error", | ||
"multi-line", | ||
"consistent" | ||
], | ||
"dot-location": [ | ||
"error", | ||
"property" | ||
], | ||
"handle-callback-err": "off", | ||
"indent": [ | ||
"error", | ||
"tab" | ||
], | ||
"max-nested-callbacks": [ | ||
"error", | ||
{ | ||
"max": 4 | ||
} | ||
], | ||
"max-statements-per-line": [ | ||
"error", | ||
{ | ||
"max": 2 | ||
} | ||
], | ||
"no-console": "off", | ||
"no-empty-function": "error", | ||
"no-floating-decimal": "error", | ||
"no-inline-comments": "warn", | ||
"no-lonely-if": "error", | ||
"no-multi-spaces": "error", | ||
"no-multiple-empty-lines": [ | ||
"error", | ||
{ | ||
"max": 2, | ||
"maxEOF": 1, | ||
"maxBOF": 0 | ||
} | ||
], | ||
"no-shadow": [ | ||
"error", | ||
{ | ||
"allow": [ | ||
"err", | ||
"resolve", | ||
"reject" | ||
] | ||
} | ||
], | ||
"no-trailing-spaces": [ | ||
"error" | ||
], | ||
"no-var": "error", | ||
"object-curly-spacing": [ | ||
"error", | ||
"always" | ||
], | ||
"prefer-const": "error", | ||
"quotes": [ | ||
"error", | ||
"single" | ||
], | ||
"semi": [ | ||
"error", | ||
"always" | ||
], | ||
"space-before-blocks": "error", | ||
"space-before-function-paren": [ | ||
"error", | ||
{ | ||
"anonymous": "never", | ||
"named": "never", | ||
"asyncArrow": "always" | ||
} | ||
], | ||
"space-in-parens": "error", | ||
"space-infix-ops": "error", | ||
"space-unary-ops": "error", | ||
"spaced-comment": "error", | ||
"yoda": "error" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,28 @@ | ||
const fs = require('fs'); | ||
const { SlashCommandBuilder } = require('discord.js'); | ||
|
||
module.exports = { | ||
name: 'help', | ||
description: 'List all available commands.', | ||
execute(interaction) { | ||
let str = ''; | ||
const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js')); | ||
data: new SlashCommandBuilder() | ||
.setName('help') | ||
.setDescription('List all of the commands'), | ||
execute(interaction) { | ||
let str = ''; | ||
const commandFiles = fs.readdirSync('./commands') | ||
.filter(file => file.endsWith('.js')); | ||
|
||
for (const file of commandFiles) { | ||
const command = require(`./${file}`); | ||
str += `Name: ${command.name}, Description: ${command.description} \n`; | ||
} | ||
for (const file of commandFiles) { | ||
const command = require(`./${file}`); | ||
if (command.name) { | ||
str += `Name: ${command.name}, Description: ${command.description} \n`; | ||
} | ||
else { | ||
str += `Name: ${command.data.name}, Description: ${command.data.description} \n`; | ||
} | ||
} | ||
|
||
return void interaction.reply({ | ||
content: str, | ||
ephemeral: true, | ||
}); | ||
}, | ||
return interaction.reply({ | ||
content: str, | ||
ephemeral: true, | ||
}); | ||
}, | ||
}; |
Oops, something went wrong.