Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Lutra-Fs committed Nov 24, 2022
2 parents 2d3fcf2 + 714cfe4 commit 41d3923
Show file tree
Hide file tree
Showing 30 changed files with 2,645 additions and 4,371 deletions.
152 changes: 107 additions & 45 deletions .eslintrc.json
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"
}
}
33 changes: 0 additions & 33 deletions .github/workflows/license-audit.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/stale.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .prettierrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions client/Client.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const {Client, Collection, Intents} = require('discord.js');
const {Client, Collection, GatewayIntentBits} = require('discord.js');

module.exports = class extends Client {
constructor(config) {
super({
intents: [Intents.FLAGS.GUILD_VOICE_STATES, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILDS],
intents: [GatewayIntentBits.GuildVoiceStates, GatewayIntentBits.GuildMessages, GatewayIntentBits.Guilds],
});

this.commands = new Collection();
Expand Down
36 changes: 22 additions & 14 deletions commands/help.js
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,
});
},
};
Loading

0 comments on commit 41d3923

Please sign in to comment.