chore: wip
This commit is contained in:
parent
523be3e439
commit
acc8bf6906
16 changed files with 2695 additions and 83 deletions
5
.idea/.gitignore
vendored
5
.idea/.gitignore
vendored
|
@ -1,5 +0,0 @@
|
||||||
# Default ignored files
|
|
||||||
/shelf/
|
|
||||||
/workspace.xml
|
|
||||||
# Editor-based HTTP Client requests
|
|
||||||
/httpRequests/
|
|
|
@ -47,8 +47,12 @@
|
||||||
<option name="HTML_DO_NOT_INDENT_CHILDREN_OF" value="" />
|
<option name="HTML_DO_NOT_INDENT_CHILDREN_OF" value="" />
|
||||||
</HTMLCodeStyleSettings>
|
</HTMLCodeStyleSettings>
|
||||||
<JSCodeStyleSettings version="0">
|
<JSCodeStyleSettings version="0">
|
||||||
|
<option name="FORCE_SEMICOLON_STYLE" value="true" />
|
||||||
<option name="SPACE_WITHIN_ARRAY_INITIALIZER_BRACKETS" value="true" />
|
<option name="SPACE_WITHIN_ARRAY_INITIALIZER_BRACKETS" value="true" />
|
||||||
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
|
||||||
|
<option name="USE_DOUBLE_QUOTES" value="false" />
|
||||||
|
<option name="FORCE_QUOTE_STYlE" value="true" />
|
||||||
|
<option name="ENFORCE_TRAILING_COMMA" value="WhenMultiline" />
|
||||||
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
|
||||||
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
<option name="SPACES_WITHIN_IMPORTS" value="true" />
|
||||||
</JSCodeStyleSettings>
|
</JSCodeStyleSettings>
|
||||||
|
@ -63,7 +67,8 @@
|
||||||
<option name="USE_DOUBLE_QUOTES" value="false" />
|
<option name="USE_DOUBLE_QUOTES" value="false" />
|
||||||
<option name="ENFORCE_QUOTES_ON_FORMAT" value="true" />
|
<option name="ENFORCE_QUOTES_ON_FORMAT" value="true" />
|
||||||
</ScssCodeStyleSettings>
|
</ScssCodeStyleSettings>
|
||||||
<SqlCodeStyleSettings version="6">
|
<SqlCodeStyleSettings version="5">
|
||||||
|
<option name="DISABLE_FORMATTING" value="true" />
|
||||||
<option name="KEYWORD_CASE" value="2" />
|
<option name="KEYWORD_CASE" value="2" />
|
||||||
<option name="IDENTIFIER_CASE" value="1" />
|
<option name="IDENTIFIER_CASE" value="1" />
|
||||||
</SqlCodeStyleSettings>
|
</SqlCodeStyleSettings>
|
||||||
|
@ -115,6 +120,8 @@
|
||||||
</indentOptions>
|
</indentOptions>
|
||||||
</codeStyleSettings>
|
</codeStyleSettings>
|
||||||
<codeStyleSettings language="JavaScript">
|
<codeStyleSettings language="JavaScript">
|
||||||
|
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
|
||||||
|
<option name="ALIGN_MULTILINE_FOR" value="false" />
|
||||||
<option name="SPACE_BEFORE_IF_PARENTHESES" value="false" />
|
<option name="SPACE_BEFORE_IF_PARENTHESES" value="false" />
|
||||||
<option name="SPACE_BEFORE_WHILE_PARENTHESES" value="false" />
|
<option name="SPACE_BEFORE_WHILE_PARENTHESES" value="false" />
|
||||||
<option name="SPACE_BEFORE_FOR_PARENTHESES" value="false" />
|
<option name="SPACE_BEFORE_FOR_PARENTHESES" value="false" />
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
<component name="CopyrightManager">
|
|
||||||
<copyright>
|
|
||||||
<option name="notice" value="/* * This file is part of ArgonBot * * ArgonBot is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * ArgonBot is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with ArgonBot. If not, see <https: //www.gnu.org/licenses/>. */" />
|
|
||||||
<option name="myName" value="GPL-3.0-or-later" />
|
|
||||||
</copyright>
|
|
||||||
</component>
|
|
6
.idea/discord.xml
Normal file
6
.idea/discord.xml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="DiscordProjectSettings">
|
||||||
|
<option name="show" value="PROJECT_FILES" />
|
||||||
|
</component>
|
||||||
|
</project>
|
6
.idea/graphql-settings.xml
Normal file
6
.idea/graphql-settings.xml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="GraphQLSettings">
|
||||||
|
<option name="enableRelayModernFrameworkSupport" value="true" />
|
||||||
|
</component>
|
||||||
|
</project>
|
6
.idea/inspectionProfiles/Project_Default.xml
Normal file
6
.idea/inspectionProfiles/Project_Default.xml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
</profile>
|
||||||
|
</component>
|
|
@ -1,16 +0,0 @@
|
||||||
<component name="InspectionProjectProfileManager">
|
|
||||||
<settings>
|
|
||||||
<option name="PROJECT_PROFILE" value="Default" />
|
|
||||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
|
||||||
<version value="1.0" />
|
|
||||||
<list size="7">
|
|
||||||
<item index="0" class="java.lang.String" itemvalue="INFORMATION" />
|
|
||||||
<item index="1" class="java.lang.String" itemvalue="TYPO" />
|
|
||||||
<item index="2" class="java.lang.String" itemvalue="SERVER PROBLEM" />
|
|
||||||
<item index="3" class="java.lang.String" itemvalue="WEAK WARNING" />
|
|
||||||
<item index="4" class="java.lang.String" itemvalue="INFO" />
|
|
||||||
<item index="5" class="java.lang.String" itemvalue="WARNING" />
|
|
||||||
<item index="6" class="java.lang.String" itemvalue="ERROR" />
|
|
||||||
</list>
|
|
||||||
</settings>
|
|
||||||
</component>
|
|
6
.idea/misc.xml
Normal file
6
.idea/misc.xml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectResources">
|
||||||
|
<xml-schema-version>XMLSchema_1_1</xml-schema-version>
|
||||||
|
</component>
|
||||||
|
</project>
|
4
.idea/stylesheetLinters/stylelint.xml
Normal file
4
.idea/stylesheetLinters/stylelint.xml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="StylelintConfiguration" allowJS="true" />
|
||||||
|
</project>
|
10
package.json
10
package.json
|
@ -57,7 +57,7 @@
|
||||||
"sql-template-strings": "^2.2.2",
|
"sql-template-strings": "^2.2.2",
|
||||||
"terminal-link": "^3.0.0",
|
"terminal-link": "^3.0.0",
|
||||||
"tslib": "^2.3.0",
|
"tslib": "^2.3.0",
|
||||||
"typescript": "^4.3.4",
|
"typescript": "^4.3.5",
|
||||||
"utf-8-validate": "^5.0.5",
|
"utf-8-validate": "^5.0.5",
|
||||||
"vm2": "^3.9.3",
|
"vm2": "^3.9.3",
|
||||||
"zlib-sync": "^0.1.7"
|
"zlib-sync": "^0.1.7"
|
||||||
|
@ -68,6 +68,7 @@
|
||||||
"@commitlint/prompt-cli": "^12.1.4",
|
"@commitlint/prompt-cli": "^12.1.4",
|
||||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||||
"@rollup/plugin-json": "^4.1.0",
|
"@rollup/plugin-json": "^4.1.0",
|
||||||
|
"@rollup/plugin-strip": "^2.0.1",
|
||||||
"@rollup/plugin-typescript": "^8.2.1",
|
"@rollup/plugin-typescript": "^8.2.1",
|
||||||
"@types/chai": "^4.2.19",
|
"@types/chai": "^4.2.19",
|
||||||
"@types/config": "^0.0.38",
|
"@types/config": "^0.0.38",
|
||||||
|
@ -81,6 +82,8 @@
|
||||||
"@types/node": "^15.12.5",
|
"@types/node": "^15.12.5",
|
||||||
"@types/pg": "^8.6.0",
|
"@types/pg": "^8.6.0",
|
||||||
"@types/rimraf": "^3.0.0",
|
"@types/rimraf": "^3.0.0",
|
||||||
|
"@types/rollup-plugin-progress": "^1.1.0",
|
||||||
|
"@types/rollup-plugin-size-snapshot": "^0.10.0",
|
||||||
"@types/sinon": "^10.0.2",
|
"@types/sinon": "^10.0.2",
|
||||||
"@types/source-map-support": "^0.5.3",
|
"@types/source-map-support": "^0.5.3",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.28.1",
|
"@typescript-eslint/eslint-plugin": "^4.28.1",
|
||||||
|
@ -98,8 +101,13 @@
|
||||||
"nyc": "^15.1.0",
|
"nyc": "^15.1.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"rollup": "^2.52.3",
|
"rollup": "^2.52.3",
|
||||||
|
"rollup-plugin-analyzer": "^4.0.0",
|
||||||
"rollup-plugin-multi-input": "^1.3.1",
|
"rollup-plugin-multi-input": "^1.3.1",
|
||||||
|
"rollup-plugin-progress": "^1.1.2",
|
||||||
|
"rollup-plugin-size-snapshot": "^0.12.0",
|
||||||
|
"rollup-plugin-sizes": "^1.0.4",
|
||||||
"rollup-plugin-terser": "^7.0.2",
|
"rollup-plugin-terser": "^7.0.2",
|
||||||
|
"rollup-plugin-visualizer": "^5.5.1",
|
||||||
"sinon": "^11.1.1",
|
"sinon": "^11.1.1",
|
||||||
"source-map-support": "^0.5.19",
|
"source-map-support": "^0.5.19",
|
||||||
"standard-version": "^9.3.0",
|
"standard-version": "^9.3.0",
|
||||||
|
|
|
@ -18,6 +18,8 @@ import typescript from '@rollup/plugin-typescript';
|
||||||
import json from '@rollup/plugin-json';
|
import json from '@rollup/plugin-json';
|
||||||
import { terser } from 'rollup-plugin-terser';
|
import { terser } from 'rollup-plugin-terser';
|
||||||
import multiInput from 'rollup-plugin-multi-input';
|
import multiInput from 'rollup-plugin-multi-input';
|
||||||
|
import progress from 'rollup-plugin-progress';
|
||||||
|
import analyze from 'rollup-plugin-analyzer';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
input: ['src/index.ts', 'src/commands/**/*.ts'],
|
input: ['src/index.ts', 'src/commands/**/*.ts'],
|
||||||
|
@ -30,5 +32,7 @@ export default {
|
||||||
json({ compact: true, preferConst: true }),
|
json({ compact: true, preferConst: true }),
|
||||||
terser(),
|
terser(),
|
||||||
multiInput(),
|
multiInput(),
|
||||||
|
progress(),
|
||||||
|
analyze(),
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
* along with ArgonBot. If not, see <https: //www.gnu.org/licenses/>.
|
* along with ArgonBot. If not, see <https: //www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import 'module-alias/register';
|
import 'module-alias/register';
|
||||||
|
import '@utils/augments';
|
||||||
|
|
||||||
import ArgonClient from '@lib/ArgonClient';
|
import ArgonClient from '@lib/ArgonClient';
|
||||||
import { Defaults } from '@utils/defaults';
|
import { Defaults } from '@utils/defaults';
|
||||||
|
|
|
@ -18,9 +18,11 @@ import type Command from '@structures/command';
|
||||||
import { Client, ClientOptions, Collection } from 'discord.js';
|
import { Client, ClientOptions, Collection } from 'discord.js';
|
||||||
|
|
||||||
export default class extends Client {
|
export default class extends Client {
|
||||||
public override readonly commands: Collection<string, Command> = new Collection();
|
public commands: Collection<string, Command>;
|
||||||
|
|
||||||
public constructor(options: ClientOptions) {
|
public constructor(options: ClientOptions) {
|
||||||
super(options);
|
super(options);
|
||||||
|
|
||||||
|
this.commands = new Collection<string, Command>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
23
src/lib/utils/augments.ts
Normal file
23
src/lib/utils/augments.ts
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
* This file is part of ArgonBot
|
||||||
|
*
|
||||||
|
* ArgonBot is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* ArgonBot is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with ArgonBot. If not, see <https: //www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
import type Command from '@structures/command';
|
||||||
|
|
||||||
|
declare module 'discord.js' {
|
||||||
|
interface Client{
|
||||||
|
commands: Collection<string, Command>;
|
||||||
|
}
|
||||||
|
}
|
|
@ -25,9 +25,7 @@
|
||||||
"strictPropertyInitialization": true,
|
"strictPropertyInitialization": true,
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"moduleResolution": "Node",
|
|
||||||
"noFallthroughCasesInSwitch": true,
|
"noFallthroughCasesInSwitch": true,
|
||||||
"noImplicitOverride": true,
|
|
||||||
"noImplicitReturns": true,
|
"noImplicitReturns": true,
|
||||||
"noPropertyAccessFromIndexSignature": true,
|
"noPropertyAccessFromIndexSignature": true,
|
||||||
"noUncheckedIndexedAccess": true,
|
"noUncheckedIndexedAccess": true,
|
||||||
|
@ -52,6 +50,7 @@
|
||||||
"inlineSourceMap": true,
|
"inlineSourceMap": true,
|
||||||
"inlineSources": true,
|
"inlineSources": true,
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
|
"moduleResolution": "Node",
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
"name": "typescript-eslint-language-service"
|
"name": "typescript-eslint-language-service"
|
||||||
|
|
Reference in a new issue