Compare commits

..

5 Commits

Author SHA1 Message Date
0f02383f7c include build 2021-11-10 09:42:35 -06:00
6180a7d9ec functional 2021-11-10 00:13:55 -06:00
2548a499f8 functional 2021-11-10 00:13:10 -06:00
6aaac56035 success 2021-11-09 23:38:07 -06:00
3be766dfde install 2021-11-09 20:05:17 -06:00
9 changed files with 892 additions and 76 deletions

3
.gitignore vendored
View File

@@ -1,3 +1,2 @@
/target settings.json
token
node_modules node_modules

507
package-lock.json generated
View File

@@ -5,14 +5,16 @@
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "discord-cli",
"version": "1.0.0", "version": "1.0.0",
"license": "UNLICENSED", "license": "UNLICENSED",
"dependencies": { "dependencies": {
"tslib": "^2.3.1" "discord.js": "^13.3.1"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^16.11.6", "@types/node": "^16.11.7",
"ts-node": "^10.4.0", "ts-node": "^10.4.0",
"tslib": "^2.3.1",
"typescript": "^4.4.4" "typescript": "^4.4.4"
} }
}, },
@@ -37,6 +39,64 @@
"node": ">=12" "node": ">=12"
} }
}, },
"node_modules/@discordjs/builders": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.8.2.tgz",
"integrity": "sha512-/YRd11SrcluqXkKppq/FAVzLIPRVlIVmc6X8ZklspzMIHDtJ+A4W37D43SHvLdH//+NnK+SHW/WeOF4Ts54PeQ==",
"dependencies": {
"@sindresorhus/is": "^4.2.0",
"discord-api-types": "^0.24.0",
"ow": "^0.27.0",
"ts-mixer": "^6.0.0",
"tslib": "^2.3.1"
},
"engines": {
"node": ">=16.0.0",
"npm": ">=7.0.0"
}
},
"node_modules/@discordjs/collection": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.3.2.tgz",
"integrity": "sha512-dMjLl60b2DMqObbH1MQZKePgWhsNe49XkKBZ0W5Acl5uVV43SN414i2QfZwRI7dXAqIn8pEWD2+XXQFn9KWxqg==",
"engines": {
"node": ">=16.0.0",
"npm": ">=7.0.0"
}
},
"node_modules/@discordjs/form-data": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/@sapphire/async-queue": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.1.9.tgz",
"integrity": "sha512-CbXaGwwlEMq+l1TRu01FJCvySJ1CEFKFclHT48nIfNeZXaAAmmwwy7scUKmYHPUa3GhoMp6Qr1B3eAJux6XgOQ==",
"engines": {
"node": ">=v14.0.0",
"npm": ">=7.0.0"
}
},
"node_modules/@sindresorhus/is": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.2.0.tgz",
"integrity": "sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw==",
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sindresorhus/is?sponsor=1"
}
},
"node_modules/@tsconfig/node10": { "node_modules/@tsconfig/node10": {
"version": "1.0.8", "version": "1.0.8",
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz",
@@ -62,10 +122,26 @@
"dev": true "dev": true
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "16.11.6", "version": "16.11.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.6.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.7.tgz",
"integrity": "sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==", "integrity": "sha512-QB5D2sqfSjCmTuWcBWyJ+/44bcjO7VbjSbOE0ucoVbAsSNQc4Lt6QkgkVXkTDwkL4z/beecZNDvVX15D4P8Jbw=="
"dev": true },
"node_modules/@types/node-fetch": {
"version": "2.5.12",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz",
"integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==",
"dependencies": {
"@types/node": "*",
"form-data": "^3.0.0"
}
},
"node_modules/@types/ws": {
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.0.tgz",
"integrity": "sha512-cyeefcUCgJlEk+hk2h3N+MqKKsPViQgF5boi9TTHSK+PoR9KWBb/C5ccPcDyAqgsbAYHTwulch725DV84+pSpg==",
"dependencies": {
"@types/node": "*"
}
}, },
"node_modules/acorn": { "node_modules/acorn": {
"version": "8.5.0", "version": "8.5.0",
@@ -94,12 +170,44 @@
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
"dev": true "dev": true
}, },
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"node_modules/callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
"engines": {
"node": ">=6"
}
},
"node_modules/combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"dependencies": {
"delayed-stream": "~1.0.0"
},
"engines": {
"node": ">= 0.8"
}
},
"node_modules/create-require": { "node_modules/create-require": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
"dev": true "dev": true
}, },
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/diff": { "node_modules/diff": {
"version": "4.0.2", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
@@ -109,12 +217,139 @@
"node": ">=0.3.1" "node": ">=0.3.1"
} }
}, },
"node_modules/discord-api-types": {
"version": "0.24.0",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.24.0.tgz",
"integrity": "sha512-X0uA2a92cRjowUEXpLZIHWl4jiX1NsUpDhcEOpa1/hpO1vkaokgZ8kkPtPih9hHth5UVQ3mHBu/PpB4qjyfJ4A==",
"engines": {
"node": ">=12"
}
},
"node_modules/discord.js": {
"version": "13.3.1",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.3.1.tgz",
"integrity": "sha512-zn4G8tL5+tMV00+0aSsVYNYcIfMSdT2g0nudKny+Ikd+XKv7m6bqI7n3Vji0GIRqXDr5ArPaw+iYFM2I1Iw3vg==",
"dependencies": {
"@discordjs/builders": "^0.8.1",
"@discordjs/collection": "^0.3.2",
"@discordjs/form-data": "^3.0.1",
"@sapphire/async-queue": "^1.1.8",
"@types/node-fetch": "^2.5.12",
"@types/ws": "^8.2.0",
"discord-api-types": "^0.24.0",
"node-fetch": "^2.6.1",
"ws": "^8.2.3"
},
"engines": {
"node": ">=16.6.0",
"npm": ">=7.0.0"
}
},
"node_modules/dot-prop": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz",
"integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==",
"dependencies": {
"is-obj": "^2.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/form-data": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/is-obj": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
"integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
"engines": {
"node": ">=8"
}
},
"node_modules/lodash.isequal": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
"integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA="
},
"node_modules/make-error": { "node_modules/make-error": {
"version": "1.3.6", "version": "1.3.6",
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
"dev": true "dev": true
}, },
"node_modules/mime-db": {
"version": "1.51.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz",
"integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==",
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mime-types": {
"version": "2.1.34",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz",
"integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==",
"dependencies": {
"mime-db": "1.51.0"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/node-fetch": {
"version": "2.6.6",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz",
"integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==",
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
}
},
"node_modules/ow": {
"version": "0.27.0",
"resolved": "https://registry.npmjs.org/ow/-/ow-0.27.0.tgz",
"integrity": "sha512-SGnrGUbhn4VaUGdU0EJLMwZWSupPmF46hnTRII7aCLCrqixTAC5eKo8kI4/XXf1eaaI8YEVT+3FeGNJI9himAQ==",
"dependencies": {
"@sindresorhus/is": "^4.0.1",
"callsites": "^3.1.0",
"dot-prop": "^6.0.1",
"lodash.isequal": "^4.5.0",
"type-fest": "^1.2.1",
"vali-date": "^1.0.0"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
},
"node_modules/ts-mixer": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.0.tgz",
"integrity": "sha512-nXIb1fvdY5CBSrDIblLn73NW0qRDk5yJ0Sk1qPBF560OdJfQp9jhl+0tzcY09OZ9U+6GpeoI9RjwoIKFIoB9MQ=="
},
"node_modules/ts-node": { "node_modules/ts-node": {
"version": "10.4.0", "version": "10.4.0",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.4.0.tgz", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.4.0.tgz",
@@ -161,6 +396,17 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
}, },
"node_modules/type-fest": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
"integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==",
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/typescript": { "node_modules/typescript": {
"version": "4.4.4", "version": "4.4.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz",
@@ -174,6 +420,48 @@
"node": ">=4.2.0" "node": ">=4.2.0"
} }
}, },
"node_modules/vali-date": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz",
"integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY=",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
},
"node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"node_modules/ws": {
"version": "8.2.3",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz",
"integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==",
"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
}
}
},
"node_modules/yn": { "node_modules/yn": {
"version": "3.1.1", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",
@@ -200,6 +488,43 @@
"@cspotcode/source-map-consumer": "0.8.0" "@cspotcode/source-map-consumer": "0.8.0"
} }
}, },
"@discordjs/builders": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.8.2.tgz",
"integrity": "sha512-/YRd11SrcluqXkKppq/FAVzLIPRVlIVmc6X8ZklspzMIHDtJ+A4W37D43SHvLdH//+NnK+SHW/WeOF4Ts54PeQ==",
"requires": {
"@sindresorhus/is": "^4.2.0",
"discord-api-types": "^0.24.0",
"ow": "^0.27.0",
"ts-mixer": "^6.0.0",
"tslib": "^2.3.1"
}
},
"@discordjs/collection": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.3.2.tgz",
"integrity": "sha512-dMjLl60b2DMqObbH1MQZKePgWhsNe49XkKBZ0W5Acl5uVV43SN414i2QfZwRI7dXAqIn8pEWD2+XXQFn9KWxqg=="
},
"@discordjs/form-data": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@discordjs/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-ZfFsbgEXW71Rw/6EtBdrP5VxBJy4dthyC0tpQKGKmYFImlmmrykO14Za+BiIVduwjte0jXEBlhSKf0MWbFp9Eg==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
},
"@sapphire/async-queue": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.1.9.tgz",
"integrity": "sha512-CbXaGwwlEMq+l1TRu01FJCvySJ1CEFKFclHT48nIfNeZXaAAmmwwy7scUKmYHPUa3GhoMp6Qr1B3eAJux6XgOQ=="
},
"@sindresorhus/is": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.2.0.tgz",
"integrity": "sha512-VkE3KLBmJwcCaVARtQpfuKcKv8gcBmUubrfHGF84dXuuW6jgsRYxPtzcIhPyK9WAPpRt2/xY6zkD9MnRaJzSyw=="
},
"@tsconfig/node10": { "@tsconfig/node10": {
"version": "1.0.8", "version": "1.0.8",
"resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.8.tgz",
@@ -225,10 +550,26 @@
"dev": true "dev": true
}, },
"@types/node": { "@types/node": {
"version": "16.11.6", "version": "16.11.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.6.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.7.tgz",
"integrity": "sha512-ua7PgUoeQFjmWPcoo9khiPum3Pd60k4/2ZGXt18sm2Slk0W0xZTqt5Y0Ny1NyBiN1EVQ/+FaF9NcY4Qe6rwk5w==", "integrity": "sha512-QB5D2sqfSjCmTuWcBWyJ+/44bcjO7VbjSbOE0ucoVbAsSNQc4Lt6QkgkVXkTDwkL4z/beecZNDvVX15D4P8Jbw=="
"dev": true },
"@types/node-fetch": {
"version": "2.5.12",
"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz",
"integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==",
"requires": {
"@types/node": "*",
"form-data": "^3.0.0"
}
},
"@types/ws": {
"version": "8.2.0",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.0.tgz",
"integrity": "sha512-cyeefcUCgJlEk+hk2h3N+MqKKsPViQgF5boi9TTHSK+PoR9KWBb/C5ccPcDyAqgsbAYHTwulch725DV84+pSpg==",
"requires": {
"@types/node": "*"
}
}, },
"acorn": { "acorn": {
"version": "8.5.0", "version": "8.5.0",
@@ -248,24 +589,140 @@
"integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==",
"dev": true "dev": true
}, },
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"requires": {
"delayed-stream": "~1.0.0"
}
},
"create-require": { "create-require": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz",
"integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==",
"dev": true "dev": true
}, },
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"diff": { "diff": {
"version": "4.0.2", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
"dev": true "dev": true
}, },
"discord-api-types": {
"version": "0.24.0",
"resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.24.0.tgz",
"integrity": "sha512-X0uA2a92cRjowUEXpLZIHWl4jiX1NsUpDhcEOpa1/hpO1vkaokgZ8kkPtPih9hHth5UVQ3mHBu/PpB4qjyfJ4A=="
},
"discord.js": {
"version": "13.3.1",
"resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.3.1.tgz",
"integrity": "sha512-zn4G8tL5+tMV00+0aSsVYNYcIfMSdT2g0nudKny+Ikd+XKv7m6bqI7n3Vji0GIRqXDr5ArPaw+iYFM2I1Iw3vg==",
"requires": {
"@discordjs/builders": "^0.8.1",
"@discordjs/collection": "^0.3.2",
"@discordjs/form-data": "^3.0.1",
"@sapphire/async-queue": "^1.1.8",
"@types/node-fetch": "^2.5.12",
"@types/ws": "^8.2.0",
"discord-api-types": "^0.24.0",
"node-fetch": "^2.6.1",
"ws": "^8.2.3"
}
},
"dot-prop": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz",
"integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==",
"requires": {
"is-obj": "^2.0.0"
}
},
"form-data": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
"integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
},
"is-obj": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
"integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w=="
},
"lodash.isequal": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz",
"integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA="
},
"make-error": { "make-error": {
"version": "1.3.6", "version": "1.3.6",
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz",
"integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==",
"dev": true "dev": true
}, },
"mime-db": {
"version": "1.51.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz",
"integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g=="
},
"mime-types": {
"version": "2.1.34",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz",
"integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==",
"requires": {
"mime-db": "1.51.0"
}
},
"node-fetch": {
"version": "2.6.6",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.6.tgz",
"integrity": "sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA==",
"requires": {
"whatwg-url": "^5.0.0"
}
},
"ow": {
"version": "0.27.0",
"resolved": "https://registry.npmjs.org/ow/-/ow-0.27.0.tgz",
"integrity": "sha512-SGnrGUbhn4VaUGdU0EJLMwZWSupPmF46hnTRII7aCLCrqixTAC5eKo8kI4/XXf1eaaI8YEVT+3FeGNJI9himAQ==",
"requires": {
"@sindresorhus/is": "^4.0.1",
"callsites": "^3.1.0",
"dot-prop": "^6.0.1",
"lodash.isequal": "^4.5.0",
"type-fest": "^1.2.1",
"vali-date": "^1.0.0"
}
},
"tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
},
"ts-mixer": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.0.tgz",
"integrity": "sha512-nXIb1fvdY5CBSrDIblLn73NW0qRDk5yJ0Sk1qPBF560OdJfQp9jhl+0tzcY09OZ9U+6GpeoI9RjwoIKFIoB9MQ=="
},
"ts-node": { "ts-node": {
"version": "10.4.0", "version": "10.4.0",
"resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.4.0.tgz", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.4.0.tgz",
@@ -291,12 +748,42 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
}, },
"type-fest": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz",
"integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA=="
},
"typescript": { "typescript": {
"version": "4.4.4", "version": "4.4.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz",
"integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==", "integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==",
"dev": true "dev": true
}, },
"vali-date": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/vali-date/-/vali-date-1.0.0.tgz",
"integrity": "sha1-G5BKWWCfsyjvB4E4Qgk09rhnCaY="
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"requires": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"ws": {
"version": "8.2.3",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz",
"integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==",
"requires": {}
},
"yn": { "yn": {
"version": "3.1.1", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz",

View File

@@ -4,20 +4,23 @@
"description": "discord but as a shell", "description": "discord but as a shell",
"main": "target/index.js", "main": "target/index.js",
"scripts": { "scripts": {
"start": "ts-node src/index.ts" "start": "node .",
"debug": "ts-node src/index.ts",
"build": "tsc"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git@git.zomo.dev:zomo/discord-cli.git" "url": "git@git.zomo.dev:zomo/index.git"
}, },
"author": "", "author": "",
"license": "UNLICENSED", "license": "UNLICENSED",
"devDependencies": { "devDependencies": {
"@types/node": "^16.11.6", "@types/node": "^16.11.7",
"ts-node": "^10.4.0", "ts-node": "^10.4.0",
"typescript": "^4.4.4", "tslib": "^2.3.1",
"tslib": "^2.3.1" "typescript": "^4.4.4"
}, },
"dependencies": { "dependencies": {
"discord.js": "^13.3.1"
} }
} }

