Compare commits
No commits in common. "main" and "websocket" have entirely different histories.
65
client.js
Normal file
65
client.js
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
import readline from 'node:readline/promises'
|
||||||
|
import { stdin, stdout } from 'node:process'
|
||||||
|
import WebSocket from 'ws'
|
||||||
|
import { error } from 'node:console'
|
||||||
|
|
||||||
|
let lastMessage = ''
|
||||||
|
|
||||||
|
const writePrompt = () => {
|
||||||
|
stdout.write('> ')
|
||||||
|
if(lastMessage)
|
||||||
|
cli.write(lastMessage)
|
||||||
|
}
|
||||||
|
|
||||||
|
const send = object => new Promise((resolve, reject) => {
|
||||||
|
ws.send(JSON.stringify(object), error => {
|
||||||
|
if(error)
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
const handleMessage = async content => {
|
||||||
|
lastMessage = content
|
||||||
|
|
||||||
|
send({
|
||||||
|
type: "message",
|
||||||
|
content: content
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.log(error)
|
||||||
|
writePrompt()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const printMessage = messageBuf => {
|
||||||
|
let indent = ' '.repeat(2)
|
||||||
|
let message = messageBuf.toString('utf-8')
|
||||||
|
|
||||||
|
message = indent + message.replaceAll('\n', '\n' + indent) + '\n'
|
||||||
|
stdout.write(message)
|
||||||
|
writePrompt()
|
||||||
|
}
|
||||||
|
|
||||||
|
const start = () => {
|
||||||
|
send({
|
||||||
|
type: 'login',
|
||||||
|
name: 'dev',
|
||||||
|
password: 'dev'
|
||||||
|
})
|
||||||
|
cli.on('line', handleMessage)
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Hooks
|
||||||
|
//
|
||||||
|
|
||||||
|
const ws = new WebSocket('ws://localhost:8080')
|
||||||
|
|
||||||
|
const cli = readline.createInterface({
|
||||||
|
input: stdin,
|
||||||
|
output: stdout
|
||||||
|
})
|
||||||
|
|
||||||
|
ws.on('error', console.error)
|
||||||
|
ws.on('open', start)
|
||||||
|
ws.on('message', printMessage)
|
626
package-lock.json
generated
626
package-lock.json
generated
@ -1,626 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "dicedicedice",
|
|
||||||
"version": "1.4.0",
|
|
||||||
"lockfileVersion": 3,
|
|
||||||
"requires": true,
|
|
||||||
"packages": {
|
|
||||||
"": {
|
|
||||||
"name": "dicedicedice",
|
|
||||||
"version": "1.4.0",
|
|
||||||
"license": "GPL-3.0",
|
|
||||||
"dependencies": {
|
|
||||||
"classic-level": "^1.3.0",
|
|
||||||
"discord.js": "^14.11.0",
|
|
||||||
"dotenv": "^16.0.3"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@discordjs/builders": {
|
|
||||||
"version": "1.6.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.6.3.tgz",
|
|
||||||
"integrity": "sha512-CTCh8NqED3iecTNuiz49mwSsrc2iQb4d0MjMdmS/8pb69Y4IlzJ/DIy/p5GFlgOrFbNO2WzMHkWKQSiJ3VNXaw==",
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"dependencies": {
|
|
||||||
"@discordjs/formatters": "^0.3.1",
|
|
||||||
"@discordjs/util": "^0.3.1",
|
|
||||||
"@sapphire/shapeshift": "^3.8.2",
|
|
||||||
"discord-api-types": "^0.37.41",
|
|
||||||
"fast-deep-equal": "^3.1.3",
|
|
||||||
"ts-mixer": "^6.0.3",
|
|
||||||
"tslib": "^2.5.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16.9.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@discordjs/collection": {
|
|
||||||
"version": "1.5.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.1.tgz",
|
|
||||||
"integrity": "sha512-aWEc9DCf3TMDe9iaJoOnO2+JVAjeRNuRxPZQA6GVvBf+Z3gqUuWYBy2NWh4+5CLYq5uoc3MOvUQ5H5m8CJBqOA==",
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16.9.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@discordjs/formatters": {
|
|
||||||
"version": "0.3.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.3.1.tgz",
|
|
||||||
"integrity": "sha512-M7X4IGiSeh4znwcRGcs+49B5tBkNDn4k5bmhxJDAUhRxRHTiFAOTVUNQ6yAKySu5jZTnCbSvTYHW3w0rAzV1MA==",
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"dependencies": {
|
|
||||||
"discord-api-types": "^0.37.41"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16.9.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@discordjs/rest": {
|
|
||||||
"version": "1.7.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.7.1.tgz",
|
|
||||||
"integrity": "sha512-Ofa9UqT0U45G/eX86cURQnX7gzOJLG2oC28VhIk/G6IliYgQF7jFByBJEykPSHE4MxPhqCleYvmsrtfKh1nYmQ==",
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"dependencies": {
|
|
||||||
"@discordjs/collection": "^1.5.1",
|
|
||||||
"@discordjs/util": "^0.3.0",
|
|
||||||
"@sapphire/async-queue": "^1.5.0",
|
|
||||||
"@sapphire/snowflake": "^3.4.2",
|
|
||||||
"discord-api-types": "^0.37.41",
|
|
||||||
"file-type": "^18.3.0",
|
|
||||||
"tslib": "^2.5.0",
|
|
||||||
"undici": "^5.22.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16.9.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@discordjs/util": {
|
|
||||||
"version": "0.3.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@discordjs/util/-/util-0.3.1.tgz",
|
|
||||||
"integrity": "sha512-HxXKYKg7vohx2/OupUN/4Sd02Ev3PBJ5q0gtjdcvXb0ErCva8jNHWfe/v5sU3UKjIB/uxOhc+TDOnhqffj9pRA==",
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16.9.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@discordjs/ws": {
|
|
||||||
"version": "0.8.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-0.8.3.tgz",
|
|
||||||
"integrity": "sha512-hcYtppanjHecbdNyCKQNH2I4RP9UrphDgmRgLYrATEQF1oo4sYSve7ZmGsBEXSzH72MO2tBPdWSThunbxUVk0g==",
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"dependencies": {
|
|
||||||
"@discordjs/collection": "^1.5.1",
|
|
||||||
"@discordjs/rest": "^1.7.1",
|
|
||||||
"@discordjs/util": "^0.3.1",
|
|
||||||
"@sapphire/async-queue": "^1.5.0",
|
|
||||||
"@types/ws": "^8.5.4",
|
|
||||||
"@vladfrangu/async_event_emitter": "^2.2.1",
|
|
||||||
"discord-api-types": "^0.37.41",
|
|
||||||
"tslib": "^2.5.0",
|
|
||||||
"ws": "^8.13.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16.9.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@sapphire/async-queue": {
|
|
||||||
"version": "1.5.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz",
|
|
||||||
"integrity": "sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=v14.0.0",
|
|
||||||
"npm": ">=7.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@sapphire/shapeshift": {
|
|
||||||
"version": "3.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.0.tgz",
|
|
||||||
"integrity": "sha512-iJpHmjAdwX9aSL6MvFpVyo+tkokDtInmSjoJHbz/k4VJfnim3DjvG0hgGEKWtWZgCu45RaLgcoNgR1fCPdIz3w==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"fast-deep-equal": "^3.1.3",
|
|
||||||
"lodash": "^4.17.21"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=v14.0.0",
|
|
||||||
"npm": ">=7.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@sapphire/snowflake": {
|
|
||||||
"version": "3.5.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.1.tgz",
|
|
||||||
"integrity": "sha512-BxcYGzgEsdlG0dKAyOm0ehLGm2CafIrfQTZGWgkfKYbj+pNNsorZ7EotuZukc2MT70E0UbppVbtpBrqpzVzjNA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=v14.0.0",
|
|
||||||
"npm": ">=7.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@tokenizer/token": {
|
|
||||||
"version": "0.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz",
|
|
||||||
"integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@types/node": {
|
|
||||||
"version": "20.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.1.tgz",
|
|
||||||
"integrity": "sha512-DqJociPbZP1lbZ5SQPk4oag6W7AyaGMO6gSfRwq3PWl4PXTwJpRQJhDq4W0kzrg3w6tJ1SwlvGZ5uKFHY13LIg==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/@types/ws": {
|
|
||||||
"version": "8.5.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz",
|
|
||||||
"integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@types/node": "*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@vladfrangu/async_event_emitter": {
|
|
||||||
"version": "2.2.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.2.2.tgz",
|
|
||||||
"integrity": "sha512-HIzRG7sy88UZjBJamssEczH5q7t5+axva19UbZLO6u0ySbYPrwzWiXBcC0WuHyhKKoeCyneH+FvYzKQq/zTtkQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=v14.0.0",
|
|
||||||
"npm": ">=7.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/abstract-level": {
|
|
||||||
"version": "1.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz",
|
|
||||||
"integrity": "sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"buffer": "^6.0.3",
|
|
||||||
"catering": "^2.1.0",
|
|
||||||
"is-buffer": "^2.0.5",
|
|
||||||
"level-supports": "^4.0.0",
|
|
||||||
"level-transcoder": "^1.0.1",
|
|
||||||
"module-error": "^1.0.1",
|
|
||||||
"queue-microtask": "^1.2.3"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/base64-js": {
|
|
||||||
"version": "1.5.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
|
|
||||||
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
|
|
||||||
"funding": [
|
|
||||||
{
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/feross"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "patreon",
|
|
||||||
"url": "https://www.patreon.com/feross"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "consulting",
|
|
||||||
"url": "https://feross.org/support"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/buffer": {
|
|
||||||
"version": "6.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
|
|
||||||
"integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
|
|
||||||
"funding": [
|
|
||||||
{
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/feross"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "patreon",
|
|
||||||
"url": "https://www.patreon.com/feross"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "consulting",
|
|
||||||
"url": "https://feross.org/support"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"base64-js": "^1.3.1",
|
|
||||||
"ieee754": "^1.2.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/busboy": {
|
|
||||||
"version": "1.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
|
|
||||||
"integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
|
|
||||||
"dependencies": {
|
|
||||||
"streamsearch": "^1.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10.16.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/catering": {
|
|
||||||
"version": "2.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/catering/-/catering-2.1.1.tgz",
|
|
||||||
"integrity": "sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/classic-level": {
|
|
||||||
"version": "1.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/classic-level/-/classic-level-1.3.0.tgz",
|
|
||||||
"integrity": "sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==",
|
|
||||||
"hasInstallScript": true,
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"abstract-level": "^1.0.2",
|
|
||||||
"catering": "^2.1.0",
|
|
||||||
"module-error": "^1.0.1",
|
|
||||||
"napi-macros": "^2.2.2",
|
|
||||||
"node-gyp-build": "^4.3.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/discord-api-types": {
|
|
||||||
"version": "0.37.42",
|
|
||||||
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.42.tgz",
|
|
||||||
"integrity": "sha512-1Huaj9cQ1W7/uryS8MZs/tZemnoKB94thM1cE40lep3rpU3q7WHqkdjN/veX0prTkYlPhcyLd/DeF/pBO8X8oQ==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/discord.js": {
|
|
||||||
"version": "14.11.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.11.0.tgz",
|
|
||||||
"integrity": "sha512-CkueWYFQ28U38YPR8HgsBR/QT35oPpMbEsTNM30Fs8loBIhnA4s70AwQEoy6JvLcpWWJO7GY0y2BUzZmuBMepQ==",
|
|
||||||
"license": "Apache-2.0",
|
|
||||||
"dependencies": {
|
|
||||||
"@discordjs/builders": "^1.6.3",
|
|
||||||
"@discordjs/collection": "^1.5.1",
|
|
||||||
"@discordjs/formatters": "^0.3.1",
|
|
||||||
"@discordjs/rest": "^1.7.1",
|
|
||||||
"@discordjs/util": "^0.3.1",
|
|
||||||
"@discordjs/ws": "^0.8.3",
|
|
||||||
"@sapphire/snowflake": "^3.4.2",
|
|
||||||
"@types/ws": "^8.5.4",
|
|
||||||
"discord-api-types": "^0.37.41",
|
|
||||||
"fast-deep-equal": "^3.1.3",
|
|
||||||
"lodash.snakecase": "^4.1.1",
|
|
||||||
"tslib": "^2.5.0",
|
|
||||||
"undici": "^5.22.0",
|
|
||||||
"ws": "^8.13.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=16.9.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/dotenv": {
|
|
||||||
"version": "16.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz",
|
|
||||||
"integrity": "sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==",
|
|
||||||
"license": "BSD-2-Clause",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/fast-deep-equal": {
|
|
||||||
"version": "3.1.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
|
||||||
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/file-type": {
|
|
||||||
"version": "18.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/file-type/-/file-type-18.4.0.tgz",
|
|
||||||
"integrity": "sha512-o6MQrZKTAK6WpvmQk3jqTVUmqxYBxW5bloUfrdH1ZnRFDvvAPNr+l+rgOxM3nkqWT+3khaj3FRMDydWe0xhu+w==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"readable-web-to-node-stream": "^3.0.2",
|
|
||||||
"strtok3": "^7.0.0",
|
|
||||||
"token-types": "^5.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14.16"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/sindresorhus/file-type?sponsor=1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/ieee754": {
|
|
||||||
"version": "1.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
|
|
||||||
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
|
|
||||||
"funding": [
|
|
||||||
{
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/feross"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "patreon",
|
|
||||||
"url": "https://www.patreon.com/feross"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "consulting",
|
|
||||||
"url": "https://feross.org/support"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"license": "BSD-3-Clause"
|
|
||||||
},
|
|
||||||
"node_modules/inherits": {
|
|
||||||
"version": "2.0.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
|
||||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
|
||||||
"license": "ISC"
|
|
||||||
},
|
|
||||||
"node_modules/is-buffer": {
|
|
||||||
"version": "2.0.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz",
|
|
||||||
"integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==",
|
|
||||||
"funding": [
|
|
||||||
{
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/feross"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "patreon",
|
|
||||||
"url": "https://www.patreon.com/feross"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "consulting",
|
|
||||||
"url": "https://feross.org/support"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/level-supports": {
|
|
||||||
"version": "4.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/level-supports/-/level-supports-4.0.1.tgz",
|
|
||||||
"integrity": "sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/level-transcoder": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz",
|
|
||||||
"integrity": "sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"buffer": "^6.0.3",
|
|
||||||
"module-error": "^1.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=12"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/lodash": {
|
|
||||||
"version": "4.17.21",
|
|
||||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
|
||||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/lodash.snakecase": {
|
|
||||||
"version": "4.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz",
|
|
||||||
"integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/module-error": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz",
|
|
||||||
"integrity": "sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/napi-macros": {
|
|
||||||
"version": "2.2.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.2.2.tgz",
|
|
||||||
"integrity": "sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/node-gyp-build": {
|
|
||||||
"version": "4.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz",
|
|
||||||
"integrity": "sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"bin": {
|
|
||||||
"node-gyp-build": "bin.js",
|
|
||||||
"node-gyp-build-optional": "optional.js",
|
|
||||||
"node-gyp-build-test": "build-test.js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/peek-readable": {
|
|
||||||
"version": "5.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz",
|
|
||||||
"integrity": "sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14.16"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/Borewit"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/queue-microtask": {
|
|
||||||
"version": "1.2.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
|
|
||||||
"integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
|
|
||||||
"funding": [
|
|
||||||
{
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/feross"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "patreon",
|
|
||||||
"url": "https://www.patreon.com/feross"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "consulting",
|
|
||||||
"url": "https://feross.org/support"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/readable-stream": {
|
|
||||||
"version": "3.6.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
|
|
||||||
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"inherits": "^2.0.3",
|
|
||||||
"string_decoder": "^1.1.1",
|
|
||||||
"util-deprecate": "^1.0.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 6"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/readable-web-to-node-stream": {
|
|
||||||
"version": "3.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz",
|
|
||||||
"integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"readable-stream": "^3.6.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/Borewit"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/safe-buffer": {
|
|
||||||
"version": "5.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
|
||||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
|
||||||
"funding": [
|
|
||||||
{
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/feross"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "patreon",
|
|
||||||
"url": "https://www.patreon.com/feross"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "consulting",
|
|
||||||
"url": "https://feross.org/support"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/streamsearch": {
|
|
||||||
"version": "1.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
|
|
||||||
"integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/string_decoder": {
|
|
||||||
"version": "1.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
|
||||||
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"safe-buffer": "~5.2.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/strtok3": {
|
|
||||||
"version": "7.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz",
|
|
||||||
"integrity": "sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@tokenizer/token": "^0.3.0",
|
|
||||||
"peek-readable": "^5.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14.16"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/Borewit"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/token-types": {
|
|
||||||
"version": "5.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz",
|
|
||||||
"integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"@tokenizer/token": "^0.3.0",
|
|
||||||
"ieee754": "^1.2.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14.16"
|
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"type": "github",
|
|
||||||
"url": "https://github.com/sponsors/Borewit"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/ts-mixer": {
|
|
||||||
"version": "6.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz",
|
|
||||||
"integrity": "sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/tslib": {
|
|
||||||
"version": "2.5.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.2.tgz",
|
|
||||||
"integrity": "sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA==",
|
|
||||||
"license": "0BSD"
|
|
||||||
},
|
|
||||||
"node_modules/undici": {
|
|
||||||
"version": "5.22.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.22.1.tgz",
|
|
||||||
"integrity": "sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==",
|
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
|
||||||
"busboy": "^1.6.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=14.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/util-deprecate": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
|
||||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
|
|
||||||
"license": "MIT"
|
|
||||||
},
|
|
||||||
"node_modules/ws": {
|
|
||||||
"version": "8.13.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz",
|
|
||||||
"integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==",
|
|
||||||
"license": "MIT",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10.0.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"bufferutil": "^4.0.1",
|
|
||||||
"utf-8-validate": ">=5.0.2"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"bufferutil": {
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"utf-8-validate": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -21,6 +21,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"classic-level": "^1.3.0",
|
"classic-level": "^1.3.0",
|
||||||
"discord.js": "^14.11.0",
|
"discord.js": "^14.11.0",
|
||||||
"dotenv": "^16.0.3"
|
"dotenv": "^16.0.3",
|
||||||
|
"ws": "^8.13.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,44 @@
|
|||||||
export default {
|
const constants = {
|
||||||
rollRegex: /^(\d+)?([dhlfb])(\d+)(\s*([+\-*x\/])\s*(\d+))?/,
|
rollRegex: /^(\d+)?([dhlfb])(\d+)(\s*([+\-*x\/])\s*(\d+))?/,
|
||||||
optionRollRegex: /^(\d+)?(([dhlfb])(\d+))?(\s*([+\-*x\/])\s*(\d+))?/,
|
optionRollRegex: /^(\d+)?(([dhlfb])(\d+))?(\s*([+\-*x\/])\s*(\d+))?/,
|
||||||
descriptionRegex: /\s*((\d*-\d*)|(\d+))?([^;\n]+)/g,
|
descriptionRegex: /\s*((\d*-\d*)|(\d+))?([^;\n]+)/g,
|
||||||
macroNameRegex: /^[a-z0-9]+$/,
|
macroNameRegex: /^[a-z0-9]+$/,
|
||||||
|
|
||||||
|
events: {
|
||||||
|
login: 'login'
|
||||||
|
},
|
||||||
|
|
||||||
|
schemas: {
|
||||||
|
events: {
|
||||||
|
login: {
|
||||||
|
'name': 'string',
|
||||||
|
'password': 'string'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
errors: {
|
||||||
|
invalidPacket: error => ({
|
||||||
|
type: 'error',
|
||||||
|
id: 0,
|
||||||
|
message: 'Invalid packet: ' + error
|
||||||
|
}),
|
||||||
|
invalidReference: error => ({
|
||||||
|
type: 'error',
|
||||||
|
id: 0,
|
||||||
|
message: 'Invalid packet reference: ' + error
|
||||||
|
}),
|
||||||
|
badLogin: () => ({
|
||||||
|
type: 'error',
|
||||||
|
id: 10,
|
||||||
|
message: 'There is no client with that name, or the password does not match.'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
clients: new Map([
|
||||||
|
[ 'dev', 'dev' ]
|
||||||
|
]),
|
||||||
|
|
||||||
commands: {
|
commands: {
|
||||||
about: {
|
about: {
|
||||||
name: 'about',
|
name: 'about',
|
||||||
@ -13,7 +48,6 @@ export default {
|
|||||||
macro: {
|
macro: {
|
||||||
name: 'macro',
|
name: 'macro',
|
||||||
description: "Manage macros",
|
description: "Manage macros",
|
||||||
'dm_permission': false,
|
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
name: 'add',
|
name: 'add',
|
||||||
@ -43,13 +77,7 @@ export default {
|
|||||||
name: "name",
|
name: "name",
|
||||||
description: "Name of the macro",
|
description: "Name of the macro",
|
||||||
type: 3, // String
|
type: 3, // String
|
||||||
required: true,
|
required: true
|
||||||
autocomplete: true,
|
|
||||||
getAutocomplete: interaction => {
|
|
||||||
let macros = globalThis.macroCache.get(interaction.guild.id)
|
|
||||||
|
|
||||||
return macros ? Object.keys(macros) : []
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -59,6 +87,7 @@ export default {
|
|||||||
|
|
||||||
iconUrl: 'https://github.com/Dakedres/dicedicedice/raw/main/assets/eater-transparent.png',
|
iconUrl: 'https://github.com/Dakedres/dicedicedice/raw/main/assets/eater-transparent.png',
|
||||||
|
|
||||||
|
|
||||||
errorMessage: error => `\
|
errorMessage: error => `\
|
||||||
Something went wrong trying to execute that command.
|
Something went wrong trying to execute that command.
|
||||||
\`\`\`fix
|
\`\`\`fix
|
||||||
@ -73,3 +102,5 @@ A discord bot for metaphorically "rolling dice"/generating random values. Made f
|
|||||||
Present in ~${guildCount} guilds!
|
Present in ~${guildCount} guilds!
|
||||||
`
|
`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default constants
|
513
src/index.js
513
src/index.js
@ -1,56 +1,109 @@
|
|||||||
import { Client, GatewayIntentBits, Partials, REST, Routes } from 'discord.js';
|
import constants from './constants.js'
|
||||||
import * as dotenv from 'dotenv'
|
import { WebSocketServer } from 'ws'
|
||||||
import constants from './constants.js';
|
import { EventEmitter } from 'node:events'
|
||||||
import { ClassicLevel } from 'classic-level';
|
|
||||||
|
|
||||||
dotenv.config()
|
let connections = new Map()
|
||||||
|
|
||||||
globalThis.commands = new Map()
|
//
|
||||||
globalThis.replies = new Map()
|
// Login & events
|
||||||
globalThis.macroCache = new Map()
|
//
|
||||||
const db = new ClassicLevel('./db')
|
|
||||||
|
|
||||||
const client = new Client({
|
const handleConnection = ws => {
|
||||||
intents: [
|
let client
|
||||||
GatewayIntentBits.Guilds,
|
|
||||||
GatewayIntentBits.GuildMessages,
|
|
||||||
GatewayIntentBits.MessageContent,
|
|
||||||
GatewayIntentBits.DirectMessages
|
|
||||||
],
|
|
||||||
partials: [
|
|
||||||
Partials.Channel
|
|
||||||
]
|
|
||||||
})
|
|
||||||
const rest = new REST().setToken(process.env.DISCORD_TOKEN)
|
|
||||||
|
|
||||||
const ParseRollInt = (value, defaultValue) =>
|
ws.on('error', console.error)
|
||||||
value ? parseInt(value) : defaultValue
|
|
||||||
|
|
||||||
const ParseOptionRoll = expression => {
|
ws.on('message', data => {
|
||||||
let match = constants.optionRollRegex.exec(expression.trim())
|
let event
|
||||||
|
|
||||||
let [
|
try {
|
||||||
count,
|
event = JSON.parse(data.toString('utf-8') )
|
||||||
modeSize,
|
} catch(err) {
|
||||||
mode,
|
sendToWebsocket(ws, constants.errors.invalidPacket(err) )
|
||||||
size,
|
return
|
||||||
operationModifier,
|
|
||||||
operation,
|
|
||||||
modifier
|
|
||||||
] = match
|
|
||||||
.slice(1)
|
|
||||||
|
|
||||||
return {
|
|
||||||
count: ParseRollInt(count),
|
|
||||||
mode,
|
|
||||||
size: ParseRollInt(size),
|
|
||||||
operation,
|
|
||||||
modifier: ParseRollInt(modifier),
|
|
||||||
descriptionConditions: PullDescription(expression, match)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(typeof event !== 'object' || Array.isArray(event) ) {
|
||||||
|
sendToWebsocket(ws, constants.errors.invalidPacket('Event is not an object') )
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(event)
|
||||||
|
|
||||||
|
if(client) {
|
||||||
|
if(event.reference && typeof event.reference == 'object')
|
||||||
|
sendToWebsocket(ws, constants.errors.invalidReference('Reference cannot be an object') )
|
||||||
|
|
||||||
|
event.client = client
|
||||||
|
handleEvent(event)
|
||||||
|
} else if(event.type === constants.events.login) {
|
||||||
|
client = handleLogin(event, ws)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const ParseRoll = expression => {
|
const handleLogin = (event, ws) => {
|
||||||
|
if(constants.clients.get(event.name) !== event.password) {
|
||||||
|
replyToWebsocket(ws, event, constants.errors.badLogin() )
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('worked?')
|
||||||
|
|
||||||
|
connections.set(event.name, ws)
|
||||||
|
replyToWebsocket(ws, event, { type: 'success' })
|
||||||
|
return event.name
|
||||||
|
}
|
||||||
|
|
||||||
|
const sendToWebsocket = (ws, event) =>
|
||||||
|
ws.send(JSON.stringify(event) )
|
||||||
|
|
||||||
|
const replyToWebsocket = (ws, toEvent, withEvent) => {
|
||||||
|
let event = {
|
||||||
|
...withEvent,
|
||||||
|
reference: toEvent.reference
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(connections)
|
||||||
|
|
||||||
|
return sendToWebsocket(ws, event)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleEvent = event => {
|
||||||
|
if(typeof event.type != 'string') {
|
||||||
|
reply(event, constants.errors.invalidPacket("No event type.") )
|
||||||
|
}
|
||||||
|
|
||||||
|
bot.emit(event.type, event)
|
||||||
|
}
|
||||||
|
|
||||||
|
const reply = (toEvent, withEvent) =>
|
||||||
|
replyToWebsocket(connections.get(toEvent.client), toEvent, withEvent)
|
||||||
|
|
||||||
|
//
|
||||||
|
// Command handling
|
||||||
|
//
|
||||||
|
|
||||||
|
const handleMessage = message => {
|
||||||
|
console.log(message)
|
||||||
|
|
||||||
|
let dice = parseRoll(message.content)
|
||||||
|
|
||||||
|
const respond = content => reply(message, {
|
||||||
|
type: 'message',
|
||||||
|
content
|
||||||
|
})
|
||||||
|
|
||||||
|
if(dice)
|
||||||
|
return rollDice(dice, respond)
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Rolls
|
||||||
|
// Most of this is pulled straight from the original
|
||||||
|
// Discord version atm.
|
||||||
|
|
||||||
|
const parseRoll = expression => {
|
||||||
let match = constants.rollRegex.exec(expression.trim())
|
let match = constants.rollRegex.exec(expression.trim())
|
||||||
|
|
||||||
if(match == null)
|
if(match == null)
|
||||||
@ -66,67 +119,26 @@ const ParseRoll = expression => {
|
|||||||
] = match.slice(1)
|
] = match.slice(1)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
count: ParseRollInt(count, 1),
|
count: parseRollInt(count, 1),
|
||||||
mode,
|
mode,
|
||||||
size: ParseRollInt(size),
|
size: parseRollInt(size),
|
||||||
operation,
|
operation,
|
||||||
modifier: ParseRollInt(modifier),
|
modifier: parseRollInt(modifier),
|
||||||
descriptionConditions: PullDescription(expression, match)
|
descriptionConditions: pullDescription(expression, match)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const PullDescription = (expression, match) => {
|
const parseRollInt = (value, defaultValue) =>
|
||||||
|
value ? parseInt(value) : defaultValue
|
||||||
|
|
||||||
|
const pullDescription = (expression, match) => {
|
||||||
if(match[0].length == expression.length)
|
if(match[0].length == expression.length)
|
||||||
return
|
return
|
||||||
|
|
||||||
return ParseDescription(expression.slice(match[0].length))
|
return parseDescription(expression.slice(match[0].length))
|
||||||
}
|
}
|
||||||
|
|
||||||
const ParseDescription = description => {
|
const rollDice = (dice, respond) => {
|
||||||
let conditions = []
|
|
||||||
let match
|
|
||||||
|
|
||||||
while((match = constants.descriptionRegex.exec(description)) !== null) {
|
|
||||||
let range
|
|
||||||
let [
|
|
||||||
rangeExp,
|
|
||||||
valueExp,
|
|
||||||
content
|
|
||||||
] = match.slice(2)
|
|
||||||
|
|
||||||
if(rangeExp) {
|
|
||||||
let split = rangeExp.split('-')
|
|
||||||
|
|
||||||
range = {
|
|
||||||
lower: ParseRollInt(split[0], -Infinity),
|
|
||||||
upper: ParseRollInt(split[1], Infinity)
|
|
||||||
}
|
|
||||||
} else if(valueExp) {
|
|
||||||
range = {
|
|
||||||
upper: valueExp,
|
|
||||||
lower: valueExp
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
conditions.push({
|
|
||||||
range,
|
|
||||||
content: content.trim()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
return conditions
|
|
||||||
}
|
|
||||||
|
|
||||||
const OnMessage = (message, respond) => {
|
|
||||||
let dice = ParseRoll(message.content)
|
|
||||||
|
|
||||||
if(dice == undefined)
|
|
||||||
return // No dice
|
|
||||||
|
|
||||||
RollDice(dice, respond)
|
|
||||||
}
|
|
||||||
|
|
||||||
const RollDice = (dice, respond) => {
|
|
||||||
if(dice.size > 255) {
|
if(dice.size > 255) {
|
||||||
respond('That die is way too big... .-.')
|
respond('That die is way too big... .-.')
|
||||||
return
|
return
|
||||||
@ -210,309 +222,16 @@ const RollDice = (dice, respond) => {
|
|||||||
respond(response)
|
respond(response)
|
||||||
}
|
}
|
||||||
|
|
||||||
const SaveReply = (message, reply) => {
|
//
|
||||||
globalThis.replies.set(message.id, {
|
// Hooks
|
||||||
id: reply.id,
|
//
|
||||||
timestamp: Date.now()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const MessageCycle = async message => {
|
const bot = new EventEmitter()
|
||||||
OnMessage(message, async content => {
|
|
||||||
SaveReply(message, await message.reply(content) )
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const RehandleMessage = async (message, reply) => {
|
bot.on('message', handleMessage)
|
||||||
OnMessage(message, async content => {
|
|
||||||
SaveReply(message, await reply.edit(content) )
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const PruneReplies = () => {
|
const server = new WebSocketServer({
|
||||||
for(let [ id, entry ] of globalThis.replies.entries()) {
|
port: 8080
|
||||||
let age = Date.now() - entry.timestamp
|
})
|
||||||
|
|
||||||
if(age > 1000 * 60 * 3) {
|
server.on('connection', handleConnection)
|
||||||
globalThis.replies.delete(id)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const InteractionRespond = (interaction, content) => {
|
|
||||||
let reply = { content, ephemeral: true }
|
|
||||||
|
|
||||||
if(interaction.replied || interaction.deferred) {
|
|
||||||
return interaction.followUp(reply)
|
|
||||||
} else {
|
|
||||||
return interaction.reply(reply)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const ErrorHandler = (interaction) => (error) =>
|
|
||||||
InteractionRespond(interaction, constants.errorMessage(error) )
|
|
||||||
.catch(reportingError => console.error('Could not display error message:\n ', reportingError) )
|
|
||||||
|
|
||||||
const Command = (data, callback) => {
|
|
||||||
globalThis.commands.set(data.name, {
|
|
||||||
data,
|
|
||||||
execute: callback
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const Subcommands = (data, subcommandCallbacks) =>
|
|
||||||
Command(data, interaction => {
|
|
||||||
return subcommandCallbacks[interaction.options.getSubcommand()](interaction)
|
|
||||||
})
|
|
||||||
|
|
||||||
const OpenMacros = guildId =>
|
|
||||||
db.sublevel(guildId).sublevel('macros')
|
|
||||||
|
|
||||||
const ReloadMacros = async guildId => {
|
|
||||||
let commands = []
|
|
||||||
let macros = OpenMacros(guildId)
|
|
||||||
let cacheEntry = {}
|
|
||||||
|
|
||||||
for await (let [ name, dice ] of macros.iterator() ) {
|
|
||||||
cacheEntry[name] = dice
|
|
||||||
|
|
||||||
commands.push({
|
|
||||||
name,
|
|
||||||
description: Elipsify("Roll " + dice.replaceAll('\n', ';'), 100),
|
|
||||||
options: [
|
|
||||||
{
|
|
||||||
name: "options",
|
|
||||||
description: "Dice, modifiers, or descriptions to apply over the macro",
|
|
||||||
type: 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
globalThis.macroCache.set(guildId, cacheEntry)
|
|
||||||
|
|
||||||
await rest.put(
|
|
||||||
Routes.applicationGuildCommands(process.env.DISCORD_ID, guildId),
|
|
||||||
{ body: globalThis.commands }
|
|
||||||
)
|
|
||||||
.catch(err => console.error('Failed to reload macros:', err) )
|
|
||||||
}
|
|
||||||
|
|
||||||
const Elipsify = (string, maxLength) =>
|
|
||||||
string.length > maxLength ? string.slice(0, maxLength - 3) + '...' : string
|
|
||||||
|
|
||||||
const PruneDB = async () => {
|
|
||||||
let validIds = []
|
|
||||||
|
|
||||||
for await(let key of db.keys()) {
|
|
||||||
let [ guildId ] = key.split('!').slice(1)
|
|
||||||
|
|
||||||
if(validIds.includes(guildId))
|
|
||||||
continue
|
|
||||||
|
|
||||||
if(client.guilds.cache.has(guildId)) {
|
|
||||||
validIds.push(guildId)
|
|
||||||
} else {
|
|
||||||
await db.del(key)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return validIds
|
|
||||||
}
|
|
||||||
|
|
||||||
const Responses = (interaction, ephemeral) => async content =>
|
|
||||||
interaction.reply({ content, ephemeral })
|
|
||||||
|
|
||||||
const Subscribe = (event, callback) => {
|
|
||||||
client.on(event, (...args) => {
|
|
||||||
return callback(...args)
|
|
||||||
.catch(err => console.error(err))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const HandleCommand = async interaction => {
|
|
||||||
if(globalThis.commands.has(interaction.commandName) ) {
|
|
||||||
globalThis.commands.get(interaction.commandName).execute(interaction)
|
|
||||||
.catch(ErrorHandler(interaction))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
await interaction.deferReply()
|
|
||||||
let roll = globalThis.macroCache.get(interaction.guild.id)[interaction.commandName]
|
|
||||||
|
|
||||||
if(roll) {
|
|
||||||
let dice = ParseRoll(roll)
|
|
||||||
let options = interaction.options.get('options')
|
|
||||||
|
|
||||||
if(options) {
|
|
||||||
let optionDice = ParseOptionRoll(options.value)
|
|
||||||
|
|
||||||
for(let [ key, value ] of Object.entries(optionDice)) {
|
|
||||||
if(value)
|
|
||||||
dice[key] = Array.isArray(value) ? value.concat(dice[key]) : value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RollDice(dice, content => interaction.followUp(content) )
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const FindOption = (options, name) =>
|
|
||||||
options.find(option => option.name == name)
|
|
||||||
|
|
||||||
const HandleAutocomplete = async interaction => {
|
|
||||||
if(globalThis.commands.has(interaction.commandName) ) {
|
|
||||||
let { data } = globalThis.commands.get(interaction.commandName)
|
|
||||||
let subcommand = interaction.options.getSubcommand()
|
|
||||||
let focusedOption = interaction.options.getFocused(true)
|
|
||||||
|
|
||||||
if(subcommand !== undefined) {
|
|
||||||
data = FindOption(data.options, subcommand)
|
|
||||||
}
|
|
||||||
|
|
||||||
let option = FindOption(data.options, focusedOption.name)
|
|
||||||
|
|
||||||
if(!option) {
|
|
||||||
console.error('Could not find option: ' + focusedOption)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
let filtered = option
|
|
||||||
.getAutocomplete(interaction)
|
|
||||||
.filter(choice => choice.startsWith(focusedOption.value) )
|
|
||||||
.map(choice => ({ name: choice, value: choice }) )
|
|
||||||
|
|
||||||
await interaction.respond(filtered)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const Interaction = interaction => {
|
|
||||||
if(interaction.isChatInputCommand()) {
|
|
||||||
return HandleCommand(interaction)
|
|
||||||
} else if(interaction.isAutocomplete()) {
|
|
||||||
return HandleAutocomplete(interaction)
|
|
||||||
.catch(console.error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const MessageUpdate = async (oldMessage, newMessage) => {
|
|
||||||
if(globalThis.replies.has(newMessage.id) ) {
|
|
||||||
let { id } = globalThis.replies.get(newMessage.id)
|
|
||||||
|
|
||||||
newMessage.channel.messages.fetch(id)
|
|
||||||
.then(reply => RehandleMessage(newMessage, reply) )
|
|
||||||
.catch(err => MessageCycle(newMessage) )
|
|
||||||
} else {
|
|
||||||
MessageCycle(newMessage)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const About = async (interaction) => {
|
|
||||||
let embed = {
|
|
||||||
title: 'dicedicedice',
|
|
||||||
thumbnail: {
|
|
||||||
url: constants.iconUrl
|
|
||||||
},
|
|
||||||
description: constants.aboutMessage(client.guilds.cache.size)
|
|
||||||
}
|
|
||||||
|
|
||||||
await interaction.reply({
|
|
||||||
embeds: [ embed ],
|
|
||||||
ephemeral: true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const AddMacro = async (interaction) => {
|
|
||||||
let respond = Responses(interaction, true)
|
|
||||||
let name = interaction.options.get('name').value.toLowerCase()
|
|
||||||
|
|
||||||
if(!constants.macroNameRegex.test(name))
|
|
||||||
return respond("Please provide a macro name that consists of only alphanumeric characters.")
|
|
||||||
|
|
||||||
if(commands.has(name))
|
|
||||||
return respond("Uhh,, I think that macro name is already taken by my own commands, sorry.")
|
|
||||||
|
|
||||||
let macros = globalThis.macroCache.get(interaction.guild.id)
|
|
||||||
|
|
||||||
if(macros && !macros[name] && Object.keys(macros).length >= 100)
|
|
||||||
return respond("I can't keep track of that many macros,, ;-;")
|
|
||||||
|
|
||||||
let dice = interaction.options.get('dice').value
|
|
||||||
|
|
||||||
if(!constants.rollRegex.test(dice) )
|
|
||||||
return respond("Please provide a valid roll expression.")
|
|
||||||
|
|
||||||
await interaction.deferReply({ ephemeral: true })
|
|
||||||
|
|
||||||
await Promise.all([
|
|
||||||
OpenMacros(interaction.guild.id).put(name, dice),
|
|
||||||
ReloadMacros(interaction.guild.id)
|
|
||||||
])
|
|
||||||
interaction.followUp(`Macro added! Try \`/${name}\`! You might need to switch to a different server and back or reopen Discord in order for it to recognize the new command.`)
|
|
||||||
}
|
|
||||||
|
|
||||||
const RemoveMacro = async (interaction) => {
|
|
||||||
let name = interaction.options.get('name').value.toLowerCase()
|
|
||||||
let macros = macroCache.get(interaction.guild.id)
|
|
||||||
let respond = openResponses(interaction, true)
|
|
||||||
|
|
||||||
if(!macros)
|
|
||||||
return respond('There aren\'t even any macros in this guild!')
|
|
||||||
|
|
||||||
let dice = macros && macroCache.get(interaction.guild.id)[name]
|
|
||||||
|
|
||||||
if(!dice)
|
|
||||||
return respond("There isn't a macro with that name .-.")
|
|
||||||
|
|
||||||
await interaction.deferReply({ ephemeral: true })
|
|
||||||
await Promise.all([
|
|
||||||
openMacros(interaction.guild.id).del(name),
|
|
||||||
reloadMacros(interaction.guild.id)
|
|
||||||
])
|
|
||||||
|
|
||||||
await interaction.followUp(`Removed \`${name}\`, its dice expression was: \`\`\`${dice}\`\`\``)
|
|
||||||
}
|
|
||||||
|
|
||||||
const Start = async () => {
|
|
||||||
Command(
|
|
||||||
constants.commands.about,
|
|
||||||
About
|
|
||||||
)
|
|
||||||
|
|
||||||
Subcommands(constants.commands.macro, {
|
|
||||||
add: AddMacro,
|
|
||||||
remove: RemoveMacro
|
|
||||||
})
|
|
||||||
|
|
||||||
Subscribe('interactionCreate', Interaction)
|
|
||||||
Subscribe('messageCreate', MessageCycle)
|
|
||||||
Subscribe('messageUpdate', MessageUpdate)
|
|
||||||
Subscribe('ready', async () => {
|
|
||||||
console.log("Logged in!")
|
|
||||||
|
|
||||||
let guildIds = await PruneDB()
|
|
||||||
|
|
||||||
for(let guildId of guildIds)
|
|
||||||
await ReloadMacros(guildId)
|
|
||||||
|
|
||||||
console.log("Ready")
|
|
||||||
})
|
|
||||||
|
|
||||||
await rest.put(
|
|
||||||
Routes.applicationCommands(process.env.DISCORD_ID),
|
|
||||||
{
|
|
||||||
body: [ ...globalThis.commands.values() ]
|
|
||||||
.map(command => command.data )
|
|
||||||
}
|
|
||||||
)
|
|
||||||
.catch(err => console.error('Command registration failed: ', err) )
|
|
||||||
|
|
||||||
console.log(process.env)
|
|
||||||
|
|
||||||
await client.login(process.env.DISCORD_TOKEN)
|
|
||||||
.catch(err => console.error('Login failed: ', err) )
|
|
||||||
|
|
||||||
setInterval(PruneReplies, 1000 * 60)
|
|
||||||
}
|
|
||||||
|
|
||||||
Start()
|
|
94
yarn.lock
94
yarn.lock
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
"@discordjs/builders@^1.6.3":
|
"@discordjs/builders@^1.6.3":
|
||||||
version "1.6.3"
|
version "1.6.3"
|
||||||
resolved "https://registry.npmjs.org/@discordjs/builders/-/builders-1.6.3.tgz"
|
resolved "https://registry.yarnpkg.com/@discordjs/builders/-/builders-1.6.3.tgz#994b4fe57e77b47096f74bb5a1f664870a930a43"
|
||||||
integrity sha512-CTCh8NqED3iecTNuiz49mwSsrc2iQb4d0MjMdmS/8pb69Y4IlzJ/DIy/p5GFlgOrFbNO2WzMHkWKQSiJ3VNXaw==
|
integrity sha512-CTCh8NqED3iecTNuiz49mwSsrc2iQb4d0MjMdmS/8pb69Y4IlzJ/DIy/p5GFlgOrFbNO2WzMHkWKQSiJ3VNXaw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@discordjs/formatters" "^0.3.1"
|
"@discordjs/formatters" "^0.3.1"
|
||||||
@ -17,19 +17,19 @@
|
|||||||
|
|
||||||
"@discordjs/collection@^1.5.1":
|
"@discordjs/collection@^1.5.1":
|
||||||
version "1.5.1"
|
version "1.5.1"
|
||||||
resolved "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.1.tgz"
|
resolved "https://registry.yarnpkg.com/@discordjs/collection/-/collection-1.5.1.tgz#bc7ca557838dc29247bf19860426637f103bc383"
|
||||||
integrity sha512-aWEc9DCf3TMDe9iaJoOnO2+JVAjeRNuRxPZQA6GVvBf+Z3gqUuWYBy2NWh4+5CLYq5uoc3MOvUQ5H5m8CJBqOA==
|
integrity sha512-aWEc9DCf3TMDe9iaJoOnO2+JVAjeRNuRxPZQA6GVvBf+Z3gqUuWYBy2NWh4+5CLYq5uoc3MOvUQ5H5m8CJBqOA==
|
||||||
|
|
||||||
"@discordjs/formatters@^0.3.1":
|
"@discordjs/formatters@^0.3.1":
|
||||||
version "0.3.1"
|
version "0.3.1"
|
||||||
resolved "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.3.1.tgz"
|
resolved "https://registry.yarnpkg.com/@discordjs/formatters/-/formatters-0.3.1.tgz#81393cf25e6e3223361061629752ea727475e842"
|
||||||
integrity sha512-M7X4IGiSeh4znwcRGcs+49B5tBkNDn4k5bmhxJDAUhRxRHTiFAOTVUNQ6yAKySu5jZTnCbSvTYHW3w0rAzV1MA==
|
integrity sha512-M7X4IGiSeh4znwcRGcs+49B5tBkNDn4k5bmhxJDAUhRxRHTiFAOTVUNQ6yAKySu5jZTnCbSvTYHW3w0rAzV1MA==
|
||||||
dependencies:
|
dependencies:
|
||||||
discord-api-types "^0.37.41"
|
discord-api-types "^0.37.41"
|
||||||
|
|
||||||
"@discordjs/rest@^1.7.1":
|
"@discordjs/rest@^1.7.1":
|
||||||
version "1.7.1"
|
version "1.7.1"
|
||||||
resolved "https://registry.npmjs.org/@discordjs/rest/-/rest-1.7.1.tgz"
|
resolved "https://registry.yarnpkg.com/@discordjs/rest/-/rest-1.7.1.tgz#eeef0e71a37c95fa27962129729b2aa9de8e3752"
|
||||||
integrity sha512-Ofa9UqT0U45G/eX86cURQnX7gzOJLG2oC28VhIk/G6IliYgQF7jFByBJEykPSHE4MxPhqCleYvmsrtfKh1nYmQ==
|
integrity sha512-Ofa9UqT0U45G/eX86cURQnX7gzOJLG2oC28VhIk/G6IliYgQF7jFByBJEykPSHE4MxPhqCleYvmsrtfKh1nYmQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@discordjs/collection" "^1.5.1"
|
"@discordjs/collection" "^1.5.1"
|
||||||
@ -43,12 +43,12 @@
|
|||||||
|
|
||||||
"@discordjs/util@^0.3.0", "@discordjs/util@^0.3.1":
|
"@discordjs/util@^0.3.0", "@discordjs/util@^0.3.1":
|
||||||
version "0.3.1"
|
version "0.3.1"
|
||||||
resolved "https://registry.npmjs.org/@discordjs/util/-/util-0.3.1.tgz"
|
resolved "https://registry.yarnpkg.com/@discordjs/util/-/util-0.3.1.tgz#4e8737e1dcff7e9f5eccc3116fb44755b65b1e97"
|
||||||
integrity sha512-HxXKYKg7vohx2/OupUN/4Sd02Ev3PBJ5q0gtjdcvXb0ErCva8jNHWfe/v5sU3UKjIB/uxOhc+TDOnhqffj9pRA==
|
integrity sha512-HxXKYKg7vohx2/OupUN/4Sd02Ev3PBJ5q0gtjdcvXb0ErCva8jNHWfe/v5sU3UKjIB/uxOhc+TDOnhqffj9pRA==
|
||||||
|
|
||||||
"@discordjs/ws@^0.8.3":
|
"@discordjs/ws@^0.8.3":
|
||||||
version "0.8.3"
|
version "0.8.3"
|
||||||
resolved "https://registry.npmjs.org/@discordjs/ws/-/ws-0.8.3.tgz"
|
resolved "https://registry.yarnpkg.com/@discordjs/ws/-/ws-0.8.3.tgz#77db8d563b731a2198c1b40f63b1ef8d230504f7"
|
||||||
integrity sha512-hcYtppanjHecbdNyCKQNH2I4RP9UrphDgmRgLYrATEQF1oo4sYSve7ZmGsBEXSzH72MO2tBPdWSThunbxUVk0g==
|
integrity sha512-hcYtppanjHecbdNyCKQNH2I4RP9UrphDgmRgLYrATEQF1oo4sYSve7ZmGsBEXSzH72MO2tBPdWSThunbxUVk0g==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@discordjs/collection" "^1.5.1"
|
"@discordjs/collection" "^1.5.1"
|
||||||
@ -63,12 +63,12 @@
|
|||||||
|
|
||||||
"@sapphire/async-queue@^1.5.0":
|
"@sapphire/async-queue@^1.5.0":
|
||||||
version "1.5.0"
|
version "1.5.0"
|
||||||
resolved "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz"
|
resolved "https://registry.yarnpkg.com/@sapphire/async-queue/-/async-queue-1.5.0.tgz#2f255a3f186635c4fb5a2381e375d3dfbc5312d8"
|
||||||
integrity sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==
|
integrity sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==
|
||||||
|
|
||||||
"@sapphire/shapeshift@^3.8.2":
|
"@sapphire/shapeshift@^3.8.2":
|
||||||
version "3.9.0"
|
version "3.9.0"
|
||||||
resolved "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.0.tgz"
|
resolved "https://registry.yarnpkg.com/@sapphire/shapeshift/-/shapeshift-3.9.0.tgz#5425d90b5f394b44b13928006f6b78c5294c0ce9"
|
||||||
integrity sha512-iJpHmjAdwX9aSL6MvFpVyo+tkokDtInmSjoJHbz/k4VJfnim3DjvG0hgGEKWtWZgCu45RaLgcoNgR1fCPdIz3w==
|
integrity sha512-iJpHmjAdwX9aSL6MvFpVyo+tkokDtInmSjoJHbz/k4VJfnim3DjvG0hgGEKWtWZgCu45RaLgcoNgR1fCPdIz3w==
|
||||||
dependencies:
|
dependencies:
|
||||||
fast-deep-equal "^3.1.3"
|
fast-deep-equal "^3.1.3"
|
||||||
@ -76,34 +76,34 @@
|
|||||||
|
|
||||||
"@sapphire/snowflake@^3.4.2":
|
"@sapphire/snowflake@^3.4.2":
|
||||||
version "3.5.1"
|
version "3.5.1"
|
||||||
resolved "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.1.tgz"
|
resolved "https://registry.yarnpkg.com/@sapphire/snowflake/-/snowflake-3.5.1.tgz#254521c188b49e8b2d4cc048b475fb2b38737fec"
|
||||||
integrity sha512-BxcYGzgEsdlG0dKAyOm0ehLGm2CafIrfQTZGWgkfKYbj+pNNsorZ7EotuZukc2MT70E0UbppVbtpBrqpzVzjNA==
|
integrity sha512-BxcYGzgEsdlG0dKAyOm0ehLGm2CafIrfQTZGWgkfKYbj+pNNsorZ7EotuZukc2MT70E0UbppVbtpBrqpzVzjNA==
|
||||||
|
|
||||||
"@tokenizer/token@^0.3.0":
|
"@tokenizer/token@^0.3.0":
|
||||||
version "0.3.0"
|
version "0.3.0"
|
||||||
resolved "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz"
|
resolved "https://registry.yarnpkg.com/@tokenizer/token/-/token-0.3.0.tgz#fe98a93fe789247e998c75e74e9c7c63217aa276"
|
||||||
integrity sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==
|
integrity sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==
|
||||||
|
|
||||||
"@types/node@*":
|
"@types/node@*":
|
||||||
version "20.2.1"
|
version "20.2.1"
|
||||||
resolved "https://registry.npmjs.org/@types/node/-/node-20.2.1.tgz"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.2.1.tgz#de559d4b33be9a808fd43372ccee822c70f39704"
|
||||||
integrity sha512-DqJociPbZP1lbZ5SQPk4oag6W7AyaGMO6gSfRwq3PWl4PXTwJpRQJhDq4W0kzrg3w6tJ1SwlvGZ5uKFHY13LIg==
|
integrity sha512-DqJociPbZP1lbZ5SQPk4oag6W7AyaGMO6gSfRwq3PWl4PXTwJpRQJhDq4W0kzrg3w6tJ1SwlvGZ5uKFHY13LIg==
|
||||||
|
|
||||||
"@types/ws@^8.5.4":
|
"@types/ws@^8.5.4":
|
||||||
version "8.5.4"
|
version "8.5.4"
|
||||||
resolved "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz"
|
resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.4.tgz#bb10e36116d6e570dd943735f86c933c1587b8a5"
|
||||||
integrity sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==
|
integrity sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
|
||||||
"@vladfrangu/async_event_emitter@^2.2.1":
|
"@vladfrangu/async_event_emitter@^2.2.1":
|
||||||
version "2.2.2"
|
version "2.2.2"
|
||||||
resolved "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.2.2.tgz"
|
resolved "https://registry.yarnpkg.com/@vladfrangu/async_event_emitter/-/async_event_emitter-2.2.2.tgz#84c5a3f8d648842cec5cc649b88df599af32ed88"
|
||||||
integrity sha512-HIzRG7sy88UZjBJamssEczH5q7t5+axva19UbZLO6u0ySbYPrwzWiXBcC0WuHyhKKoeCyneH+FvYzKQq/zTtkQ==
|
integrity sha512-HIzRG7sy88UZjBJamssEczH5q7t5+axva19UbZLO6u0ySbYPrwzWiXBcC0WuHyhKKoeCyneH+FvYzKQq/zTtkQ==
|
||||||
|
|
||||||
abstract-level@^1.0.2:
|
abstract-level@^1.0.2:
|
||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz"
|
resolved "https://registry.yarnpkg.com/abstract-level/-/abstract-level-1.0.3.tgz#78a67d3d84da55ee15201486ab44c09560070741"
|
||||||
integrity sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==
|
integrity sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==
|
||||||
dependencies:
|
dependencies:
|
||||||
buffer "^6.0.3"
|
buffer "^6.0.3"
|
||||||
@ -116,12 +116,12 @@ abstract-level@^1.0.2:
|
|||||||
|
|
||||||
base64-js@^1.3.1:
|
base64-js@^1.3.1:
|
||||||
version "1.5.1"
|
version "1.5.1"
|
||||||
resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz"
|
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
|
||||||
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
|
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
|
||||||
|
|
||||||
buffer@^6.0.3:
|
buffer@^6.0.3:
|
||||||
version "6.0.3"
|
version "6.0.3"
|
||||||
resolved "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz"
|
resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6"
|
||||||
integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==
|
integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==
|
||||||
dependencies:
|
dependencies:
|
||||||
base64-js "^1.3.1"
|
base64-js "^1.3.1"
|
||||||
@ -129,19 +129,19 @@ buffer@^6.0.3:
|
|||||||
|
|
||||||
busboy@^1.6.0:
|
busboy@^1.6.0:
|
||||||
version "1.6.0"
|
version "1.6.0"
|
||||||
resolved "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz"
|
resolved "https://registry.yarnpkg.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893"
|
||||||
integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==
|
integrity sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==
|
||||||
dependencies:
|
dependencies:
|
||||||
streamsearch "^1.1.0"
|
streamsearch "^1.1.0"
|
||||||
|
|
||||||
catering@^2.1.0:
|
catering@^2.1.0:
|
||||||
version "2.1.1"
|
version "2.1.1"
|
||||||
resolved "https://registry.npmjs.org/catering/-/catering-2.1.1.tgz"
|
resolved "https://registry.yarnpkg.com/catering/-/catering-2.1.1.tgz#66acba06ed5ee28d5286133982a927de9a04b510"
|
||||||
integrity sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==
|
integrity sha512-K7Qy8O9p76sL3/3m7/zLKbRkyOlSZAgzEaLhyj2mXS8PsCud2Eo4hAb8aLtZqHh0QGqLcb9dlJSu6lHRVENm1w==
|
||||||
|
|
||||||
classic-level@^1.3.0:
|
classic-level@^1.3.0:
|
||||||
version "1.3.0"
|
version "1.3.0"
|
||||||
resolved "https://registry.npmjs.org/classic-level/-/classic-level-1.3.0.tgz"
|
resolved "https://registry.yarnpkg.com/classic-level/-/classic-level-1.3.0.tgz#5e36680e01dc6b271775c093f2150844c5edd5c8"
|
||||||
integrity sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==
|
integrity sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==
|
||||||
dependencies:
|
dependencies:
|
||||||
abstract-level "^1.0.2"
|
abstract-level "^1.0.2"
|
||||||
@ -152,12 +152,12 @@ classic-level@^1.3.0:
|
|||||||
|
|
||||||
discord-api-types@^0.37.41:
|
discord-api-types@^0.37.41:
|
||||||
version "0.37.42"
|
version "0.37.42"
|
||||||
resolved "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.42.tgz"
|
resolved "https://registry.yarnpkg.com/discord-api-types/-/discord-api-types-0.37.42.tgz#3c196267ed31e9ea249e6880c15e2af1c6428629"
|
||||||
integrity sha512-1Huaj9cQ1W7/uryS8MZs/tZemnoKB94thM1cE40lep3rpU3q7WHqkdjN/veX0prTkYlPhcyLd/DeF/pBO8X8oQ==
|
integrity sha512-1Huaj9cQ1W7/uryS8MZs/tZemnoKB94thM1cE40lep3rpU3q7WHqkdjN/veX0prTkYlPhcyLd/DeF/pBO8X8oQ==
|
||||||
|
|
||||||
discord.js@^14.11.0:
|
discord.js@^14.11.0:
|
||||||
version "14.11.0"
|
version "14.11.0"
|
||||||
resolved "https://registry.npmjs.org/discord.js/-/discord.js-14.11.0.tgz"
|
resolved "https://registry.yarnpkg.com/discord.js/-/discord.js-14.11.0.tgz#6529d49f30d10fc5a9ff8e6796661aa998769afe"
|
||||||
integrity sha512-CkueWYFQ28U38YPR8HgsBR/QT35oPpMbEsTNM30Fs8loBIhnA4s70AwQEoy6JvLcpWWJO7GY0y2BUzZmuBMepQ==
|
integrity sha512-CkueWYFQ28U38YPR8HgsBR/QT35oPpMbEsTNM30Fs8loBIhnA4s70AwQEoy6JvLcpWWJO7GY0y2BUzZmuBMepQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@discordjs/builders" "^1.6.3"
|
"@discordjs/builders" "^1.6.3"
|
||||||
@ -177,17 +177,17 @@ discord.js@^14.11.0:
|
|||||||
|
|
||||||
dotenv@^16.0.3:
|
dotenv@^16.0.3:
|
||||||
version "16.0.3"
|
version "16.0.3"
|
||||||
resolved "https://registry.npmjs.org/dotenv/-/dotenv-16.0.3.tgz"
|
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07"
|
||||||
integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==
|
integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==
|
||||||
|
|
||||||
fast-deep-equal@^3.1.3:
|
fast-deep-equal@^3.1.3:
|
||||||
version "3.1.3"
|
version "3.1.3"
|
||||||
resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz"
|
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
|
||||||
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
|
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
|
||||||
|
|
||||||
file-type@^18.3.0:
|
file-type@^18.3.0:
|
||||||
version "18.4.0"
|
version "18.4.0"
|
||||||
resolved "https://registry.npmjs.org/file-type/-/file-type-18.4.0.tgz"
|
resolved "https://registry.yarnpkg.com/file-type/-/file-type-18.4.0.tgz#1d6c2c9351ad0dfe1f03165e04d60797b159578f"
|
||||||
integrity sha512-o6MQrZKTAK6WpvmQk3jqTVUmqxYBxW5bloUfrdH1ZnRFDvvAPNr+l+rgOxM3nkqWT+3khaj3FRMDydWe0xhu+w==
|
integrity sha512-o6MQrZKTAK6WpvmQk3jqTVUmqxYBxW5bloUfrdH1ZnRFDvvAPNr+l+rgOxM3nkqWT+3khaj3FRMDydWe0xhu+w==
|
||||||
dependencies:
|
dependencies:
|
||||||
readable-web-to-node-stream "^3.0.2"
|
readable-web-to-node-stream "^3.0.2"
|
||||||
@ -201,22 +201,22 @@ ieee754@^1.2.1:
|
|||||||
|
|
||||||
inherits@^2.0.3:
|
inherits@^2.0.3:
|
||||||
version "2.0.4"
|
version "2.0.4"
|
||||||
resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz"
|
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||||
|
|
||||||
is-buffer@^2.0.5:
|
is-buffer@^2.0.5:
|
||||||
version "2.0.5"
|
version "2.0.5"
|
||||||
resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz"
|
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191"
|
||||||
integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==
|
integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==
|
||||||
|
|
||||||
level-supports@^4.0.0:
|
level-supports@^4.0.0:
|
||||||
version "4.0.1"
|
version "4.0.1"
|
||||||
resolved "https://registry.npmjs.org/level-supports/-/level-supports-4.0.1.tgz"
|
resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-4.0.1.tgz#431546f9d81f10ff0fea0e74533a0e875c08c66a"
|
||||||
integrity sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==
|
integrity sha512-PbXpve8rKeNcZ9C1mUicC9auIYFyGpkV9/i6g76tLgANwWhtG2v7I4xNBUlkn3lE2/dZF3Pi0ygYGtLc4RXXdA==
|
||||||
|
|
||||||
level-transcoder@^1.0.1:
|
level-transcoder@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.npmjs.org/level-transcoder/-/level-transcoder-1.0.1.tgz"
|
resolved "https://registry.yarnpkg.com/level-transcoder/-/level-transcoder-1.0.1.tgz#f8cef5990c4f1283d4c86d949e73631b0bc8ba9c"
|
||||||
integrity sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==
|
integrity sha512-t7bFwFtsQeD8cl8NIoQ2iwxA0CL/9IFw7/9gAjOonH0PWTTiRfY7Hq+Ejbsxh86tXobDQ6IOiddjNYIfOBs06w==
|
||||||
dependencies:
|
dependencies:
|
||||||
buffer "^6.0.3"
|
buffer "^6.0.3"
|
||||||
@ -224,42 +224,42 @@ level-transcoder@^1.0.1:
|
|||||||
|
|
||||||
lodash.snakecase@^4.1.1:
|
lodash.snakecase@^4.1.1:
|
||||||
version "4.1.1"
|
version "4.1.1"
|
||||||
resolved "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz"
|
resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d"
|
||||||
integrity sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==
|
integrity sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==
|
||||||
|
|
||||||
lodash@^4.17.21:
|
lodash@^4.17.21:
|
||||||
version "4.17.21"
|
version "4.17.21"
|
||||||
resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz"
|
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
|
||||||
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
|
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
|
||||||
|
|
||||||
module-error@^1.0.1:
|
module-error@^1.0.1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.npmjs.org/module-error/-/module-error-1.0.2.tgz"
|
resolved "https://registry.yarnpkg.com/module-error/-/module-error-1.0.2.tgz#8d1a48897ca883f47a45816d4fb3e3c6ba404d86"
|
||||||
integrity sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==
|
integrity sha512-0yuvsqSCv8LbaOKhnsQ/T5JhyFlCYLPXK3U2sgV10zoKQwzs/MyfuQUOZQ1V/6OCOJsK/TRgNVrPuPDqtdMFtA==
|
||||||
|
|
||||||
napi-macros@^2.2.2:
|
napi-macros@^2.2.2:
|
||||||
version "2.2.2"
|
version "2.2.2"
|
||||||
resolved "https://registry.npmjs.org/napi-macros/-/napi-macros-2.2.2.tgz"
|
resolved "https://registry.yarnpkg.com/napi-macros/-/napi-macros-2.2.2.tgz#817fef20c3e0e40a963fbf7b37d1600bd0201044"
|
||||||
integrity sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==
|
integrity sha512-hmEVtAGYzVQpCKdbQea4skABsdXW4RUh5t5mJ2zzqowJS2OyXZTU1KhDVFhx+NlWZ4ap9mqR9TcDO3LTTttd+g==
|
||||||
|
|
||||||
node-gyp-build@^4.3.0:
|
node-gyp-build@^4.3.0:
|
||||||
version "4.6.0"
|
version "4.6.0"
|
||||||
resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.6.0.tgz"
|
resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.0.tgz#0c52e4cbf54bbd28b709820ef7b6a3c2d6209055"
|
||||||
integrity sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==
|
integrity sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==
|
||||||
|
|
||||||
peek-readable@^5.0.0:
|
peek-readable@^5.0.0:
|
||||||
version "5.0.0"
|
version "5.0.0"
|
||||||
resolved "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz"
|
resolved "https://registry.yarnpkg.com/peek-readable/-/peek-readable-5.0.0.tgz#7ead2aff25dc40458c60347ea76cfdfd63efdfec"
|
||||||
integrity sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==
|
integrity sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==
|
||||||
|
|
||||||
queue-microtask@^1.2.3:
|
queue-microtask@^1.2.3:
|
||||||
version "1.2.3"
|
version "1.2.3"
|
||||||
resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz"
|
resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
|
||||||
integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
|
integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
|
||||||
|
|
||||||
readable-stream@^3.6.0:
|
readable-stream@^3.6.0:
|
||||||
version "3.6.2"
|
version "3.6.2"
|
||||||
resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz"
|
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967"
|
||||||
integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==
|
integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==
|
||||||
dependencies:
|
dependencies:
|
||||||
inherits "^2.0.3"
|
inherits "^2.0.3"
|
||||||
@ -268,31 +268,31 @@ readable-stream@^3.6.0:
|
|||||||
|
|
||||||
readable-web-to-node-stream@^3.0.2:
|
readable-web-to-node-stream@^3.0.2:
|
||||||
version "3.0.2"
|
version "3.0.2"
|
||||||
resolved "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz"
|
resolved "https://registry.yarnpkg.com/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz#5d52bb5df7b54861fd48d015e93a2cb87b3ee0bb"
|
||||||
integrity sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==
|
integrity sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==
|
||||||
dependencies:
|
dependencies:
|
||||||
readable-stream "^3.6.0"
|
readable-stream "^3.6.0"
|
||||||
|
|
||||||
safe-buffer@~5.2.0:
|
safe-buffer@~5.2.0:
|
||||||
version "5.2.1"
|
version "5.2.1"
|
||||||
resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz"
|
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
|
||||||
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
|
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
|
||||||
|
|
||||||
streamsearch@^1.1.0:
|
streamsearch@^1.1.0:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz"
|
resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-1.1.0.tgz#404dd1e2247ca94af554e841a8ef0eaa238da764"
|
||||||
integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==
|
integrity sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==
|
||||||
|
|
||||||
string_decoder@^1.1.1:
|
string_decoder@^1.1.1:
|
||||||
version "1.3.0"
|
version "1.3.0"
|
||||||
resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz"
|
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e"
|
||||||
integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==
|
integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==
|
||||||
dependencies:
|
dependencies:
|
||||||
safe-buffer "~5.2.0"
|
safe-buffer "~5.2.0"
|
||||||
|
|
||||||
strtok3@^7.0.0:
|
strtok3@^7.0.0:
|
||||||
version "7.0.0"
|
version "7.0.0"
|
||||||
resolved "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz"
|
resolved "https://registry.yarnpkg.com/strtok3/-/strtok3-7.0.0.tgz#868c428b4ade64a8fd8fee7364256001c1a4cbe5"
|
||||||
integrity sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==
|
integrity sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@tokenizer/token" "^0.3.0"
|
"@tokenizer/token" "^0.3.0"
|
||||||
@ -300,7 +300,7 @@ strtok3@^7.0.0:
|
|||||||
|
|
||||||
token-types@^5.0.1:
|
token-types@^5.0.1:
|
||||||
version "5.0.1"
|
version "5.0.1"
|
||||||
resolved "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz"
|
resolved "https://registry.yarnpkg.com/token-types/-/token-types-5.0.1.tgz#aa9d9e6b23c420a675e55413b180635b86a093b4"
|
||||||
integrity sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==
|
integrity sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@tokenizer/token" "^0.3.0"
|
"@tokenizer/token" "^0.3.0"
|
||||||
@ -308,27 +308,27 @@ token-types@^5.0.1:
|
|||||||
|
|
||||||
ts-mixer@^6.0.3:
|
ts-mixer@^6.0.3:
|
||||||
version "6.0.3"
|
version "6.0.3"
|
||||||
resolved "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz"
|
resolved "https://registry.yarnpkg.com/ts-mixer/-/ts-mixer-6.0.3.tgz#69bd50f406ff39daa369885b16c77a6194c7cae6"
|
||||||
integrity sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ==
|
integrity sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ==
|
||||||
|
|
||||||
tslib@^2.5.0:
|
tslib@^2.5.0:
|
||||||
version "2.5.2"
|
version "2.5.2"
|
||||||
resolved "https://registry.npmjs.org/tslib/-/tslib-2.5.2.tgz"
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.2.tgz#1b6f07185c881557b0ffa84b111a0106989e8338"
|
||||||
integrity sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA==
|
integrity sha512-5svOrSA2w3iGFDs1HibEVBGbDrAY82bFQ3HZ3ixB+88nsbsWQoKqDRb5UBYAUPEzbBn6dAp5gRNXglySbx1MlA==
|
||||||
|
|
||||||
undici@^5.22.0:
|
undici@^5.22.0:
|
||||||
version "5.22.1"
|
version "5.22.1"
|
||||||
resolved "https://registry.npmjs.org/undici/-/undici-5.22.1.tgz"
|
resolved "https://registry.yarnpkg.com/undici/-/undici-5.22.1.tgz#877d512effef2ac8be65e695f3586922e1a57d7b"
|
||||||
integrity sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==
|
integrity sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==
|
||||||
dependencies:
|
dependencies:
|
||||||
busboy "^1.6.0"
|
busboy "^1.6.0"
|
||||||
|
|
||||||
util-deprecate@^1.0.1:
|
util-deprecate@^1.0.1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz"
|
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
||||||
integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
|
integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
|
||||||
|
|
||||||
ws@^8.13.0:
|
ws@^8.13.0:
|
||||||
version "8.13.0"
|
version "8.13.0"
|
||||||
resolved "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz"
|
resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0"
|
||||||
integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==
|
integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==
|
||||||
|
Loading…
x
Reference in New Issue
Block a user