@satorijs/adapter-discord 3.2.0 → 3.2.2
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 -4
- package/lib/index.js +59 -54
- package/lib/index.js.map +3 -3
- package/lib/sender.d.ts +7 -4
- package/lib/types/internal.d.ts +1 -3
- package/package.json +2 -2
package/lib/sender.d.ts
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import { Dict, Schema } from '@satorijs/satori';
|
|
1
|
+
import { Dict, Schema, segment } from '@satorijs/satori';
|
|
2
2
|
import { DiscordBot } from './bot';
|
|
3
3
|
export declare class Sender {
|
|
4
4
|
private bot;
|
|
5
5
|
private url;
|
|
6
6
|
private results;
|
|
7
7
|
private errors;
|
|
8
|
-
private
|
|
9
|
-
|
|
8
|
+
private buffer;
|
|
9
|
+
private addition;
|
|
10
|
+
constructor(bot: DiscordBot, url: string);
|
|
10
11
|
post(data?: any, headers?: any): Promise<void>;
|
|
11
12
|
sendEmbed(fileBuffer: ArrayBuffer, payload_json: Dict, filename: string): Promise<void>;
|
|
12
13
|
sendContent(content: string, addition: Dict): Promise<void>;
|
|
13
14
|
sendAsset(type: string, data: Dict<string>, addition: Dict): Promise<void>;
|
|
14
|
-
|
|
15
|
+
sendBuffer(): Promise<void>;
|
|
16
|
+
sendMessage(elements: segment[]): Promise<void>;
|
|
17
|
+
send(content: string): Promise<string[]>;
|
|
15
18
|
}
|
|
16
19
|
export declare namespace Sender {
|
|
17
20
|
type HandleExternalAsset = 'auto' | 'download' | 'direct';
|
package/lib/types/internal.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Dict } from 'cosmokit';
|
|
2
2
|
import { Quester } from '@satorijs/satori';
|
|
3
|
-
declare type Method = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
4
3
|
export declare class Internal {
|
|
5
4
|
private http;
|
|
6
5
|
constructor(http: Quester);
|
|
7
|
-
static define(routes: Dict<Partial<Record<Method, string | string[]>>>): void;
|
|
6
|
+
static define(routes: Dict<Partial<Record<Quester.Method, string | string[]>>>): void;
|
|
8
7
|
}
|
|
9
|
-
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@satorijs/adapter-discord",
|
|
3
3
|
"description": "Discord Adapter for Satorijs",
|
|
4
|
-
"version": "3.2.
|
|
4
|
+
"version": "3.2.2",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@types/es-aggregate-error": "^1.0.2"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@satorijs/satori": "^1.1.
|
|
35
|
+
"@satorijs/satori": "^1.1.10"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"es-aggregate-error": "^1.0.8",
|