@satorijs/adapter-discord 3.5.6 → 3.6.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/message.d.ts CHANGED
@@ -1,16 +1,17 @@
1
- import { Dict, Messenger, Schema, segment } from '@satorijs/satori';
1
+ import { Dict, h, Messenger, Schema } from '@satorijs/satori';
2
2
  import { DiscordBot } from './bot';
3
3
  export declare class DiscordMessenger extends Messenger<DiscordBot> {
4
+ private stack;
4
5
  private buffer;
5
6
  private addition;
6
7
  private figure;
7
8
  private mode;
8
- post(data?: any, headers?: any): Promise<void>;
9
- sendEmbed(attrs: Dict, payload: Dict): Promise<void>;
10
- sendContent(content: string, addition: Dict): Promise<void>;
11
- sendAsset(type: string, attrs: Dict<string>, addition: Dict): Promise<void>;
9
+ post(data?: any, headers?: any): any;
10
+ sendEmbed(attrs: Dict, payload: Dict): Promise<any>;
11
+ sendAsset(type: string, attrs: Dict<string>, addition: Dict): Promise<any>;
12
+ ensureWebhook(): Promise<import("./types").Webhook>;
12
13
  flush(): Promise<void>;
13
- visit(element: segment): Promise<void>;
14
+ visit(element: h): Promise<void>;
14
15
  }
15
16
  export declare namespace DiscordMessenger {
16
17
  type HandleExternalAsset = 'auto' | 'download' | 'direct';
@@ -49,7 +49,7 @@ export interface Application {
49
49
  export interface InstallParams {
50
50
  /** the scopes to add the application to the server with */
51
51
  scopes: string[];
52
- /** the permissions to request for the bot role */
52
+ /** the permissions to request for the bot role */
53
53
  permissions: string;
54
54
  }
55
55
  /** https://discord.com/developers/docs/resources/application#application-object-application-flags */
@@ -158,7 +158,7 @@ export declare namespace Channel {
158
158
  /** the new parent ID for the channel that is moved */
159
159
  parent_id?: snowflake;
160
160
  }
161
- type Modify = Modify.GroupDM | Modify.GuildChannel | Modify.Thread;
161
+ type Modify = Partial<Modify.GroupDM> | Partial<Modify.GuildChannel> | Partial<Modify.Thread>;
162
162
  namespace Modify {
163
163
  /** https://discord.com/developers/docs/resources/channel#modify-channel-json-params-group-dm */
164
164
  interface GroupDM {
package/lib/utils.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Session, Universal } from '@satorijs/satori';
2
2
  import { DiscordBot } from './bot';
3
3
  import * as Discord from './types';
4
+ export declare const sanitize: (val: string) => string;
4
5
  export declare const adaptUser: (user: Discord.User) => Universal.User;
5
6
  export declare const adaptGuild: (data: Discord.Guild) => Universal.Guild;
6
7
  export declare const adaptChannel: (data: Discord.Channel) => Universal.Channel;
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.5.6",
4
+ "version": "3.6.0",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
@@ -29,7 +29,7 @@
29
29
  "satori"
30
30
  ],
31
31
  "peerDependencies": {
32
- "@satorijs/satori": "^2.2.0"
32
+ "@satorijs/satori": "^2.2.3"
33
33
  },
34
34
  "dependencies": {
35
35
  "form-data": "^4.0.0"