diff --git a/package.json b/package.json index a42b6ce7fb247f9d08f4aac312fdc3f3803232db..1a284e9852ad4945e29159017c900abfdab2125b 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ }, "homepage": "https://github.com/Half-Shot/matrix-appservice-discord#readme", "dependencies": { - "better-discord.js": "git://github.com/Sorunome/better-discord.js.git#b5a28499899fe2d9e6aa1aa3b3c5d693ae672117", + "better-discord.js": "git+https://github.com/Sorunome/better-discord.js.git#b5a28499899fe2d9e6aa1aa3b3c5d693ae672117", "better-sqlite3": "^7.1.0", "command-line-args": "^5.1.1", "command-line-usage": "^6.1.0", diff --git a/test/mocks/appservicemock.ts b/test/mocks/appservicemock.ts index 4de03ee482d1eb6f56606cb805693af62dc7a4e7..28eb3935b9a4fa5e66f89604278a8b6f11bcf74b 100644 --- a/test/mocks/appservicemock.ts +++ b/test/mocks/appservicemock.ts @@ -167,7 +167,7 @@ class IntentMock extends AppserviceMockBase { this.funcCalled("sendText", roomId, body); } - public sendEvent(roomId: string, content: any) { + public sendEvent(roomId: string, content: Record<string, unknown>) { this.funcCalled("sendEvent", roomId, content); } @@ -218,7 +218,7 @@ class MatrixClientMock extends AppserviceMockBase { this.funcCalled("kickUser", roomId, userId); } - public sendStateEvent(roomId: string, type: string, stateKey: string, content: {}) { + public sendStateEvent(roomId: string, type: string, stateKey: string, content: Record<string, unknown>) { this.funcCalled("sendStateEvent", roomId, type, stateKey, content); } diff --git a/test/test_discordbot.ts b/test/test_discordbot.ts index 17f6375a564f292221c3950e678fadb5c510bf8b..9d91dfeff10e44279db359729853358d5b1daa41 100644 --- a/test/test_discordbot.ts +++ b/test/test_discordbot.ts @@ -115,7 +115,7 @@ describe("DiscordBot", () => { mockBridge, {}, ); - discord.bot = { user: { id: "654" } }; + discord._bot = { user: { id: "654" } }; discord.userSync = { OnUpdateUser: async () => { }, }; diff --git a/test/test_store.ts b/test/test_store.ts index d2d735d7e629bf018ba539433db3844e36ad1f71..d757f6f64018d8f7c501ddb1779eb8d13afad784 100644 --- a/test/test_store.ts +++ b/test/test_store.ts @@ -26,7 +26,7 @@ describe("DiscordStore", () => { describe("init", () => { it("can create a db", async () => { const store = new DiscordStore(":memory:"); - return store.init(); + await store.init(); }); }); describe("addUserToken", () => { diff --git a/yarn.lock b/yarn.lock index f516e13cb2e1d6bb1f56fe99da4d152fa6054a04..192929860212d736f6b61be51a1201f12f7516ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -814,9 +814,9 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -"better-discord.js@git://github.com/Sorunome/better-discord.js.git#b5a28499899fe2d9e6aa1aa3b3c5d693ae672117": +"better-discord.js@git+https://github.com/Sorunome/better-discord.js.git#b5a28499899fe2d9e6aa1aa3b3c5d693ae672117": version "12.3.1" - resolved "git://github.com/Sorunome/better-discord.js.git#b5a28499899fe2d9e6aa1aa3b3c5d693ae672117" + resolved "git+https://github.com/Sorunome/better-discord.js.git#b5a28499899fe2d9e6aa1aa3b3c5d693ae672117" dependencies: "@discordjs/collection" "^0.1.6" "@discordjs/form-data" "^3.0.1" @@ -1393,9 +1393,9 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" -"discord-markdown@git://github.com/Sorunome/discord-markdown.git#7958a03a952ed02cbd588b09eb04bc070b3a11f2": +"discord-markdown@git+https://github.com/Sorunome/discord-markdown.git#7958a03a952ed02cbd588b09eb04bc070b3a11f2": version "2.3.1" - resolved "git://github.com/Sorunome/discord-markdown.git#7958a03a952ed02cbd588b09eb04bc070b3a11f2" + resolved "git+https://github.com/Sorunome/discord-markdown.git#7958a03a952ed02cbd588b09eb04bc070b3a11f2" dependencies: highlight.js "^9.18.1" node-emoji "^1.10.0" @@ -2792,7 +2792,7 @@ matrix-discord-parser@0.1.5: resolved "https://registry.yarnpkg.com/matrix-discord-parser/-/matrix-discord-parser-0.1.5.tgz#dd6a481a569567e8e30d70599d4dcb173261504c" integrity sha512-SilBNcNeJCrL6XEHVfbOhupNJICFdyFWfwv85Wtyh1Xxc0XPv4zK/gpEPogVeuKJD3TE0KT4iHq0nLgUJ8GBiQ== dependencies: - discord-markdown "git://github.com/Sorunome/discord-markdown.git#7958a03a952ed02cbd588b09eb04bc070b3a11f2" + discord-markdown "git+https://github.com/Sorunome/discord-markdown.git#7958a03a952ed02cbd588b09eb04bc070b3a11f2" escape-html "^1.0.3" got "^11.6.0" highlight.js "^9.18.1"