View File

@@ -1,3 +1,20 @@
# discord-cli # discord-cli
discord but as a shell discord but as a shell
## running
make a `settings.json` file
```json
{
"token": "YOUR DISCORD TOKEN"
}
```
then run
```sh
npm i
npm run
```

View File

@@ -1,32 +1,170 @@
import { copyObj } from "./utils"; import readline = require('readline');
import { Client, Guild, Intents, TextChannel } from 'discord.js';
import { readFileSync } from 'fs';
import path = require('path');
var repl = require('repl'); //process.stdin.setRawMode(true);
const ReplOptions = { useColors: true };
class ReplCommand { const settings: {
token: string
} = JSON.parse(readFileSync(path.resolve('./settings.json')).toString());
private replPrefix: String; const rl = readline.createInterface({
private replInstance: any; //idk what type repl.start() returns input: process.stdin,
output: process.stdout
});
constructor(replPrefix: String) { function exitNicely() {
this.replPrefix = replPrefix; client.destroy();
rl.close();
let opt = copyObj(ReplOptions); process.exit();
this.replInstance = repl.start(`${replPrefix}>`);
} }
} class DiscordLocation {
public parent: DiscordLocation|null;
private prompt = '';
class DiscordLocation extends ReplCommand { private exitListener = ()=>{};
private name: String; constructor(prompt: string|undefined, parent: DiscordLocation|null) {
private parent: DiscordLocation; if (parent)
prompt = `${parent.prompt}/${prompt}`;
constructor(name: String, replPrefix: String, parent: DiscordLocation) { if (prompt)
super(replPrefix) this.prompt = prompt;
this.name = name;
this.parent = parent; this.parent = parent;
this.runPrompt();
}
async runPrompt() {
let answer: string = await new Promise(p => rl.question(`${this.prompt}> `, p));
this.handleRepl(answer, () => this.runPrompt());
}
handleRepl(rawArgs: string, done: ()=>void): void {
let argsArr = rawArgs.split(' '),
cmd = argsArr.shift()||'',
args = argsArr.join(' ');
switch (cmd) {
case 'exit':
this.exit();
break;
default:
this.runCommand(cmd, args, done).catch(e => {
console.error(e);
this.runPrompt();
});
} }
} }
onExit(listener: ()=>void) {
this.exitListener = listener;
}
exit() {
this.exitListener();
}
async runCommand(cmd: string, args: string, done: ()=>void) {}
}
class ClientLocation extends DiscordLocation {
private client: Client;
constructor(client: Client) {
super(client.user?.username, null);
this.client = client;
}
async runCommand(cmd: string, args: string, done: ()=>void) {
switch (cmd) {
case 'ls':
case 'dir':
case 'guilds':
this.client.guilds.cache.forEach(g => {
console.log(`${g.id}: ${g?.name||'ERROR'}`)
});
done();
break;
case 'join':
let g = await this.client.guilds.fetch(args)
let gloc = new GuildLocation(this, g);
gloc.onExit(done);
break;
default:
console.log(`${cmd} is invalid`);
done();
}
}
}
class GuildLocation extends DiscordLocation {
private guild: Guild;
constructor(parent: DiscordLocation, guild: Guild) {
super(guild.name, parent);
this.guild = guild;
}
async runCommand(cmd: string, args: string, done: ()=>void) {
switch (cmd) {
case 'ls':
case 'dir':
case 'channels':
this.guild.channels.cache.forEach(c => {
console.log(`${c.id}: ${c?.name||'ERROR'}`)
});
done();
break;
case 'join':
let c = await this.guild.channels.fetch(args) as TextChannel;
let gloc = new TextChannelLocation(this, c);
gloc.onExit(done);
break;
default:
console.log(`${cmd} is invalid`);
done();
}
}
}
class TextChannelLocation extends DiscordLocation {
private channel: TextChannel;
constructor(parent: DiscordLocation, channel: TextChannel) {
super(`${channel.name}`, parent);
this.channel = channel;
}
async runCommand(cmd: string, args: string, done: ()=>void) {
switch (cmd) {
case 'say':
await this.channel.send(args);
done();
break;
default:
console.log(`${cmd} is invalid`);
done();
}
}
}
const client = new Client( { intents: Intents.FLAGS.GUILDS } ); // 32767 is 111111111111111 (15 ones) in binary
client.login(settings.token);
client.on('ready', () => {
let clientRepl = new ClientLocation(client);
clientRepl.onExit(() => {
exitNicely();
});
});

