commit
fee3e0cfa0
6 changed files with 10 additions and 8 deletions
6
deps.ts
6
deps.ts
|
@ -1,6 +1,6 @@
|
||||||
export { EventEmitter } from 'https://deno.land/x/event@0.2.1/mod.ts'
|
export { EventEmitter } from 'https://deno.land/x/event@1.0.0/mod.ts'
|
||||||
export { unzlib } from 'https://denopkg.com/DjDeveloperr/denoflate@1.2/mod.ts'
|
export { unzlib } from 'https://denopkg.com/DjDeveloperr/denoflate@1.2/mod.ts'
|
||||||
export { fetchAuto } from 'https://deno.land/x/fetchbase64@1.0.0/mod.ts'
|
export { fetchAuto } from 'https://deno.land/x/fetchbase64@1.0.0/mod.ts'
|
||||||
export { walk } from 'https://deno.land/std@0.86.0/fs/walk.ts'
|
export { walk } from 'https://deno.land/std@0.95.0/fs/walk.ts'
|
||||||
export { join } from 'https://deno.land/std@0.86.0/path/mod.ts'
|
export { join } from 'https://deno.land/std@0.95.0/path/mod.ts'
|
||||||
export { Mixin } from 'https://esm.sh/ts-mixer@5.4.0'
|
export { Mixin } from 'https://esm.sh/ts-mixer@5.4.0'
|
||||||
|
|
2
src/cache/redis.ts
vendored
2
src/cache/redis.ts
vendored
|
@ -4,7 +4,7 @@ import {
|
||||||
connect,
|
connect,
|
||||||
Redis,
|
Redis,
|
||||||
RedisConnectOptions
|
RedisConnectOptions
|
||||||
} from 'https://deno.land/x/redis@v0.14.1/mod.ts'
|
} from 'https://deno.land/x/redis@v0.22.0/mod.ts'
|
||||||
|
|
||||||
/** Redis Cache Adapter for using Redis as a cache-provider. */
|
/** Redis Cache Adapter for using Redis as a cache-provider. */
|
||||||
export class RedisCacheAdapter implements ICacheAdapter {
|
export class RedisCacheAdapter implements ICacheAdapter {
|
||||||
|
|
|
@ -399,7 +399,7 @@ export class Gateway extends HarmonyEventEmitter<GatewayTypedEvents> {
|
||||||
await this.cache.delete(`seq_${this.shards?.join('-') ?? '0'}`)
|
await this.cache.delete(`seq_${this.shards?.join('-') ?? '0'}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.close(1000, RECONNECT_REASON)
|
this.closeGateway(1000, RECONNECT_REASON)
|
||||||
this.initWebsocket()
|
this.initWebsocket()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -418,7 +418,7 @@ export class Gateway extends HarmonyEventEmitter<GatewayTypedEvents> {
|
||||||
this.websocket.onerror = this.onerror.bind(this) as any
|
this.websocket.onerror = this.onerror.bind(this) as any
|
||||||
}
|
}
|
||||||
|
|
||||||
close(code: number = 1000, reason?: string): void {
|
closeGateway(code: number = 1000, reason?: string): void {
|
||||||
this.debug(
|
this.debug(
|
||||||
`Closing with code ${code}${
|
`Closing with code ${code}${
|
||||||
reason !== undefined && reason !== '' ? ` and reason ${reason}` : ''
|
reason !== undefined && reason !== '' ? ` and reason ${reason}` : ''
|
||||||
|
|
2
test/deps.ts
Normal file
2
test/deps.ts
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
export * from 'https://deno.land/std@0.95.0/testing/asserts.ts'
|
||||||
|
export * from 'https://deno.land/std@0.95.0/http/server.ts'
|
|
@ -1,6 +1,6 @@
|
||||||
import { SlashClient } from '../mod.ts'
|
import { SlashClient } from '../mod.ts'
|
||||||
import { SLASH_ID, SLASH_PUB_KEY, SLASH_TOKEN } from './config.ts'
|
import { SLASH_ID, SLASH_PUB_KEY, SLASH_TOKEN } from './config.ts'
|
||||||
import { listenAndServe } from 'https://deno.land/std@0.90.0/http/server.ts'
|
import { listenAndServe } from './deps.ts'
|
||||||
|
|
||||||
const slash = new SlashClient({
|
const slash = new SlashClient({
|
||||||
id: SLASH_ID,
|
id: SLASH_ID,
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { TOKEN } from '../src/test/config.ts'
|
||||||
import {
|
import {
|
||||||
assertEquals,
|
assertEquals,
|
||||||
assertExists
|
assertExists
|
||||||
} from 'https://deno.land/std@0.84.0/testing/asserts.ts'
|
} from './deps.ts'
|
||||||
|
|
||||||
//#region Lib Tests
|
//#region Lib Tests
|
||||||
Deno.test({
|
Deno.test({
|
||||||
|
|
Loading…
Reference in a new issue