mirror of
https://github.com/litruv/DAdmin.git
synced 2026-07-24 02:36:11 +10:00
stringify message with flatted
This commit is contained in:
5
package-lock.json
generated
5
package-lock.json
generated
@@ -516,6 +516,11 @@
|
|||||||
"escape-string-regexp": "^1.0.5"
|
"escape-string-regexp": "^1.0.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"flatted": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg=="
|
||||||
|
},
|
||||||
"fluent-ffmpeg": {
|
"fluent-ffmpeg": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/fluent-ffmpeg/-/fluent-ffmpeg-2.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/fluent-ffmpeg/-/fluent-ffmpeg-2.1.2.tgz",
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
"@google-cloud/vision": "^0.25.0",
|
"@google-cloud/vision": "^0.25.0",
|
||||||
"colors": "^1.3.3",
|
"colors": "^1.3.3",
|
||||||
"discord.js": "^11.4.2",
|
"discord.js": "^11.4.2",
|
||||||
|
"flatted": "^2.0.0",
|
||||||
"fluent-ffmpeg": "^2.1.2",
|
"fluent-ffmpeg": "^2.1.2",
|
||||||
"inquirer": "^6.2.2",
|
"inquirer": "^6.2.2",
|
||||||
"mysql": "^2.16.0",
|
"mysql": "^2.16.0",
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const https = require('https');
|
const https = require('https');
|
||||||
const WebSocket = require('ws');
|
const WebSocket = require('ws');
|
||||||
|
const { parse, stringify } = require('flatted/cjs');
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: "Websockets Server (8080)",
|
name: "Websockets Server (8080)",
|
||||||
@@ -42,7 +41,7 @@ module.exports = {
|
|||||||
}))
|
}))
|
||||||
|
|
||||||
dclient.on('message', (message) => {
|
dclient.on('message', (message) => {
|
||||||
ws.send(message.cleanContent)
|
ws.send(stringify(message))
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user