@satorijs/adapter-discord 4.4.0 → 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 +5 -4
- package/lib/index.cjs +2257 -0
- package/lib/index.cjs.map +6 -0
- package/lib/message.d.ts +1 -1
- package/lib/types/internal.d.ts +2 -2
- package/lib/utils.d.ts +1 -1
- package/lib/ws.d.ts +2 -3
- package/package.json +4 -3
- package/src/bot.ts +19 -7
- package/src/message.ts +2 -2
- package/src/types/internal.ts +5 -5
- package/src/utils.ts +1 -1
- package/src/ws.ts +1 -1
package/lib/bot.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bot, Context, Fragment,
|
|
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:
|
|
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,
|
|
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
|
|
61
|
+
interface Config extends HTTP.Config, DiscordMessageEncoder.Config, WsClient.Options {
|
|
61
62
|
token: string;
|
|
62
63
|
slash?: boolean;
|
|
63
64
|
}
|