View File

@@ -1,36 +0,0 @@
//random utility functions that are likely either reused or stolen (with credit)
//https://stackoverflow.com/questions/28150967/typescript-cloning-object
export function copyObj(obj: any): any {
var copy: any;
// Handle the 3 simple types, and null or undefined
if (null == obj || "object" != typeof obj) return obj;
// Handle Date
if (obj instanceof Date) {
copy = new Date();
copy.setTime(obj.getTime());
return copy;
}
// Handle Array
if (obj instanceof Array) {
copy = [];
for (var i = 0, len = obj.length; i < len; i++) {
copy[i] = copyObj(obj[i]);
}
return copy;
}
// Handle Object
if (obj instanceof Object) {
copy = {};
for (var attr in obj) {
if (obj.hasOwnProperty(attr)) copy[attr] = copyObj(obj[attr]);
}
return copy;
}
throw new Error("Unable to copy obj! Its type isn't supported.");
}

202
target/index.js Normal file
View File

@@ -0,0 +1,202 @@
"use strict";
exports.__esModule = true;
var tslib_1 = require("tslib");
var readline = require("readline");
var discord_js_1 = require("discord.js");
var fs_1 = require("fs");
var path = require("path");
var settings = JSON.parse((0, fs_1.readFileSync)(path.resolve('./settings.json')).toString());
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
function exitNicely() {
client.destroy();
rl.close();
process.exit();
}
var DiscordLocation = (function () {
function DiscordLocation(prompt, parent) {
this.prompt = '';
this.exitListener = function () { };
if (parent)
prompt = parent.prompt + "/" + prompt;
if (prompt)
this.prompt = prompt;
this.parent = parent;
this.runPrompt();
}
DiscordLocation.prototype.runPrompt = function () {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var answer;
var _this = this;
return (0, tslib_1.__generator)(this, function (_a) {
switch (_a.label) {
case 0: return [4, new Promise(function (p) { return rl.question(_this.prompt + "> ", p); })];
case 1:
answer = _a.sent();
this.handleRepl(answer, function () { return _this.runPrompt(); });
return [2];
}
});
});
};
DiscordLocation.prototype.handleRepl = function (rawArgs, done) {
var _this = this;
var argsArr = rawArgs.split(' '), cmd = argsArr.shift() || '', args = argsArr.join(' ');
switch (cmd) {
case 'exit':
this.exit();
break;
default:
this.runCommand(cmd, args, done)["catch"](function (e) {
console.error(e);
_this.runPrompt();
});
}
};
DiscordLocation.prototype.onExit = function (listener) {
this.exitListener = listener;
};
DiscordLocation.prototype.exit = function () {
this.exitListener();
};
DiscordLocation.prototype.runCommand = function (cmd, args, done) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () { return (0, tslib_1.__generator)(this, function (_a) {
return [2];
}); });
};
return DiscordLocation;
}());
var ClientLocation = (function (_super) {
(0, tslib_1.__extends)(ClientLocation, _super);
function ClientLocation(client) {
var _a;
var _this = _super.call(this, (_a = client.user) === null || _a === void 0 ? void 0 : _a.username, null) || this;
_this.client = client;
return _this;
}
ClientLocation.prototype.runCommand = function (cmd, args, done) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var _a, g, gloc;
return (0, tslib_1.__generator)(this, function (_b) {
switch (_b.label) {
case 0:
_a = cmd;
switch (_a) {
case 'ls': return [3, 1];
case 'dir': return [3, 1];
case 'guilds': return [3, 1];
case 'join': return [3, 2];
}
return [3, 4];
case 1:
this.client.guilds.cache.forEach(function (g) {
console.log(g.id + ": " + ((g === null || g === void 0 ? void 0 : g.name) || 'ERROR'));
});
done();
return [3, 5];
case 2: return [4, this.client.guilds.fetch(args)];
case 3:
g = _b.sent();
gloc = new GuildLocation(this, g);
gloc.onExit(done);
return [3, 5];
case 4:
console.log(cmd + " is invalid");
done();
_b.label = 5;
case 5: return [2];
}
});
});
};
return ClientLocation;
}(DiscordLocation));
var GuildLocation = (function (_super) {
(0, tslib_1.__extends)(GuildLocation, _super);
function GuildLocation(parent, guild) {
var _this = _super.call(this, guild.name, parent) || this;
_this.guild = guild;
return _this;
}
GuildLocation.prototype.runCommand = function (cmd, args, done) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var _a, c, gloc;
return (0, tslib_1.__generator)(this, function (_b) {
switch (_b.label) {
case 0:
_a = cmd;
switch (_a) {
case 'ls': return [3, 1];
case 'dir': return [3, 1];
case 'channels': return [3, 1];
case 'join': return [3, 2];
}
return [3, 4];
case 1:
this.guild.channels.cache.forEach(function (c) {
console.log(c.id + ": " + ((c === null || c === void 0 ? void 0 : c.name) || 'ERROR'));
});
done();
return [3, 5];
case 2: return [4, this.guild.channels.fetch(args)];
case 3:
c = _b.sent();
gloc = new TextChannelLocation(this, c);
gloc.onExit(done);
return [3, 5];
case 4:
console.log(cmd + " is invalid");
done();
_b.label = 5;
case 5: return [2];
}
});
});
};
return GuildLocation;
}(DiscordLocation));
var TextChannelLocation = (function (_super) {
(0, tslib_1.__extends)(TextChannelLocation, _super);
function TextChannelLocation(parent, channel) {
var _this = _super.call(this, "" + channel.name, parent) || this;
_this.channel = channel;
return _this;
}
TextChannelLocation.prototype.runCommand = function (cmd, args, done) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
var _a;
return (0, tslib_1.__generator)(this, function (_b) {
switch (_b.label) {
case 0:
_a = cmd;
switch (_a) {
case 'say': return [3, 1];
}
return [3, 3];
case 1: return [4, this.channel.send(args)];
case 2:
_b.sent();
done();
return [3, 4];
case 3:
console.log(cmd + " is invalid");
done();
_b.label = 4;
case 4: return [2];
}
});
});
};
return TextChannelLocation;
}(DiscordLocation));
var client = new discord_js_1.Client({ intents: discord_js_1.Intents.FLAGS.GUILDS });
client.login(settings.token);
client.on('ready', function () {
var clientRepl = new ClientLocation(client);
clientRepl.onExit(function () {
exitNicely();
});
});
//# sourceMappingURL=index.js.map

