@satorijs/adapter-discord 3.4.0 → 3.4.1
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 +3 -3
- package/lib/index.js +4 -4
- package/lib/index.js.map +2 -2
- package/package.json +1 -1
package/lib/bot.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bot, Context, Fragment, Quester, Schema } from '@satorijs/satori';
|
|
1
|
+
import { Bot, Context, Fragment, Quester, Schema, SendOptions } from '@satorijs/satori';
|
|
2
2
|
import { DiscordMessenger } from './message';
|
|
3
3
|
import { Internal } from './types';
|
|
4
4
|
import { WsClient } from './ws';
|
|
@@ -7,8 +7,8 @@ export declare class DiscordBot extends Bot<DiscordBot.Config> {
|
|
|
7
7
|
internal: Internal;
|
|
8
8
|
constructor(ctx: Context, config: DiscordBot.Config);
|
|
9
9
|
getSelf(): Promise<import("@satorijs/core").Universal.User>;
|
|
10
|
-
sendMessage(channelId: string, content: Fragment, guildId?: string): Promise<string[]>;
|
|
11
|
-
sendPrivateMessage(channelId: string, content: Fragment): Promise<string[]>;
|
|
10
|
+
sendMessage(channelId: string, content: Fragment, guildId?: string, options?: SendOptions): Promise<string[]>;
|
|
11
|
+
sendPrivateMessage(channelId: string, content: Fragment, options?: SendOptions): Promise<string[]>;
|
|
12
12
|
deleteMessage(channelId: string, messageId: string): Promise<void>;
|
|
13
13
|
editMessage(channelId: string, messageId: string, content: Fragment): Promise<void>;
|
|
14
14
|
getMessage(channelId: string, messageId: string): Promise<import("@satorijs/core").Universal.Message>;
|
package/lib/index.js
CHANGED
|
@@ -1531,11 +1531,11 @@ var DiscordBot = class extends import_satori4.Bot {
|
|
|
1531
1531
|
const data = await this.internal.getCurrentUser();
|
|
1532
1532
|
return adaptUser(data);
|
|
1533
1533
|
}
|
|
1534
|
-
async sendMessage(channelId, content, guildId) {
|
|
1535
|
-
return new DiscordMessenger(this, channelId, guildId).send(content);
|
|
1534
|
+
async sendMessage(channelId, content, guildId, options) {
|
|
1535
|
+
return new DiscordMessenger(this, channelId, guildId, options).send(content);
|
|
1536
1536
|
}
|
|
1537
|
-
async sendPrivateMessage(channelId, content) {
|
|
1538
|
-
return new DiscordMessenger(this, channelId).send(content);
|
|
1537
|
+
async sendPrivateMessage(channelId, content, options) {
|
|
1538
|
+
return new DiscordMessenger(this, channelId, null, options).send(content);
|
|
1539
1539
|
}
|
|
1540
1540
|
async deleteMessage(channelId, messageId) {
|
|
1541
1541
|
await this.internal.deleteMessage(channelId, messageId);
|