Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@satorijs/adapter-kook

Package Overview
Dependencies
Maintainers
1
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@satorijs/adapter-kook - npm Package Compare versions

Comparing version 3.3.2 to 3.3.3

33

lib/index.js

@@ -26,3 +26,3 @@ var __create = Object.create;

// satori/adapters/kook/src/index.ts
// adapters/kook/src/index.ts
var src_exports = {};

@@ -42,9 +42,9 @@ __export(src_exports, {

// satori/adapters/kook/src/bot.ts
// adapters/kook/src/bot.ts
var import_satori5 = require("@satorijs/satori");
// satori/adapters/kook/src/utils.ts
// adapters/kook/src/utils.ts
var import_satori = require("@satorijs/satori");
// satori/adapters/kook/src/types.ts
// adapters/kook/src/types.ts
var types_exports = {};

@@ -110,3 +110,3 @@ __export(types_exports, {

// satori/adapters/kook/src/utils.ts
// adapters/kook/src/utils.ts
var adaptGroup = /* @__PURE__ */ __name((data) => ({

@@ -232,6 +232,6 @@ guildId: data.id,

// satori/adapters/kook/src/bot.ts
// adapters/kook/src/bot.ts
var import_form_data2 = __toESM(require("form-data"));
// satori/adapters/kook/src/ws.ts
// adapters/kook/src/ws.ts
var import_satori2 = require("@satorijs/satori");

@@ -306,3 +306,3 @@ var import_ws = __toESM(require("ws"));

// satori/adapters/kook/src/http.ts
// adapters/kook/src/http.ts
var import_satori3 = require("@satorijs/satori");

@@ -347,5 +347,4 @@ var logger2 = new import_satori3.Logger("kook");

// satori/adapters/kook/src/sender.ts
// adapters/kook/src/sender.ts
var import_satori4 = require("@satorijs/satori");
var import_fs = require("fs");
var import_form_data = __toESM(require("form-data"));

@@ -386,7 +385,7 @@ var AggregateError = class extends Error {

async transformUrl({ type, data }) {
if (data.url.startsWith("file://") || data.url.startsWith("base64://")) {
if (["file:", "base64:", "data:"].some((protocol) => data.url.startsWith(protocol))) {
const payload = new import_form_data.default();
const content = data.url.startsWith("file://") ? (0, import_fs.createReadStream)(data.url.slice(8)) : Buffer.from(data.url.slice(9), "base64");
payload.append("file", content, {
filename: "file"
const result = await this.bot.ctx.http.file(data.url);
payload.append("file", result.data, {
filename: data.file || result.filename
});

@@ -397,3 +396,3 @@ const { url } = await this.bot.request("POST", "/asset/create", payload, payload.getHeaders());

const res = await this.bot.ctx.http.get(data.url, {
headers: { accept: type },
headers: { accept: type + "/*" },
responseType: "stream"

@@ -538,3 +537,3 @@ });

// satori/adapters/kook/src/bot.ts
// adapters/kook/src/bot.ts
var KookBot = class extends import_satori5.Bot {

@@ -658,3 +657,3 @@ constructor(ctx, config) {

// satori/adapters/kook/src/index.ts
// adapters/kook/src/index.ts
var src_default = KookBot;

@@ -661,0 +660,0 @@ // Annotate the CommonJS export names for ESM import in node:

{
"name": "@satorijs/adapter-kook",
"description": "Kook (Kaiheila) Adapter for Satorijs",
"version": "3.3.2",
"version": "3.3.3",
"main": "lib/index.js",

@@ -29,3 +29,3 @@ "typings": "lib/index.d.ts",

"peerDependencies": {
"@satorijs/satori": "^1.2.0"
"@satorijs/satori": "^1.2.2"
},

@@ -32,0 +32,0 @@ "dependencies": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc