diff --git a/packages/discord/.eslintrc b/packages/discord/.eslintrc index abdd20385..33904d964 100644 --- a/packages/discord/.eslintrc +++ b/packages/discord/.eslintrc @@ -5,18 +5,19 @@ "es6": true }, "parserOptions": { - "ecmaVersion": 2021 + "ecmaVersion": 2021, + "project": "tsconfig.json" }, "rules": { "arrow-spacing": ["warn", { "before": true, "after": true }], "brace-style": ["error", "stroustrup", { "allowSingleLine": true }], - "comma-dangle": ["error", "always-multiline"], + "comma-dangle": ["warn", "always-multiline"], "comma-spacing": "error", "comma-style": "error", "curly": ["error", "multi-line", "consistent"], "dot-location": ["error", "property"], "handle-callback-err": "off", - "indent": ["error", "tab"], + "indent": ["warn", "tab"], "keyword-spacing": "error", "max-nested-callbacks": ["error", { "max": 4 }], "max-statements-per-line": ["error", { "max": 2 }], @@ -33,7 +34,7 @@ "object-curly-spacing": ["error", "always"], "prefer-const": "error", "quotes": ["error", "single"], - "semi": ["error", "always"], + "semi": ["warn", "always"], "space-before-blocks": "error", "space-before-function-paren": ["error", { "anonymous": "never", diff --git a/packages/discord/src/index.ts b/packages/discord/src/index.ts index 6dbb71773..bfe614250 100644 --- a/packages/discord/src/index.ts +++ b/packages/discord/src/index.ts @@ -1,4 +1,3 @@ -// @ts-nocheck import { Client, Partials, @@ -26,6 +25,8 @@ const client = new Client({ }) const pubSubClient = new PubSub() + +// Will have missed people here const VALID_USERS = new Set([ 'danielprindii', 'riiku', @@ -33,7 +34,7 @@ const VALID_USERS = new Set([ 'mollydot', 'jackson.harper', 'podginator', -]) // Will have missed people here +]) const TOPIC_NAME = 'discordCommunityArticles' client.once(Events.ClientReady, () => { @@ -73,4 +74,6 @@ client.on( } ) -client.login(process.env.DISCORD_BOT_KEY) +client.login(process.env.DISCORD_BOT_KEY).catch((error) => { + console.log('error logging in:', error) +})