-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
1 parent
aec6f0c
commit 6216637
Showing
23 changed files
with
679 additions
and
645 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,63 +1,63 @@ | ||
/** @type {import("@types/eslint").Linter.Config} */ | ||
module.exports = { | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended-type-checked', | ||
'plugin:@typescript-eslint/stylistic-type-checked', | ||
'prettier', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: ['./tsconfig.json'], | ||
tsconfigRootDir: __dirname, | ||
}, | ||
plugins: ['@typescript-eslint', 'prettier'], | ||
rules: { | ||
// These off/configured-differently-by-default rules fit well for us | ||
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }], | ||
'@typescript-eslint/no-unused-vars': [ | ||
'warn', | ||
{ | ||
argsIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
caughtErrorsIgnorePattern: '^_', | ||
ignoreRestSiblings: true, | ||
}, | ||
], | ||
'@typescript-eslint/no-shadow': ['error'], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended-type-checked', | ||
'plugin:@typescript-eslint/stylistic-type-checked', | ||
'prettier', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: ['./tsconfig.json'], | ||
tsconfigRootDir: __dirname, | ||
}, | ||
plugins: ['@typescript-eslint', 'prettier'], | ||
rules: { | ||
// These off/configured-differently-by-default rules fit well for us | ||
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }], | ||
'@typescript-eslint/no-unused-vars': [ | ||
'warn', | ||
{ | ||
argsIgnorePattern: '^_', | ||
varsIgnorePattern: '^_', | ||
caughtErrorsIgnorePattern: '^_', | ||
ignoreRestSiblings: true, | ||
}, | ||
], | ||
'@typescript-eslint/no-shadow': ['error'], | ||
|
||
// We do want console statements occasionally (for example, used in error handling) | ||
'no-console': 'off', | ||
'no-console': 'off', | ||
|
||
// Todo: do we want these? | ||
'@typescript-eslint/array-type': 'off', | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
'@typescript-eslint/class-literal-property-style': 'off', | ||
'@typescript-eslint/consistent-indexed-object-style': 'off', | ||
'@typescript-eslint/consistent-type-definitions': 'off', | ||
'@typescript-eslint/dot-notation': 'off', | ||
'@typescript-eslint/no-base-to-string': 'off', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'@typescript-eslint/no-floating-promises': 'off', | ||
'@typescript-eslint/no-misused-promises': 'off', | ||
'@typescript-eslint/no-redundant-type-constituents': 'off', | ||
'@typescript-eslint/no-this-alias': 'off', | ||
'@typescript-eslint/no-unsafe-argument': 'off', | ||
'@typescript-eslint/no-unsafe-assignment': 'off', | ||
'@typescript-eslint/no-unsafe-call': 'off', | ||
'@typescript-eslint/no-unsafe-member-access': 'off', | ||
'@typescript-eslint/no-unsafe-return': 'off', | ||
'@typescript-eslint/prefer-nullish-coalescing': 'off', | ||
'@typescript-eslint/prefer-optional-chain': 'off', | ||
'@typescript-eslint/prefer-string-starts-ends-with': 'off', | ||
'@typescript-eslint/require-await': 'off', | ||
'@typescript-eslint/restrict-plus-operands': 'off', | ||
'@typescript-eslint/restrict-template-expressions': 'off', | ||
'@typescript-eslint/sort-type-constituents': 'off', | ||
'@typescript-eslint/unbound-method': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
// Todo: do we want these? | ||
'@typescript-eslint/array-type': 'off', | ||
'@typescript-eslint/ban-ts-comment': 'off', | ||
'@typescript-eslint/class-literal-property-style': 'off', | ||
'@typescript-eslint/consistent-indexed-object-style': 'off', | ||
'@typescript-eslint/consistent-type-definitions': 'off', | ||
'@typescript-eslint/dot-notation': 'off', | ||
'@typescript-eslint/no-base-to-string': 'off', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'@typescript-eslint/no-floating-promises': 'off', | ||
'@typescript-eslint/no-misused-promises': 'off', | ||
'@typescript-eslint/no-redundant-type-constituents': 'off', | ||
'@typescript-eslint/no-this-alias': 'off', | ||
'@typescript-eslint/no-unsafe-argument': 'off', | ||
'@typescript-eslint/no-unsafe-assignment': 'off', | ||
'@typescript-eslint/no-unsafe-call': 'off', | ||
'@typescript-eslint/no-unsafe-member-access': 'off', | ||
'@typescript-eslint/no-unsafe-return': 'off', | ||
'@typescript-eslint/prefer-nullish-coalescing': 'off', | ||
'@typescript-eslint/prefer-optional-chain': 'off', | ||
'@typescript-eslint/prefer-string-starts-ends-with': 'off', | ||
'@typescript-eslint/require-await': 'off', | ||
'@typescript-eslint/restrict-plus-operands': 'off', | ||
'@typescript-eslint/restrict-template-expressions': 'off', | ||
'@typescript-eslint/sort-type-constituents': 'off', | ||
'@typescript-eslint/unbound-method': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
|
||
// These rules enabled by the preset configs don't work well for us | ||
'@typescript-eslint/await-thenable': 'off', | ||
'prefer-const': 'off', | ||
}, | ||
// These rules enabled by the preset configs don't work well for us | ||
'@typescript-eslint/await-thenable': 'off', | ||
'prefer-const': 'off', | ||
}, | ||
}; |
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,7 +1,7 @@ | ||
module.exports = { | ||
printWidth: 120, | ||
semi: true, | ||
singleQuote: true, | ||
tabWidth: 2, | ||
trailingComma: 'es5', | ||
printWidth: 120, | ||
semi: true, | ||
singleQuote: true, | ||
tabWidth: 2, | ||
trailingComma: 'es5', | ||
}; |
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,45 +1,45 @@ | ||
{ | ||
"name": "houston-bot", | ||
"private": true, | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "dist/app.js", | ||
"type": "module", | ||
"scripts": { | ||
"build": "tsc --build --verbose", | ||
"start": "node .", | ||
"dev": "tsc && node .", | ||
"preinstall": "npx only-allow pnpm", | ||
"lint": "eslint . --report-unused-disable-directives", | ||
"format": "pnpm run format:code", | ||
"name": "houston-bot", | ||
"private": true, | ||
"version": "1.0.0", | ||
"description": "", | ||
"main": "dist/app.js", | ||
"type": "module", | ||
"scripts": { | ||
"build": "tsc --build --verbose", | ||
"start": "node .", | ||
"dev": "tsc && node .", | ||
"preinstall": "npx only-allow pnpm", | ||
"lint": "eslint . --report-unused-disable-directives", | ||
"format": "pnpm run format:code", | ||
"format:ci": "pnpm run format:imports && pnpm run format:code", | ||
"format:code": "prettier . -w --cache", | ||
"format:code": "prettier . -w --cache", | ||
"format:imports": "organize-imports-cli ./tsconfig.json" | ||
}, | ||
"engines": { | ||
"node": ">=18.18.0", | ||
"pnpm": ">=8.6.12" | ||
}, | ||
"packageManager": "[email protected]", | ||
"dependencies": { | ||
"@octokit/rest": "^20.0.2", | ||
"algoliasearch": "^4.20.0", | ||
"discord.js": "^14.13.0", | ||
"dotenv": "^16.3.1", | ||
"html-entities": "^2.4.0", | ||
"node-schedule": "^2.1.1", | ||
"organize-imports-cli": "^0.10.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^18.17.18", | ||
"@types/node-schedule": "^2.1.0", | ||
"@typescript-eslint/eslint-plugin": "^6.10.0", | ||
"@typescript-eslint/parser": "^6.10.0", | ||
"eslint": "^8.53.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-prettier": "^5.0.1", | ||
"prettier": "^3.0.3", | ||
"typescript": "^5.2.2" | ||
}, | ||
"license": "MIT" | ||
}, | ||
"engines": { | ||
"node": ">=18.18.0", | ||
"pnpm": ">=8.6.12" | ||
}, | ||
"packageManager": "[email protected]", | ||
"dependencies": { | ||
"@octokit/rest": "^20.0.2", | ||
"algoliasearch": "^4.20.0", | ||
"discord.js": "^14.13.0", | ||
"dotenv": "^16.3.1", | ||
"html-entities": "^2.4.0", | ||
"node-schedule": "^2.1.1", | ||
"organize-imports-cli": "^0.10.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^18.17.18", | ||
"@types/node-schedule": "^2.1.0", | ||
"@typescript-eslint/eslint-plugin": "^6.10.0", | ||
"@typescript-eslint/parser": "^6.10.0", | ||
"eslint": "^8.53.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-prettier": "^5.0.1", | ||
"prettier": "^3.0.3", | ||
"typescript": "^5.2.2" | ||
}, | ||
"license": "MIT" | ||
} |
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 |
---|---|---|
|
@@ -12,6 +12,6 @@ export default { | |
options: { | ||
useTabs: false, | ||
}, | ||
} | ||
}, | ||
], | ||
}; |
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,5 +1,5 @@ | ||
import dotenv from 'dotenv'; | ||
|
||
dotenv.config() | ||
dotenv.config(); | ||
|
||
import("./client/client.js"); | ||
import('./client/client.js'); |
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,15 +1,17 @@ | ||
import { SlashCommandBuilder, ChatInputCommandInteraction } from "discord.js"; | ||
import { getDefaultEmbed } from "../utils/embeds.js"; | ||
import { ChatInputCommandInteraction, SlashCommandBuilder } from 'discord.js'; | ||
import { getDefaultEmbed } from '../utils/embeds.js'; | ||
|
||
export default { | ||
data: new SlashCommandBuilder() | ||
.setName("ask") | ||
.setDescription("Trigger a message on questions that should be reworded"), | ||
.setName('ask') | ||
.setDescription('Trigger a message on questions that should be reworded'), | ||
async execute(interaction: ChatInputCommandInteraction) { | ||
const embed = getDefaultEmbed() | ||
.setTitle('Help us help you!') | ||
.setDescription( | ||
"Hey, I'm not sure how to answer your question. Here's some basic info that can help you provide the info we need to help you!\n\nhttps://hackmd.io/w9Sdod7HQTWYaZsaAcW44g" | ||
); | ||
|
||
const embed = getDefaultEmbed().setTitle("Help us help you!") | ||
.setDescription("Hey, I'm not sure how to answer your question. Here's some basic info that can help you provide the info we need to help you!\n\nhttps://hackmd.io/w9Sdod7HQTWYaZsaAcW44g");; | ||
|
||
interaction.reply({embeds: [embed], ephemeral: false}); | ||
} | ||
} | ||
interaction.reply({ embeds: [embed], ephemeral: false }); | ||
}, | ||
}; |
Oops, something went wrong.