generated from nhcarrigan/template
feat: add logging with our new monitor (#3)
Some checks failed
Node.js CI / Lint and Test (push) Has been cancelled
Some checks failed
Node.js CI / Lint and Test (push) Has been cancelled
### Explanation _No response_ ### Issue _No response_ ### Attestations - [x] I have read and agree to the [Code of Conduct](https://docs.nhcarrigan.com/community/coc/) - [x] I have read and agree to the [Community Guidelines](https://docs.nhcarrigan.com/community/guide/). - [x] My contribution complies with the [Contributor Covenant](https://docs.nhcarrigan.com/dev/covenant/). ### Dependencies - [x] I have pinned the dependencies to a specific patch version. ### Style - [x] I have run the linter and resolved any errors. - [x] My pull request uses an appropriate title, matching the conventional commit standards. - [x] My scope of feat/fix/chore/etc. correctly matches the nature of changes in my pull request. ### Tests - [ ] My contribution adds new code, and I have added tests to cover it. - [ ] My contribution modifies existing code, and I have updated the tests to reflect these changes. - [ ] All new and existing tests pass locally with my changes. - [ ] Code coverage remains at or above the configured threshold. ### Documentation _No response_ ### Versioning Minor - My pull request introduces a new non-breaking feature. Reviewed-on: #3 Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com> Co-committed-by: Naomi Carrigan <commits@nhcarrigan.com>
This commit is contained in:
parent
f3809b5a88
commit
c986e87e7b
@ -23,8 +23,8 @@
|
||||
"vitest": "3.0.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nhcarrigan/logger": "1.0.0",
|
||||
"discord.js": "14.18.0",
|
||||
"fastify": "5.2.1",
|
||||
"winston": "3.17.0"
|
||||
"fastify": "5.2.1"
|
||||
}
|
||||
}
|
||||
|
206
pnpm-lock.yaml
generated
206
pnpm-lock.yaml
generated
@ -8,15 +8,15 @@ importers:
|
||||
|
||||
.:
|
||||
dependencies:
|
||||
'@nhcarrigan/logger':
|
||||
specifier: 1.0.0
|
||||
version: 1.0.0
|
||||
discord.js:
|
||||
specifier: 14.18.0
|
||||
version: 14.18.0
|
||||
fastify:
|
||||
specifier: 5.2.1
|
||||
version: 5.2.1
|
||||
winston:
|
||||
specifier: 3.17.0
|
||||
version: 3.17.0
|
||||
devDependencies:
|
||||
'@nhcarrigan/eslint-config':
|
||||
specifier: 5.1.0
|
||||
@ -109,13 +109,6 @@ packages:
|
||||
resolution: {integrity: sha512-eUuWapzEGWFEpHFxgEaBG8e3n6S8L3MSu0oda755rOfabWPnh0Our1AozNFVUxGFIhbKgd1ksprsoDGMinTOTA==}
|
||||
engines: {node: '>=6.9.0'}
|
||||
|
||||
'@colors/colors@1.6.0':
|
||||
resolution: {integrity: sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==}
|
||||
engines: {node: '>=0.1.90'}
|
||||
|
||||
'@dabh/diagnostics@2.0.3':
|
||||
resolution: {integrity: sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==}
|
||||
|
||||
'@discordjs/builders@1.10.1':
|
||||
resolution: {integrity: sha512-OWo1fY4ztL1/M/DUyRPShB4d/EzVfuUvPTRRHRIt/YxBrUYSz0a+JicD5F5zHFoNs2oTuWavxCOVFV1UljHTng==}
|
||||
engines: {node: '>=16.11.0'}
|
||||
@ -429,6 +422,9 @@ packages:
|
||||
typescript: '>=5'
|
||||
vitest: '>=2'
|
||||
|
||||
'@nhcarrigan/logger@1.0.0':
|
||||
resolution: {integrity: sha512-2e19Bie+ZKb6yKPKjhawqsENkhHatYkvBAmFZx9eToOXdOca+CYi51tldRMtejg6e0+4hOOf2bo5zdBQKmH0dw==}
|
||||
|
||||
'@nhcarrigan/typescript-config@4.0.0':
|
||||
resolution: {integrity: sha512-969HVha7A/Sg77fuMwOm6p14a+7C5iE6g55OD71srqwKIgksQl+Ex/hAI/pyzTQFDQ/FBJbpnHlR4Ov25QV/rw==}
|
||||
engines: {node: '20', pnpm: '9'}
|
||||
@ -589,9 +585,6 @@ packages:
|
||||
'@types/normalize-package-data@2.4.4':
|
||||
resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==}
|
||||
|
||||
'@types/triple-beam@1.3.5':
|
||||
resolution: {integrity: sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==}
|
||||
|
||||
'@types/ws@8.5.14':
|
||||
resolution: {integrity: sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw==}
|
||||
|
||||
@ -844,9 +837,6 @@ packages:
|
||||
resolution: {integrity: sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
async@3.2.6:
|
||||
resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==}
|
||||
|
||||
atomic-sleep@1.0.0:
|
||||
resolution: {integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
@ -923,28 +913,13 @@ packages:
|
||||
resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==}
|
||||
engines: {node: '>=4'}
|
||||
|
||||
color-convert@1.9.3:
|
||||
resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==}
|
||||
|
||||
color-convert@2.0.1:
|
||||
resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
|
||||
engines: {node: '>=7.0.0'}
|
||||
|
||||
color-name@1.1.3:
|
||||
resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==}
|
||||
|
||||
color-name@1.1.4:
|
||||
resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==}
|
||||
|
||||
color-string@1.9.1:
|
||||
resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==}
|
||||
|
||||
color@3.2.1:
|
||||
resolution: {integrity: sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==}
|
||||
|
||||
colorspace@1.1.4:
|
||||
resolution: {integrity: sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==}
|
||||
|
||||
comment-parser@1.4.1:
|
||||
resolution: {integrity: sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==}
|
||||
engines: {node: '>= 12.0.0'}
|
||||
@ -1045,9 +1020,6 @@ packages:
|
||||
emoji-regex@9.2.2:
|
||||
resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==}
|
||||
|
||||
enabled@2.0.0:
|
||||
resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==}
|
||||
|
||||
error-ex@1.3.2:
|
||||
resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==}
|
||||
|
||||
@ -1262,9 +1234,6 @@ packages:
|
||||
fastq@1.19.0:
|
||||
resolution: {integrity: sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==}
|
||||
|
||||
fecha@4.2.3:
|
||||
resolution: {integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==}
|
||||
|
||||
file-entry-cache@8.0.0:
|
||||
resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==}
|
||||
engines: {node: '>=16.0.0'}
|
||||
@ -1292,9 +1261,6 @@ packages:
|
||||
flatted@3.3.2:
|
||||
resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==}
|
||||
|
||||
fn.name@1.1.0:
|
||||
resolution: {integrity: sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==}
|
||||
|
||||
for-each@0.3.4:
|
||||
resolution: {integrity: sha512-kKaIINnFpzW6ffJNDjjyjrk21BkDx38c0xa/klsT8VzLCaMEefv4ZTacrcVR4DmgTeBra++jMDAfS/tS799YDw==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@ -1431,9 +1397,6 @@ packages:
|
||||
resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
inherits@2.0.4:
|
||||
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
|
||||
|
||||
internal-slot@1.1.0:
|
||||
resolution: {integrity: sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@ -1449,9 +1412,6 @@ packages:
|
||||
is-arrayish@0.2.1:
|
||||
resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==}
|
||||
|
||||
is-arrayish@0.3.2:
|
||||
resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==}
|
||||
|
||||
is-async-function@2.1.1:
|
||||
resolution: {integrity: sha512-9dgM/cZBnNvjzaMYHVoxxfPj2QXt22Ev7SuuPrs+xav0ukGB0S6d4ydZdEiM48kLx5kDV+QBPrpVnFyefL8kkQ==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@ -1528,10 +1488,6 @@ packages:
|
||||
resolution: {integrity: sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
is-stream@2.0.1:
|
||||
resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
is-string@1.1.1:
|
||||
resolution: {integrity: sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@ -1643,9 +1599,6 @@ packages:
|
||||
keyv@4.5.4:
|
||||
resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
|
||||
|
||||
kuler@2.0.0:
|
||||
resolution: {integrity: sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==}
|
||||
|
||||
levn@0.4.1:
|
||||
resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
@ -1673,10 +1626,6 @@ packages:
|
||||
lodash@4.17.21:
|
||||
resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==}
|
||||
|
||||
logform@2.7.0:
|
||||
resolution: {integrity: sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==}
|
||||
engines: {node: '>= 12.0.0'}
|
||||
|
||||
loose-envify@1.4.0:
|
||||
resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==}
|
||||
hasBin: true
|
||||
@ -1786,9 +1735,6 @@ packages:
|
||||
resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==}
|
||||
engines: {node: '>=14.0.0'}
|
||||
|
||||
one-time@1.0.0:
|
||||
resolution: {integrity: sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==}
|
||||
|
||||
optionator@0.9.4:
|
||||
resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
@ -1936,10 +1882,6 @@ packages:
|
||||
resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
readable-stream@3.6.2:
|
||||
resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==}
|
||||
engines: {node: '>= 6'}
|
||||
|
||||
real-require@0.2.0:
|
||||
resolution: {integrity: sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==}
|
||||
engines: {node: '>= 12.13.0'}
|
||||
@ -2004,9 +1946,6 @@ packages:
|
||||
resolution: {integrity: sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==}
|
||||
engines: {node: '>=0.4'}
|
||||
|
||||
safe-buffer@5.2.1:
|
||||
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
|
||||
|
||||
safe-push-apply@1.0.0:
|
||||
resolution: {integrity: sha512-iKE9w/Z7xCzUMIZqdBsp6pEQvwuEebH4vdpjcDWnyzaI6yl6O9FHvVpmGelvEHNsoY6wGblkxR6Zty/h00WiSA==}
|
||||
engines: {node: '>= 0.4'}
|
||||
@ -2084,9 +2023,6 @@ packages:
|
||||
resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}
|
||||
engines: {node: '>=14'}
|
||||
|
||||
simple-swizzle@0.2.2:
|
||||
resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==}
|
||||
|
||||
slash@3.0.0:
|
||||
resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==}
|
||||
engines: {node: '>=8'}
|
||||
@ -2120,9 +2056,6 @@ packages:
|
||||
resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==}
|
||||
engines: {node: '>= 10.x'}
|
||||
|
||||
stack-trace@0.0.10:
|
||||
resolution: {integrity: sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==}
|
||||
|
||||
stackback@0.0.2:
|
||||
resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}
|
||||
|
||||
@ -2156,9 +2089,6 @@ packages:
|
||||
resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
string_decoder@1.3.0:
|
||||
resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==}
|
||||
|
||||
strip-ansi@6.0.1:
|
||||
resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==}
|
||||
engines: {node: '>=8'}
|
||||
@ -2195,9 +2125,6 @@ packages:
|
||||
resolution: {integrity: sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
text-hex@1.0.0:
|
||||
resolution: {integrity: sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==}
|
||||
|
||||
thread-stream@3.1.0:
|
||||
resolution: {integrity: sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A==}
|
||||
|
||||
@ -2227,10 +2154,6 @@ packages:
|
||||
resolution: {integrity: sha512-/m8M+2BJUpoJdgAHoG+baCwBT+tf2VraSfkBgl0Y00qIWt41DJ8R5B8nsEw0I58YwF5IZH6z24/2TobDKnqSWw==}
|
||||
engines: {node: '>=12'}
|
||||
|
||||
triple-beam@1.4.1:
|
||||
resolution: {integrity: sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==}
|
||||
engines: {node: '>= 14.0.0'}
|
||||
|
||||
ts-api-utils@1.4.3:
|
||||
resolution: {integrity: sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==}
|
||||
engines: {node: '>=16'}
|
||||
@ -2309,9 +2232,6 @@ packages:
|
||||
uri-js@4.4.1:
|
||||
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
|
||||
|
||||
util-deprecate@1.0.2:
|
||||
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
|
||||
|
||||
validate-npm-package-license@3.0.4:
|
||||
resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==}
|
||||
|
||||
@ -2414,14 +2334,6 @@ packages:
|
||||
engines: {node: '>=8'}
|
||||
hasBin: true
|
||||
|
||||
winston-transport@4.9.0:
|
||||
resolution: {integrity: sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A==}
|
||||
engines: {node: '>= 12.0.0'}
|
||||
|
||||
winston@3.17.0:
|
||||
resolution: {integrity: sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw==}
|
||||
engines: {node: '>= 12.0.0'}
|
||||
|
||||
word-wrap@1.2.5:
|
||||
resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
@ -2559,14 +2471,6 @@ snapshots:
|
||||
'@babel/helper-string-parser': 7.25.9
|
||||
'@babel/helper-validator-identifier': 7.25.9
|
||||
|
||||
'@colors/colors@1.6.0': {}
|
||||
|
||||
'@dabh/diagnostics@2.0.3':
|
||||
dependencies:
|
||||
colorspace: 1.1.4
|
||||
enabled: 2.0.0
|
||||
kuler: 2.0.0
|
||||
|
||||
'@discordjs/builders@1.10.1':
|
||||
dependencies:
|
||||
'@discordjs/formatters': 0.6.0
|
||||
@ -2846,6 +2750,8 @@ snapshots:
|
||||
- eslint-import-resolver-webpack
|
||||
- supports-color
|
||||
|
||||
'@nhcarrigan/logger@1.0.0': {}
|
||||
|
||||
'@nhcarrigan/typescript-config@4.0.0(typescript@5.7.3)':
|
||||
dependencies:
|
||||
typescript: 5.7.3
|
||||
@ -2961,8 +2867,6 @@ snapshots:
|
||||
|
||||
'@types/normalize-package-data@2.4.4': {}
|
||||
|
||||
'@types/triple-beam@1.3.5': {}
|
||||
|
||||
'@types/ws@8.5.14':
|
||||
dependencies:
|
||||
'@types/node': 22.13.1
|
||||
@ -3301,8 +3205,6 @@ snapshots:
|
||||
|
||||
async-function@1.0.0: {}
|
||||
|
||||
async@3.2.6: {}
|
||||
|
||||
atomic-sleep@1.0.0: {}
|
||||
|
||||
available-typed-arrays@1.0.7:
|
||||
@ -3382,33 +3284,12 @@ snapshots:
|
||||
dependencies:
|
||||
escape-string-regexp: 1.0.5
|
||||
|
||||
color-convert@1.9.3:
|
||||
dependencies:
|
||||
color-name: 1.1.3
|
||||
|
||||
color-convert@2.0.1:
|
||||
dependencies:
|
||||
color-name: 1.1.4
|
||||
|
||||
color-name@1.1.3: {}
|
||||
|
||||
color-name@1.1.4: {}
|
||||
|
||||
color-string@1.9.1:
|
||||
dependencies:
|
||||
color-name: 1.1.4
|
||||
simple-swizzle: 0.2.2
|
||||
|
||||
color@3.2.1:
|
||||
dependencies:
|
||||
color-convert: 1.9.3
|
||||
color-string: 1.9.1
|
||||
|
||||
colorspace@1.1.4:
|
||||
dependencies:
|
||||
color: 3.2.1
|
||||
text-hex: 1.0.0
|
||||
|
||||
comment-parser@1.4.1: {}
|
||||
|
||||
concat-map@0.0.1: {}
|
||||
@ -3513,8 +3394,6 @@ snapshots:
|
||||
|
||||
emoji-regex@9.2.2: {}
|
||||
|
||||
enabled@2.0.0: {}
|
||||
|
||||
error-ex@1.3.2:
|
||||
dependencies:
|
||||
is-arrayish: 0.2.1
|
||||
@ -3916,8 +3795,6 @@ snapshots:
|
||||
dependencies:
|
||||
reusify: 1.0.4
|
||||
|
||||
fecha@4.2.3: {}
|
||||
|
||||
file-entry-cache@8.0.0:
|
||||
dependencies:
|
||||
flat-cache: 4.0.1
|
||||
@ -3949,8 +3826,6 @@ snapshots:
|
||||
|
||||
flatted@3.3.2: {}
|
||||
|
||||
fn.name@1.1.0: {}
|
||||
|
||||
for-each@0.3.4:
|
||||
dependencies:
|
||||
is-callable: 1.2.7
|
||||
@ -4087,8 +3962,6 @@ snapshots:
|
||||
|
||||
indent-string@4.0.0: {}
|
||||
|
||||
inherits@2.0.4: {}
|
||||
|
||||
internal-slot@1.1.0:
|
||||
dependencies:
|
||||
es-errors: 1.3.0
|
||||
@ -4105,8 +3978,6 @@ snapshots:
|
||||
|
||||
is-arrayish@0.2.1: {}
|
||||
|
||||
is-arrayish@0.3.2: {}
|
||||
|
||||
is-async-function@2.1.1:
|
||||
dependencies:
|
||||
async-function: 1.0.0
|
||||
@ -4186,8 +4057,6 @@ snapshots:
|
||||
dependencies:
|
||||
call-bound: 1.0.3
|
||||
|
||||
is-stream@2.0.1: {}
|
||||
|
||||
is-string@1.1.1:
|
||||
dependencies:
|
||||
call-bound: 1.0.3
|
||||
@ -4307,8 +4176,6 @@ snapshots:
|
||||
dependencies:
|
||||
json-buffer: 3.0.1
|
||||
|
||||
kuler@2.0.0: {}
|
||||
|
||||
levn@0.4.1:
|
||||
dependencies:
|
||||
prelude-ls: 1.2.1
|
||||
@ -4336,15 +4203,6 @@ snapshots:
|
||||
|
||||
lodash@4.17.21: {}
|
||||
|
||||
logform@2.7.0:
|
||||
dependencies:
|
||||
'@colors/colors': 1.6.0
|
||||
'@types/triple-beam': 1.3.5
|
||||
fecha: 4.2.3
|
||||
ms: 2.1.3
|
||||
safe-stable-stringify: 2.5.0
|
||||
triple-beam: 1.4.1
|
||||
|
||||
loose-envify@1.4.0:
|
||||
dependencies:
|
||||
js-tokens: 4.0.0
|
||||
@ -4454,10 +4312,6 @@ snapshots:
|
||||
|
||||
on-exit-leak-free@2.1.2: {}
|
||||
|
||||
one-time@1.0.0:
|
||||
dependencies:
|
||||
fn.name: 1.1.0
|
||||
|
||||
optionator@0.9.4:
|
||||
dependencies:
|
||||
deep-is: 0.1.4
|
||||
@ -4603,12 +4457,6 @@ snapshots:
|
||||
parse-json: 5.2.0
|
||||
type-fest: 0.6.0
|
||||
|
||||
readable-stream@3.6.2:
|
||||
dependencies:
|
||||
inherits: 2.0.4
|
||||
string_decoder: 1.3.0
|
||||
util-deprecate: 1.0.2
|
||||
|
||||
real-require@0.2.0: {}
|
||||
|
||||
reflect.getprototypeof@1.0.10:
|
||||
@ -4698,8 +4546,6 @@ snapshots:
|
||||
has-symbols: 1.1.0
|
||||
isarray: 2.0.5
|
||||
|
||||
safe-buffer@5.2.1: {}
|
||||
|
||||
safe-push-apply@1.0.0:
|
||||
dependencies:
|
||||
es-errors: 1.3.0
|
||||
@ -4787,10 +4633,6 @@ snapshots:
|
||||
|
||||
signal-exit@4.1.0: {}
|
||||
|
||||
simple-swizzle@0.2.2:
|
||||
dependencies:
|
||||
is-arrayish: 0.3.2
|
||||
|
||||
slash@3.0.0: {}
|
||||
|
||||
slashes@3.0.12: {}
|
||||
@ -4822,8 +4664,6 @@ snapshots:
|
||||
|
||||
split2@4.2.0: {}
|
||||
|
||||
stack-trace@0.0.10: {}
|
||||
|
||||
stackback@0.0.2: {}
|
||||
|
||||
std-env@3.8.0: {}
|
||||
@ -4884,10 +4724,6 @@ snapshots:
|
||||
define-properties: 1.2.1
|
||||
es-object-atoms: 1.1.1
|
||||
|
||||
string_decoder@1.3.0:
|
||||
dependencies:
|
||||
safe-buffer: 5.2.1
|
||||
|
||||
strip-ansi@6.0.1:
|
||||
dependencies:
|
||||
ansi-regex: 5.0.1
|
||||
@ -4921,8 +4757,6 @@ snapshots:
|
||||
glob: 10.4.5
|
||||
minimatch: 9.0.5
|
||||
|
||||
text-hex@1.0.0: {}
|
||||
|
||||
thread-stream@3.1.0:
|
||||
dependencies:
|
||||
real-require: 0.2.0
|
||||
@ -4943,8 +4777,6 @@ snapshots:
|
||||
|
||||
toad-cache@3.7.0: {}
|
||||
|
||||
triple-beam@1.4.1: {}
|
||||
|
||||
ts-api-utils@1.4.3(typescript@5.7.3):
|
||||
dependencies:
|
||||
typescript: 5.7.3
|
||||
@ -5030,8 +4862,6 @@ snapshots:
|
||||
dependencies:
|
||||
punycode: 2.3.1
|
||||
|
||||
util-deprecate@1.0.2: {}
|
||||
|
||||
validate-npm-package-license@3.0.4:
|
||||
dependencies:
|
||||
spdx-correct: 3.2.0
|
||||
@ -5154,26 +4984,6 @@ snapshots:
|
||||
siginfo: 2.0.0
|
||||
stackback: 0.0.2
|
||||
|
||||
winston-transport@4.9.0:
|
||||
dependencies:
|
||||
logform: 2.7.0
|
||||
readable-stream: 3.6.2
|
||||
triple-beam: 1.4.1
|
||||
|
||||
winston@3.17.0:
|
||||
dependencies:
|
||||
'@colors/colors': 1.6.0
|
||||
'@dabh/diagnostics': 2.0.3
|
||||
async: 3.2.6
|
||||
is-stream: 2.0.1
|
||||
logform: 2.7.0
|
||||
one-time: 1.0.0
|
||||
readable-stream: 3.6.2
|
||||
safe-stable-stringify: 2.5.0
|
||||
stack-trace: 0.0.10
|
||||
triple-beam: 1.4.1
|
||||
winston-transport: 4.9.0
|
||||
|
||||
word-wrap@1.2.5: {}
|
||||
|
||||
wrap-ansi@7.0.0:
|
||||
|
1
prod.env
1
prod.env
@ -1,2 +1,3 @@
|
||||
DISCORD_TOKEN="op://Environment Variables - Naomi/Aria Iuvo/discord_token"
|
||||
TRANSLATE_TOKEN="op://Environment Variables - Naomi/Aria Iuvo/api_token"
|
||||
LOG_TOKEN="op://Environment Variables - Naomi/Alert Server/api_auth"
|
@ -9,12 +9,13 @@
|
||||
/* eslint-disable max-lines -- massive chonky boi*/
|
||||
import { Locale } from "discord.js";
|
||||
|
||||
export const responses: Record<string, { "no-message-content": string; "subscription-required": string; "translation": string; "unsupported-locale": string; "embed": { title: string; description: string; commit: string; version: string }; "button": { support: string; code: string } }> = {
|
||||
export const responses: Record<string, { "no-message-content": string; "subscription-required": string; "translation": string; "unsupported-locale": string; "embed": { title: string; description: string; commit: string; version: string }; "button": { support: string; code: string }; "command-error": string }> = {
|
||||
en: {
|
||||
"button": {
|
||||
code: "Source code",
|
||||
support: "Need help?",
|
||||
},
|
||||
"command-error": "An error occurred while running this command.",
|
||||
"embed": {
|
||||
commit: "Current Commit",
|
||||
description: "Aria Iuvo is a Discord bot that uses LibreTranslate to provide translations for messages. She is developed by NHCarrigan. To use the bot, right click on a message, select `Apps`, then select `Translate message`!",
|
||||
@ -33,6 +34,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "Kode sumber",
|
||||
support: "Butuh bantuan?",
|
||||
},
|
||||
"command-error": "Terjadi kesalahan saat menjalankan perintah ini.",
|
||||
"embed": {
|
||||
commit: "Commit Saat Ini",
|
||||
description: "Aria Iuvo adalah bot Discord yang menggunakan LibreTranslate untuk menyediakan terjemahan pesan. Dia dikembangkan oleh NHCarrigan. Untuk menggunakan bot, klik kanan pada pesan, pilih `Apps`, lalu pilih `Translate message`!",
|
||||
@ -49,6 +51,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "Código fuente",
|
||||
support: "¿Necesitas ayuda?",
|
||||
},
|
||||
"command-error": "Se produjo un error al ejecutar este comando.",
|
||||
"embed": {
|
||||
commit: "Commit Actual",
|
||||
description: "Aria Iuvo es un bot de Discord que usa LibreTranslate para proporcionar traducciones de mensajes. Está desarrollada por NHCarrigan. Para usar el bot, haz clic derecho en un mensaje, selecciona `Apps`, ¡luego selecciona `Translate message`!",
|
||||
@ -65,6 +68,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "Código fonte",
|
||||
support: "Precisa de ajuda?",
|
||||
},
|
||||
"command-error": "Ocorreu um erro ao executar este comando.",
|
||||
"embed": {
|
||||
commit: "Commit Atual",
|
||||
description: "Aria Iuvo é um bot do Discord que usa LibreTranslate para fornecer traduções de mensagens. Ela é desenvolvida por NHCarrigan. Para usar o bot, clique com o botão direito em uma mensagem, selecione `Apps`, depois selecione `Translate message`!",
|
||||
@ -81,6 +85,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "Zdrojový kód",
|
||||
support: "Potřebujete pomoc?",
|
||||
},
|
||||
"command-error": "Při spuštění tohoto příkazu došlo k chybě.",
|
||||
"embed": {
|
||||
commit: "Aktuální Commit",
|
||||
description: "Aria Iuvo je Discord bot, který používá LibreTranslate k poskytování překladů zpráv. Je vyvíjena NHCarriganem. Pro použití bota klikněte pravým tlačítkem na zprávu, vyberte `Apps`, pak vyberte `Translate message`!",
|
||||
@ -97,6 +102,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "Kildekode",
|
||||
support: "Brug for hjælp?",
|
||||
},
|
||||
"command-error": "Der opstod en fejl under kørslen af denne kommando.",
|
||||
"embed": {
|
||||
commit: "Nuværende Commit",
|
||||
description: "Aria Iuvo er en Discord bot, der bruger LibreTranslate til at levere oversættelser af beskeder. Hun er udviklet af NHCarrigan. For at bruge botten, højreklik på en besked, vælg `Apps`, vælg derefter `Translate message`!",
|
||||
@ -113,6 +119,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "Broncode",
|
||||
support: "Hulp nodig?",
|
||||
},
|
||||
"command-error": "Er is een fout opgetreden bij het uitvoeren van dit commando.",
|
||||
"embed": {
|
||||
commit: "Huidige Commit",
|
||||
description: "Aria Iuvo is een Discord bot die LibreTranslate gebruikt om vertalingen voor berichten te verzorgen. Ze is ontwikkeld door NHCarrigan. Om de bot te gebruiken, klik met de rechtermuisknop op een bericht, selecteer `Apps`, selecteer vervolgens `Translate message`!",
|
||||
@ -129,6 +136,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "Lähdekoodi",
|
||||
support: "Tarvitsetko apua?",
|
||||
},
|
||||
"command-error": "Tapahtui virhe suorittaessa tätä komentoa.",
|
||||
"embed": {
|
||||
commit: "Nykyinen Commit",
|
||||
description: "Aria Iuvo on Discord-botti, joka käyttää LibreTranslatea viestien kääntämiseen. Sen on kehittänyt NHCarrigan. Käyttääksesi bottia, napsauta hiiren oikealla painikkeella viestiä, valitse `Apps`, sitten valitse `Translate message`!",
|
||||
@ -145,6 +153,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "Code source",
|
||||
support: "Besoin d'aide ?",
|
||||
},
|
||||
"command-error": "Une erreur s'est produite lors de l'exécution de cette commande.",
|
||||
"embed": {
|
||||
commit: "Commit Actuel",
|
||||
description: "Aria Iuvo est un bot Discord qui utilise LibreTranslate pour fournir des traductions de messages. Elle est développée par NHCarrigan. Pour utiliser le bot, faites un clic droit sur un message, sélectionnez `Apps`, puis sélectionnez `Translate message` !",
|
||||
@ -161,6 +170,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "Quellcode",
|
||||
support: "Hilfe benötigt?",
|
||||
},
|
||||
"command-error": "Beim Ausführen dieses Befehls ist ein Fehler aufgetreten.",
|
||||
"embed": {
|
||||
commit: "Aktueller Commit",
|
||||
description: "Aria Iuvo ist ein Discord-Bot, der LibreTranslate verwendet, um Übersetzungen für Nachrichten bereitzustellen. Sie wurde von NHCarrigan entwickelt. Um den Bot zu verwenden, klicken Sie mit der rechten Maustaste auf eine Nachricht, wählen Sie `Apps` und dann `Translate message`!",
|
||||
@ -177,6 +187,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "Πηγαίος κώδικας",
|
||||
support: "Χρειάζεστε βοήθεια;",
|
||||
},
|
||||
"command-error": "Παρουσιάστηκε σφάλμα κατά την εκτέλεση αυτής της εντολής.",
|
||||
"embed": {
|
||||
commit: "Τρέχον Commit",
|
||||
description: "Η Aria Iuvo είναι ένα bot Discord που χρησιμοποιεί το LibreTranslate για να παρέχει μεταφράσεις μηνυμάτων. Αναπτύχθηκε από τον NHCarrigan. Για να χρησιμοποιήσετε το bot, κάντε δεξί κλικ σε ένα μήνυμα, επιλέξτε `Apps`, στη συνέχεια επιλέξτε `Translate message`!",
|
||||
@ -193,6 +204,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "सोर्स कोड",
|
||||
support: "मदद चाहिए?",
|
||||
},
|
||||
"command-error": "इस कमांड को चलाते समय एक त्रुटि आई।",
|
||||
"embed": {
|
||||
commit: "वर्तमान कमिट",
|
||||
description: "Aria Iuvo एक Discord बॉट है जो संदेशों के अनुवाद के लिए LibreTranslate का उपयोग करती है। इसे NHCarrigan द्वारा विकसित किया गया है। बॉट का उपयोग करने के लिए, किसी संदेश पर राइट क्लिक करें, `Apps` चुनें, फिर `Translate message` चुनें!",
|
||||
@ -209,6 +221,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "Forráskód",
|
||||
support: "Segítségre van szüksége?",
|
||||
},
|
||||
"command-error": "Hiba történt a parancs futtatása közben.",
|
||||
"embed": {
|
||||
commit: "Jelenlegi Commit",
|
||||
description: "Az Aria Iuvo egy Discord bot, amely a LibreTranslate-et használja üzenetek fordításához. NHCarrigan fejlesztette. A bot használatához kattintson jobb gombbal egy üzenetre, válassza az `Apps` lehetőséget, majd válassza a `Translate message` opciót!",
|
||||
@ -225,6 +238,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "Codice sorgente",
|
||||
support: "Hai bisogno di aiuto?",
|
||||
},
|
||||
"command-error": "Si è verificato un errore durante l'esecuzione di questo comando.",
|
||||
"embed": {
|
||||
commit: "Commit Attuale",
|
||||
description: "Aria Iuvo è un bot Discord che utilizza LibreTranslate per fornire traduzioni dei messaggi. È sviluppata da NHCarrigan. Per utilizzare il bot, fai clic destro su un messaggio, seleziona `Apps`, quindi seleziona `Translate message`!",
|
||||
@ -241,6 +255,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "ソースコード",
|
||||
support: "サポートが必要ですか?",
|
||||
},
|
||||
"command-error": "このコマンドの実行中にエラーが発生しました。",
|
||||
"embed": {
|
||||
commit: "現在のコミット",
|
||||
description: "Aria Iuvoは、LibreTranslateを使用してメッセージの翻訳を提供するDiscordボットです。NHCarriganによって開発されました。ボットを使用するには、メッセージを右クリックし、`Apps`を選択し、`Translate message`を選択してください!",
|
||||
@ -257,6 +272,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "소스 코드",
|
||||
support: "도움이 필요하신가요?",
|
||||
},
|
||||
"command-error": "이 명령을 실행하는 중에 오류가 발생했습니다.",
|
||||
"embed": {
|
||||
commit: "현재 커밋",
|
||||
description: "Aria Iuvo는 LibreTranslate를 사용하여 메시지 번역을 제공하는 Discord 봇입니다. NHCarrigan이 개발했습니다. 봇을 사용하려면 메시지를 마우스 오른쪽 버튼으로 클릭하고 `Apps`를 선택한 다음 `Translate message`를 선택하세요!",
|
||||
@ -273,6 +289,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "Išeities kodas",
|
||||
support: "Reikia pagalbos?",
|
||||
},
|
||||
"command-error": "Vykstant šiai komandai įvyko klaida.",
|
||||
"embed": {
|
||||
commit: "Dabartinis Commit",
|
||||
description: "Aria Iuvo yra Discord botas, naudojantis LibreTranslate žinučių vertimams. Ją sukūrė NHCarrigan. Norėdami naudoti botą, dešiniuoju pelės klavišu spustelėkite žinutę, pasirinkite `Apps`, tada pasirinkite `Translate message`!",
|
||||
@ -289,6 +306,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "Kod źródłowy",
|
||||
support: "Potrzebujesz pomocy?",
|
||||
},
|
||||
"command-error": "Wystąpił błąd podczas wykonywania tej komendy.",
|
||||
"embed": {
|
||||
commit: "Aktualny Commit",
|
||||
description: "Aria Iuvo to bot Discord, który używa LibreTranslate do tłumaczenia wiadomości. Została stworzona przez NHCarrigan. Aby użyć bota, kliknij prawym przyciskiem myszy na wiadomość, wybierz `Apps`, następnie wybierz `Translate message`!",
|
||||
@ -305,6 +323,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "Källkod",
|
||||
support: "Behöver du hjälp?",
|
||||
},
|
||||
"command-error": "Ett fel uppstod när denna kommando kördes.",
|
||||
"embed": {
|
||||
commit: "Nuvarande Commit",
|
||||
description: "Aria Iuvo är en Discord-bot som använder LibreTranslate för att tillhandahålla översättningar av meddelanden. Hon är utvecklad av NHCarrigan. För att använda boten, högerklicka på ett meddelande, välj `Apps`, välj sedan `Translate message`!",
|
||||
@ -321,6 +340,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "Cod sursă",
|
||||
support: "Aveți nevoie de ajutor?",
|
||||
},
|
||||
"command-error": "A apărut o eroare la rularea acestei comenzi.",
|
||||
"embed": {
|
||||
commit: "Commit Curent",
|
||||
description: "Aria Iuvo este un bot Discord care folosește LibreTranslate pentru a furniza traduceri pentru mesaje. Este dezvoltat de NHCarrigan. Pentru a folosi botul, faceți clic dreapta pe un mesaj, selectați `Apps`, apoi selectați `Translate message`!",
|
||||
@ -337,6 +357,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "Исходный код",
|
||||
support: "Нужна помощь?",
|
||||
},
|
||||
"command-error": "При выполнении этой команды произошла ошибка.",
|
||||
"embed": {
|
||||
commit: "Текущий Коммит",
|
||||
description: "Aria Iuvo - это Discord бот, использующий LibreTranslate для перевода сообщений. Разработан NHCarrigan. Чтобы использовать бота, щелкните правой кнопкой мыши по сообщению, выберите `Apps`, затем выберите `Translate message`!",
|
||||
@ -353,6 +374,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "源代码",
|
||||
support: "需要帮助?",
|
||||
},
|
||||
"command-error": "运行此命令时发生错误。",
|
||||
"embed": {
|
||||
commit: "当前提交",
|
||||
description: "Aria Iuvo是一个使用LibreTranslate提供消息翻译的Discord机器人。由NHCarrigan开发。要使用机器人,右键点击消息,选择`Apps`,然后选择`Translate message`!",
|
||||
@ -369,6 +391,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "原始碼",
|
||||
support: "需要幫助?",
|
||||
},
|
||||
"command-error": "執行此命令時發生錯誤。",
|
||||
"embed": {
|
||||
commit: "當前提交",
|
||||
description: "Aria Iuvo是一個使用LibreTranslate提供訊息翻譯的Discord機器人。由NHCarrigan開發。要使用機器人,右鍵點擊訊息,選擇`Apps`,然後選擇`Translate message`!",
|
||||
@ -385,6 +408,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "ซอร์สโค้ด",
|
||||
support: "ต้องการความช่วยเหลือ?",
|
||||
},
|
||||
"command-error": "เกิดข้อผิดพลาดขณะดำเนินการคำสั่งนี้",
|
||||
"embed": {
|
||||
commit: "คอมมิตปัจจุบัน",
|
||||
description: "Aria Iuvo เป็นบอท Discord ที่ใช้ LibreTranslate เพื่อแปลข้อความ พัฒนาโดย NHCarrigan ในการใช้บอท ให้คลิกขวาที่ข้อความ เลือก `Apps` จากนั้นเลือก `Translate message`!",
|
||||
@ -401,6 +425,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "Kaynak kodu",
|
||||
support: "Yardıma mı ihtiyacınız var?",
|
||||
},
|
||||
"command-error": "Bu komutu çalıştırırken bir hata oluştu.",
|
||||
"embed": {
|
||||
commit: "Mevcut Commit",
|
||||
description: "Aria Iuvo, mesajlar için çeviri sağlamak üzere LibreTranslate kullanan bir Discord botudur. NHCarrigan tarafından geliştirilmiştir. Botu kullanmak için, bir mesaja sağ tıklayın, `Apps`'i seçin, ardından `Translate message`'ı seçin!",
|
||||
@ -417,6 +442,7 @@ export const responses: Record<string, { "no-message-content": string; "subscrip
|
||||
code: "Вихідний код",
|
||||
support: "Потрібна допомога?",
|
||||
},
|
||||
"command-error": "Під час виконання цієї команди сталася помилка.",
|
||||
"embed": {
|
||||
commit: "Поточний Коміт",
|
||||
description: "Aria Iuvo - це Discord бот, який використовує LibreTranslate для перекладу повідомлень. Розроблений NHCarrigan. Щоб використовувати бота, клацніть правою кнопкою миші на повідомленні, виберіть `Apps`, потім виберіть `Translate message`!",
|
||||
|
28
src/index.ts
28
src/index.ts
@ -7,7 +7,23 @@ import { Client, Events } from "discord.js";
|
||||
import { about } from "./modules/about.js";
|
||||
import { translate } from "./modules/translate.js";
|
||||
import { instantiateServer } from "./server/serve.js";
|
||||
import { logHandler } from "./utils/logHandler.js";
|
||||
import { logger } from "./utils/logger.js";
|
||||
|
||||
process.on("unhandledRejection", (error) => {
|
||||
if (error instanceof Error) {
|
||||
void logger.error("Unhandled Rejection", error);
|
||||
return;
|
||||
}
|
||||
void logger.error("unhandled rejection", new Error(String(error)));
|
||||
});
|
||||
|
||||
process.on("uncaughtException", (error) => {
|
||||
if (error instanceof Error) {
|
||||
void logger.error("Uncaught Exception", error);
|
||||
return;
|
||||
}
|
||||
void logger.error("uncaught exception", new Error(String(error)));
|
||||
});
|
||||
|
||||
const client = new Client({
|
||||
intents: [],
|
||||
@ -22,8 +38,16 @@ client.on(Events.InteractionCreate, (interaction) => {
|
||||
}
|
||||
});
|
||||
|
||||
client.on(Events.EntitlementCreate, (entitlement) => {
|
||||
void logger.log("info", `User ${entitlement.userId} has subscribed!`);
|
||||
});
|
||||
|
||||
client.on(Events.EntitlementDelete, (entitlement) => {
|
||||
void logger.log("info", `User ${entitlement.userId} has unsubscribed... :c`);
|
||||
});
|
||||
|
||||
client.on(Events.ClientReady, () => {
|
||||
logHandler.info("Bot is ready.");
|
||||
void logger.log("debug", "Bot is ready.");
|
||||
});
|
||||
|
||||
instantiateServer();
|
||||
|
@ -14,6 +14,8 @@ import {
|
||||
type ChatInputCommandInteraction,
|
||||
} from "discord.js";
|
||||
import { i18n } from "../utils/i18n.js";
|
||||
import { logger } from "../utils/logger.js";
|
||||
import { replyToError } from "../utils/replyToError.js";
|
||||
import { getLocale } from "./getLocale.js";
|
||||
|
||||
/**
|
||||
@ -22,6 +24,7 @@ import { getLocale } from "./getLocale.js";
|
||||
*/
|
||||
export const about
|
||||
= async(interaction: ChatInputCommandInteraction): Promise<void> => {
|
||||
try {
|
||||
await interaction.deferReply({ flags: [ MessageFlags.Ephemeral ] });
|
||||
const targetLocale = getLocale(interaction);
|
||||
|
||||
@ -64,4 +67,11 @@ export const about
|
||||
components: [ row ],
|
||||
embeds: [ embed ],
|
||||
});
|
||||
} catch (error) {
|
||||
const targetLocale = getLocale(interaction);
|
||||
await replyToError(interaction, targetLocale);
|
||||
if (error instanceof Error) {
|
||||
await logger.error("about command", error);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -13,6 +13,8 @@ import {
|
||||
} from "discord.js";
|
||||
import { supportedLocales } from "../config/locales.js";
|
||||
import { i18n } from "../utils/i18n.js";
|
||||
import { logger } from "../utils/logger.js";
|
||||
import { replyToError } from "../utils/replyToError.js";
|
||||
import { getLocale } from "./getLocale.js";
|
||||
|
||||
/**
|
||||
@ -23,11 +25,14 @@ import { getLocale } from "./getLocale.js";
|
||||
export const translate = async(
|
||||
interaction: MessageContextMenuCommandInteraction,
|
||||
): Promise<void> => {
|
||||
try {
|
||||
await interaction.deferReply({ flags: [ MessageFlags.Ephemeral ] });
|
||||
const targetLocale = getLocale(interaction);
|
||||
|
||||
const isEntitled = interaction.entitlements.find((entitlement) => {
|
||||
return entitlement.userId === interaction.user.id && entitlement.isActive();
|
||||
return (
|
||||
entitlement.userId === interaction.user.id && entitlement.isActive()
|
||||
);
|
||||
});
|
||||
|
||||
if (!isEntitled && interaction.user.id !== "465650873650118659") {
|
||||
@ -45,9 +50,11 @@ export const translate = async(
|
||||
}
|
||||
|
||||
if (!supportedLocales.includes(targetLocale)) {
|
||||
await interaction.editReply(i18n("unsupported-locale", targetLocale, {
|
||||
await interaction.editReply(
|
||||
i18n("unsupported-locale", targetLocale, {
|
||||
target: targetLocale,
|
||||
}));
|
||||
}),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -78,7 +85,10 @@ export const translate = async(
|
||||
}>;
|
||||
const translationRequestParameters = new URLSearchParams();
|
||||
translationRequestParameters.append("q", message.content);
|
||||
translationRequestParameters.append("source", sourceLocale?.language ?? "en");
|
||||
translationRequestParameters.append(
|
||||
"source",
|
||||
sourceLocale?.language ?? "en",
|
||||
);
|
||||
translationRequestParameters.append("target", targetLocale);
|
||||
translationRequestParameters.append(
|
||||
"api_key",
|
||||
@ -101,4 +111,11 @@ export const translate = async(
|
||||
translation: translation.translatedText,
|
||||
}),
|
||||
});
|
||||
} catch (error) {
|
||||
const targetLocale = getLocale(interaction);
|
||||
await replyToError(interaction, targetLocale);
|
||||
if (error instanceof Error) {
|
||||
await logger.error("translate command", error);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
import fastify from "fastify";
|
||||
import { logHandler } from "../utils/logHandler.js";
|
||||
import { logger } from "../utils/logger.js";
|
||||
|
||||
const html = `<!DOCTYPE html>
|
||||
<html>
|
||||
@ -60,12 +60,16 @@ export const instantiateServer = (): void => {
|
||||
|
||||
server.listen({ port: 5001 }, (error) => {
|
||||
if (error) {
|
||||
logHandler.error(error);
|
||||
void logger.error("instantiate server", error);
|
||||
return;
|
||||
}
|
||||
logHandler.info("Server listening on port 5001.");
|
||||
void logger.log("debug", "Server listening on port 5001.");
|
||||
});
|
||||
} catch (error) {
|
||||
logHandler.error(error);
|
||||
if (error instanceof Error) {
|
||||
void logger.error("instantiate server", error);
|
||||
return;
|
||||
}
|
||||
void logger.error("instantiate server", new Error(String(error)));
|
||||
}
|
||||
};
|
||||
|
@ -1,31 +0,0 @@
|
||||
/**
|
||||
* @copyright nhcarrigan
|
||||
* @license Naomi's Public License
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
import { createLogger, format, transports, config } from "winston";
|
||||
|
||||
const { combine, timestamp, colorize, printf } = format;
|
||||
|
||||
/**
|
||||
* Standard log handler, using winston to wrap and format
|
||||
* messages. Call with `logHandler.log(level, message)`.
|
||||
* @param {string} level - The log level to use.
|
||||
* @param {string} message - The message to log.
|
||||
*/
|
||||
export const logHandler = createLogger({
|
||||
exitOnError: false,
|
||||
format: combine(
|
||||
timestamp({
|
||||
format: "YYYY-MM-DD HH:mm:ss",
|
||||
}),
|
||||
colorize(),
|
||||
printf((info) => {
|
||||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions -- Winston properties...
|
||||
return `${info.level}: ${info.timestamp}: ${info.message}`;
|
||||
}),
|
||||
),
|
||||
level: "silly",
|
||||
levels: config.npm.levels,
|
||||
transports: [ new transports.Console() ],
|
||||
});
|
12
src/utils/logger.ts
Normal file
12
src/utils/logger.ts
Normal file
@ -0,0 +1,12 @@
|
||||
/**
|
||||
* @copyright nhcarrigan
|
||||
* @license Naomi's Public License
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
|
||||
import { Logger } from "@nhcarrigan/logger";
|
||||
|
||||
export const logger = new Logger(
|
||||
"Aria Iuvo",
|
||||
process.env.LOG_TOKEN ?? "",
|
||||
);
|
28
src/utils/replyToError.ts
Normal file
28
src/utils/replyToError.ts
Normal file
@ -0,0 +1,28 @@
|
||||
/**
|
||||
* @copyright nhcarrigan
|
||||
* @license Naomi's Public License
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
import { i18n } from "./i18n.js";
|
||||
import type {
|
||||
ChatInputCommandInteraction,
|
||||
MessageContextMenuCommandInteraction,
|
||||
} from "discord.js";
|
||||
|
||||
/**
|
||||
* Responds to an interaction with a generic error message.
|
||||
* @param interaction -- The interaction payload from Discord.
|
||||
* @param locale -- The locale to respond in.
|
||||
*/
|
||||
export const replyToError = async(
|
||||
interaction:
|
||||
| ChatInputCommandInteraction
|
||||
| MessageContextMenuCommandInteraction,
|
||||
locale: string,
|
||||
): Promise<void> => {
|
||||
if (interaction.deferred || interaction.replied) {
|
||||
await interaction.editReply(i18n("command-error", locale));
|
||||
return;
|
||||
}
|
||||
await interaction.reply(i18n("command-error", locale));
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user