Update SnowTransfer and use its new method

This commit is contained in:
Cadence Ember 2025-03-10 12:13:13 +13:00
parent adbd2bbf60
commit 960eca3b39
4 changed files with 7 additions and 20 deletions

View file

@ -96,7 +96,7 @@ Total transitive production dependencies: 137
* (31) better-sqlite3: SQLite3 is the best database, and this is the best library for it.
* (27) @cloudrac3r/pug: Language for dynamic web pages. This is my fork. (I released code that hadn't made it to npm, and removed the heavy pug-filters feature.)
* (16) stream-mime-type@1: This seems like the best option. Version 1 is used because version 2 is ESM-only.
* (9) h3: Web server. OOYE needs this for the appservice listener, authmedia proxy, and more. 14 transitive dependencies is on the low end for a web server.
* (9) h3: Web server. OOYE needs this for the appservice listener, authmedia proxy, self-service, and more.
* (11) sharp: Image resizing and compositing. OOYE needs this for the emoji sprite sheets.
### <font size="-1">🪱</font>

21
package-lock.json generated
View file

@ -36,7 +36,7 @@
"minimist": "^1.2.8",
"prettier-bytes": "^1.0.4",
"sharp": "^0.33.4",
"snowtransfer": "^0.12.0",
"snowtransfer": "^0.13.1",
"stream-mime-type": "^1.0.2",
"try-to-catch": "^3.0.1",
"uqr": "^0.1.2",
@ -1424,18 +1424,6 @@
"node": ">=16.15.0"
}
},
"node_modules/cloudstorm/node_modules/snowtransfer": {
"version": "0.13.1",
"resolved": "https://registry.npmjs.org/snowtransfer/-/snowtransfer-0.13.1.tgz",
"integrity": "sha512-EMrvqCk0JVcpJILTV9JEvUi3VyC5kohcza9d9l034B+cXwLbOWKFhzKULBPe/VqTdx+aqFpdYCdb1/HDrRiZ1Q==",
"license": "MIT",
"dependencies": {
"discord-api-types": "^0.37.119"
},
"engines": {
"node": ">=16.15.0"
}
},
"node_modules/color": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
@ -2688,10 +2676,9 @@
}
},
"node_modules/snowtransfer": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/snowtransfer/-/snowtransfer-0.12.0.tgz",
"integrity": "sha512-EmVTAeSXtA7ZlTqwmZxe5JwRTm4FOXEOqMOzGu8fdVSoqXjcWgQ8IfaIRu/54FamOMjOmcxnpTyNPj5MUqWxpA==",
"license": "MIT",
"version": "0.13.1",
"resolved": "https://registry.npmjs.org/snowtransfer/-/snowtransfer-0.13.1.tgz",
"integrity": "sha512-EMrvqCk0JVcpJILTV9JEvUi3VyC5kohcza9d9l034B+cXwLbOWKFhzKULBPe/VqTdx+aqFpdYCdb1/HDrRiZ1Q==",
"dependencies": {
"discord-api-types": "^0.37.119"
},

View file

@ -45,7 +45,7 @@
"minimist": "^1.2.8",
"prettier-bytes": "^1.0.4",
"sharp": "^0.33.4",
"snowtransfer": "^0.12.0",
"snowtransfer": "^0.13.1",
"stream-mime-type": "^1.0.2",
"try-to-catch": "^3.0.1",
"uqr": "^0.1.2",

View file

@ -382,7 +382,7 @@ function defineEchoHandler() {
// set profile data on discord...
const avatarImageBuffer = await fetch("https://cadence.moe/friends/out_of_your_element.png").then(res => res.arrayBuffer())
await discord.snow.user.updateSelf({avatar: "data:image/png;base64," + Buffer.from(avatarImageBuffer).toString("base64")})
await discord.snow.requestHandler.request(`/applications/@me`, {}, "patch", "json", {description: "Powered by **Out Of Your Element**\nhttps://gitdab.com/cadence/out-of-your-element"})
await discord.snow.bot.updateApplicationInfo({description: "Powered by **Out Of Your Element**\nhttps://gitdab.com/cadence/out-of-your-element"})
console.log("✅ Discord profile updated...")
// set profile data on homeserver...