aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.eslintrc.json25
-rw-r--r--.prettierrc.json12
-rw-r--r--src/listeners/message/blacklistedFile.ts8
3 files changed, 11 insertions, 34 deletions
diff --git a/.eslintrc.json b/.eslintrc.json
index 3e79826..de3fb7c 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -3,24 +3,15 @@
"es2021": true,
"node": true
},
- "extends": [
- "eslint:recommended",
- "plugin:@typescript-eslint/recommended",
- "prettier"
- ],
+ "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 12,
"sourceType": "module",
"project": "./tsconfig.json"
},
- "plugins": [
- "@typescript-eslint",
- "deprecation"
- ],
- "ignorePatterns": [
- "dist"
- ],
+ "plugins": ["@typescript-eslint", "deprecation"],
+ "ignorePatterns": ["dist"],
"rules": {
"no-return-await": "off",
"@typescript-eslint/no-empty-interface": "warn",
@@ -56,9 +47,7 @@
"error",
{
"allowDestructuring": true,
- "allowedNames": [
- "that"
- ]
+ "allowedNames": ["that"]
}
],
"@typescript-eslint/no-unused-vars": [
@@ -68,9 +57,7 @@
}
],
"no-implied-eval": "off",
- "@typescript-eslint/no-implied-eval": [
- "error"
- ],
+ "@typescript-eslint/no-implied-eval": ["error"],
"deprecation/deprecation": "warn"
}
-} \ No newline at end of file
+}
diff --git a/.prettierrc.json b/.prettierrc.json
index 85b85a1..6797105 100644
--- a/.prettierrc.json
+++ b/.prettierrc.json
@@ -7,23 +7,17 @@
"endOfLine": "lf",
"overrides": [
{
- "files": [
- "*BushClientEvents.d.ts"
- ],
+ "files": ["*BushClientEvents.d.ts"],
"options": {
"printWidth": 80
}
},
{
- "files": [
- "badwords.ts",
- "badlinks.ts",
- "badlinks-secret.ts"
- ],
+ "files": ["badwords.ts", "badlinks.ts", "badlinks-secret.ts"],
"options": {
"singleQuote": false,
"trailingComma": "es5"
}
}
]
-} \ No newline at end of file
+}
diff --git a/src/listeners/message/blacklistedFile.ts b/src/listeners/message/blacklistedFile.ts
index ac1fd02..26e1719 100644
--- a/src/listeners/message/blacklistedFile.ts
+++ b/src/listeners/message/blacklistedFile.ts
@@ -105,9 +105,7 @@ export default class BlacklistedFileListener extends BushListener {
for (const attachment of foundEmojis) {
try {
const req = await got.get(
- `https://cdn.discordapp.com/emojis/${attachment.groups?.id}.${
- attachment.groups?.animated === 'a' ? 'gif' : 'png'
- }`
+ `https://cdn.discordapp.com/emojis/${attachment.groups?.id}.${attachment.groups?.animated === 'a' ? 'gif' : 'png'}`
);
const rawHash = crypto.createHash('md5');
rawHash.update(req.rawBody.toString('binary'));
@@ -145,9 +143,7 @@ export default class BlacklistedFileListener extends BushListener {
);
void client.console.warn(
'blacklistedFile',
- `Failed to delete <<${foundFiles.map((f) => f.description).join(' and ')}>> sent by <<${
- message.author.tag
- }>> in <<${
+ `Failed to delete <<${foundFiles.map((f) => f.description).join(' and ')}>> sent by <<${message.author.tag}>> in <<${
message.channel.type === 'DM' ? `${message.channel.recipient.tag}'s DMs` : message.channel.name
}>>.`
);