@satorijs/adapter-discord 4.3.1 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/bot.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Bot, Context, Fragment, Quester, Schema, Universal } from '@satorijs/satori';
1
+ import { Bot, Context, Fragment, HTTP, Schema, Universal } from '@satorijs/core';
2
2
  import * as Discord from './utils';
3
3
  import { DiscordMessageEncoder } from './message';
4
4
  import { Internal, Webhook } from './types';
@@ -6,7 +6,7 @@ import { WsClient } from './ws';
6
6
  export declare class DiscordBot<C extends Context = Context> extends Bot<C, DiscordBot.Config> {
7
7
  static MessageEncoder: typeof DiscordMessageEncoder;
8
8
  static inject: string[];
9
- http: Quester;
9
+ http: HTTP;
10
10
  internal: Internal;
11
11
  webhooks: Record<string, Webhook>;
12
12
  webhookLock: Record<string, Promise<Webhook>>;
@@ -18,8 +18,9 @@ export declare class DiscordBot<C extends Context = Context> extends Bot<C, Disc
18
18
  deleteMessage(channelId: string, messageId: string): Promise<void>;
19
19
  editMessage(channelId: string, messageId: string, content: Fragment): Promise<void>;
20
20
  getMessage(channelId: string, messageId: string, recursive?: boolean): Promise<Universal.Message>;
21
- getMessageList(channelId: string, before?: string): Promise<{
21
+ getMessageList(channelId: string, messageId?: string, direction?: Universal.Direction, limit?: number, order?: Universal.Order): Promise<{
22
22
  data: Universal.Message[];
23
+ prev: string;
23
24
  next: string;
24
25
  }>;
25
26
  getUser(userId: string): Promise<Universal.User>;
@@ -57,7 +58,7 @@ export declare class DiscordBot<C extends Context = Context> extends Bot<C, Disc
57
58
  updateCommands(commands: Universal.Command[]): Promise<void>;
58
59
  }
59
60
  export declare namespace DiscordBot {
60
- interface Config extends Quester.Config, DiscordMessageEncoder.Config, WsClient.Options {
61
+ interface Config extends HTTP.Config, DiscordMessageEncoder.Config, WsClient.Options {
61
62
  token: string;
62
63
  slash?: boolean;
63
64
  }