@songsid/agend-plugin-discord 0.0.5 → 0.0.7

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.
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter } from "node:events";
2
- import type { ChannelAdapter, ApprovalHandle, SendOpts, SentMessage, PermissionPrompt, Choice, AlertData } from "@suzuke/agend/channel";
3
- import type { AccessManager } from "@suzuke/agend/channel/access-manager";
2
+ import type { ChannelAdapter, ApprovalHandle, SendOpts, SentMessage, PermissionPrompt, Choice, AlertData } from "@songsid/agend/channel";
3
+ import type { AccessManager } from "@songsid/agend/channel/access-manager";
4
4
  export interface DiscordAdapterOptions {
5
5
  id: string;
6
6
  botToken: string;
@@ -137,24 +137,6 @@ export class DiscordAdapter extends EventEmitter {
137
137
  size: att.size,
138
138
  filename: att.name ?? undefined,
139
139
  }));
140
- // Collect stickers as photo attachments (skip Lottie format which is JSON)
141
- for (const [, sticker] of msg.stickers) {
142
- if (sticker.format === 3)
143
- continue; // Lottie = not a raster image
144
- const stickerUrl = sticker.url;
145
- if (stickerUrl) {
146
- const stickerId = `sticker-${sticker.id}`;
147
- const ext = sticker.format === 4 ? "gif" : "png";
148
- attachments.push({
149
- kind: "photo",
150
- fileId: stickerId,
151
- mime: `image/${ext}`,
152
- size: 0,
153
- filename: `${sticker.name}.${ext}`,
154
- });
155
- this.attachmentUrls.set(stickerId, stickerUrl);
156
- }
157
- }
158
140
  // Store attachment URLs for later download
159
141
  for (const att of msg.attachments.values()) {
160
142
  this.attachmentUrls.set(att.id, att.url);
package/dist/index.d.ts CHANGED
@@ -7,9 +7,9 @@
7
7
  * channel:
8
8
  * type: discord
9
9
  */
10
- import type { ChannelAdapter } from "@suzuke/agend/channel";
11
- import type { ChannelConfig } from "@suzuke/agend/types";
12
- import type { AccessManager } from "@suzuke/agend/channel/access-manager";
10
+ import type { ChannelAdapter } from "@songsid/agend/channel";
11
+ import type { ChannelConfig } from "@songsid/agend/types";
12
+ import type { AccessManager } from "@songsid/agend/channel/access-manager";
13
13
  interface AdapterOpts {
14
14
  id: string;
15
15
  botToken: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@songsid/agend-plugin-discord",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "Discord channel adapter plugin for AgEnD",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -9,7 +9,7 @@
9
9
  "build": "tsc"
10
10
  },
11
11
  "peerDependencies": {
12
- "@songsid/agend": ">=1.13.0"
12
+ "@songsid/agend": ">=0.0.1"
13
13
  },
14
14
  "dependencies": {
15
15
  "discord.js": "^14.25.1"
@@ -173,24 +173,6 @@ export class DiscordAdapter extends EventEmitter implements ChannelAdapter {
173
173
  filename: att.name ?? undefined,
174
174
  }));
175
175
 
176
- // Collect stickers as photo attachments (skip Lottie format which is JSON)
177
- for (const [, sticker] of msg.stickers) {
178
- if (sticker.format === 3) continue; // Lottie = not a raster image
179
- const stickerUrl = sticker.url;
180
- if (stickerUrl) {
181
- const stickerId = `sticker-${sticker.id}`;
182
- const ext = sticker.format === 4 ? "gif" : "png";
183
- attachments.push({
184
- kind: "photo" as const,
185
- fileId: stickerId,
186
- mime: `image/${ext}`,
187
- size: 0,
188
- filename: `${sticker.name}.${ext}`,
189
- });
190
- this.attachmentUrls.set(stickerId, stickerUrl);
191
- }
192
- }
193
-
194
176
  // Store attachment URLs for later download
195
177
  for (const att of msg.attachments.values()) {
196
178
  this.attachmentUrls.set(att.id, att.url);