mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-03 05:26:07 +00:00
fix: session can't runs without intents (#107)
This commit is contained in:
parent
6915258093
commit
f522cbbd5a
@ -37,7 +37,7 @@ import type { RestAdapter } from '@biscuitland/rest';
|
|||||||
import { DefaultRestAdapter } from '@biscuitland/rest';
|
import { DefaultRestAdapter } from '@biscuitland/rest';
|
||||||
|
|
||||||
import type { Shard } from '@biscuitland/ws';
|
import type { Shard } from '@biscuitland/ws';
|
||||||
import { ShardManager } from '@biscuitland/ws';
|
import { ShardManager, Options as mergeOptions } from '@biscuitland/ws';
|
||||||
|
|
||||||
import type { EventAdapter } from './adapters/event-adapter';
|
import type { EventAdapter } from './adapters/event-adapter';
|
||||||
import { DefaultEventAdapter } from './adapters/default-event-adapter';
|
import { DefaultEventAdapter } from './adapters/default-event-adapter';
|
||||||
@ -174,6 +174,7 @@ export class Session {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static readonly DEFAULTS = {
|
static readonly DEFAULTS = {
|
||||||
|
intents: 0,
|
||||||
rest: {
|
rest: {
|
||||||
adapter: DefaultRestAdapter,
|
adapter: DefaultRestAdapter,
|
||||||
options: null,
|
options: null,
|
||||||
@ -194,7 +195,7 @@ export class Session {
|
|||||||
private adapters = new Map<string, any>();
|
private adapters = new Map<string, any>();
|
||||||
|
|
||||||
constructor(options: PickOptions) {
|
constructor(options: PickOptions) {
|
||||||
this.options = Object.assign(options, Session.DEFAULTS);
|
this.options = mergeOptions(Session.DEFAULTS, options);
|
||||||
|
|
||||||
// makeRest
|
// makeRest
|
||||||
|
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
export { ShardManager } from './services/shard-manager';
|
export { ShardManager } from './services/shard-manager';
|
||||||
export { Shard } from './services/shard';
|
export { Shard } from './services/shard';
|
||||||
|
export { Options } from './utils/options';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user