1
target/index.js.map Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mCAAsC;AACtC,yCAAiE;AACjE,yBAAkC;AAClC,2BAA8B;AAI9B,IAAM,QAAQ,GAEV,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AAEzE,IAAM,EAAE,GAAG,QAAQ,CAAC,eAAe,CAAC;IAChC,KAAK,EAAE,OAAO,CAAC,KAAK;IACpB,MAAM,EAAE,OAAO,CAAC,MAAM;CACzB,CAAC,CAAC;AAEH,SAAS,UAAU;IACf,MAAM,CAAC,OAAO,EAAE,CAAC;IACjB,EAAE,CAAC,KAAK,EAAE,CAAC;IACX,OAAO,CAAC,IAAI,EAAE,CAAC;AACnB,CAAC;AAED;IAOI,yBAAY,MAAwB,EAAE,MAA4B;QAJ1D,WAAM,GAAG,EAAE,CAAC;QAEZ,iBAAY,GAAG,cAAK,CAAC,CAAC;QAG1B,IAAI,MAAM;YACN,MAAM,GAAM,MAAM,CAAC,MAAM,SAAI,MAAQ,CAAC;QAC1C,IAAI,MAAM;YACN,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,SAAS,EAAE,CAAC;IACrB,CAAC;IAEK,mCAAS,GAAf;;;;;;4BACyB,WAAM,IAAI,OAAO,CAAC,UAAA,CAAC,IAAI,OAAA,EA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;KAElB;IAEL,0BAAC;AAAD,CAAC,AArBD,CAAkC,eAAe,GAqBhD;AAED,IAAM,MAAM,GAAG,IAAI,mBAAM,CAAE,EAAE,OAAO,EAAE,oBAAO,CAAC,KAAK,CAAC,MAAM,EAAE,CAAE,CAAC;AAE/D,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAE7B,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE;IACf,IAAI,UAAU,GAAG,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;IAC5C,UAAU,CAAC,MAAM,CAAC;QACd,UAAU,EAAE,CAAC;IACjB,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}

View File

@@ -1,11 +1,16 @@
{ {
"compilerOptions": { "compilerOptions": {
"noImplicitAny": true,
"removeComments": true,
"preserveConstEnums": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"importHelpers": true, "importHelpers": true,
"strict": true, "strict": true,
"strictNullChecks": true, "strictNullChecks": true,
"lib": [ "lib": ["ESNext"],
"ESNext" "sourceMap": true,
] "moduleResolution": "node",
} "outDir": "target"
},
"include": ["src/**/*"]
} }