Compare commits

...

4 commits

Author SHA1 Message Date
ryan-0324
ae2cf1245b
Merge 387d897ee0 into f12335a371 2024-09-17 15:18:17 +00:00
ryan-0324
387d897ee0 chore: update dependencies 2024-09-17 11:18:12 -04:00
ryan-0324
61ffbd6cb5 Merge branch 'dev' of https://github.com/Vendicated/Vencord into discord-types 2024-09-17 11:10:33 -04:00
Nuckyz
f12335a371
UserVoiceShow: Fix for simplified profiles
Some checks are pending
Sync to Codeberg / codeberg (push) Waiting to run
test / test (push) Waiting to run
2024-09-16 15:16:41 -03:00
9 changed files with 490 additions and 189 deletions

View file

@ -68,7 +68,7 @@
"highlight.js": "11.8.0",
"html-minifier-terser": "^7.2.0",
"moment": "2.22.2",
"puppeteer-core": "^23.3.0",
"puppeteer-core": "^23.3.1",
"standalone-electron-types": "^1.0.0",
"stylelint": "^16.9.0",
"stylelint-config-standard": "^36.0.1",

View file

@ -40,7 +40,7 @@
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unicorn": "^55.0.0",
"eslint-plugin-unused-imports": "^4.1.4",
"puppeteer-core": "^23.3.0",
"puppeteer-core": "^23.3.1",
"semver": "^7.6.3",
"tsx": "^4.19.1",
"type-fest": "^4.26.1",

View file

@ -128,7 +128,7 @@ importers:
version: 12.1.1(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
eslint-plugin-unused-imports:
specifier: ^4.1.4
version: 4.1.4(@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
version: 4.1.4(@typescript-eslint/eslint-plugin@8.6.0(@typescript-eslint/parser@8.6.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
highlight.js:
specifier: 11.8.0
version: 11.8.0
@ -139,8 +139,8 @@ importers:
specifier: 2.22.2
version: 2.22.2
puppeteer-core:
specifier: ^23.3.0
version: 23.3.0
specifier: ^23.3.1
version: 23.3.1
standalone-electron-types:
specifier: ^1.0.0
version: 1.0.0(patch_hash=cvychuhjtbzvtowhc2efrgpqjq)
@ -210,7 +210,7 @@ importers:
version: 7.5.8
'@typescript-eslint/typescript-estree':
specifier: ^8.5.0
version: 8.5.0(typescript@5.6.2)
version: 8.6.0(typescript@5.6.2)
eslint:
specifier: ^9.10.0
version: 9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)
@ -231,10 +231,10 @@ importers:
version: 55.0.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
eslint-plugin-unused-imports:
specifier: ^4.1.4
version: 4.1.4(@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
version: 4.1.4(@typescript-eslint/eslint-plugin@8.6.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
puppeteer-core:
specifier: ^23.3.0
version: 23.3.0
specifier: ^23.3.1
version: 23.3.1
semver:
specifier: ^7.6.3
version: 7.6.3
@ -728,6 +728,17 @@ packages:
typescript:
optional: true
'@typescript-eslint/eslint-plugin@8.6.0':
resolution: {integrity: sha512-UOaz/wFowmoh2G6Mr9gw60B1mm0MzUtm6Ic8G2yM1Le6gyj5Loi/N+O5mocugRGY+8OeeKmkMmbxNqUCq3B4Sg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
'@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0
eslint: ^8.57.0 || ^9.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
'@typescript-eslint/parser@8.5.0':
resolution: {integrity: sha512-gF77eNv0Xz2UJg/NbpWJ0kqAm35UMsvZf1GHj8D9MRFTj/V3tAciIWXfmPLsAAF/vUlpWPvUDyH1jjsr0cMVWw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@ -738,10 +749,24 @@ packages:
typescript:
optional: true
'@typescript-eslint/parser@8.6.0':
resolution: {integrity: sha512-eQcbCuA2Vmw45iGfcyG4y6rS7BhWfz9MQuk409WD47qMM+bKCGQWXxvoOs1DUp+T7UBMTtRTVT+kXr7Sh4O9Ow==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
'@typescript-eslint/scope-manager@8.5.0':
resolution: {integrity: sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/scope-manager@8.6.0':
resolution: {integrity: sha512-ZuoutoS5y9UOxKvpc/GkvF4cuEmpokda4wRg64JEia27wX+PysIE9q+lzDtlHHgblwUWwo5/Qn+/WyTUvDwBHw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/type-utils@8.5.0':
resolution: {integrity: sha512-N1K8Ix+lUM+cIDhL2uekVn/ZD7TZW+9/rwz8DclQpcQ9rk4sIL5CAlBC0CugWKREmDjBzI/kQqU4wkg46jWLYA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@ -751,10 +776,23 @@ packages:
typescript:
optional: true
'@typescript-eslint/type-utils@8.6.0':
resolution: {integrity: sha512-dtePl4gsuenXVwC7dVNlb4mGDcKjDT/Ropsk4za/ouMBPplCLyznIaR+W65mvCvsyS97dymoBRrioEXI7k0XIg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
'@typescript-eslint/types@8.5.0':
resolution: {integrity: sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/types@8.6.0':
resolution: {integrity: sha512-rojqFZGd4MQxw33SrOy09qIDS8WEldM8JWtKQLAjf/X5mGSeEFh5ixQlxssMNyPslVIk9yzWqXCsV2eFhYrYUw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/typescript-estree@8.5.0':
resolution: {integrity: sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@ -764,16 +802,35 @@ packages:
typescript:
optional: true
'@typescript-eslint/typescript-estree@8.6.0':
resolution: {integrity: sha512-MOVAzsKJIPIlLK239l5s06YXjNqpKTVhBVDnqUumQJja5+Y94V3+4VUFRA0G60y2jNnTVwRCkhyGQpavfsbq/g==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
'@typescript-eslint/utils@8.5.0':
resolution: {integrity: sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
'@typescript-eslint/utils@8.6.0':
resolution: {integrity: sha512-eNp9cWnYf36NaOVjkEUznf6fEgVy1TWpE0o52e4wtojjBx7D1UV2WAWGzR+8Y5lVFtpMLPwNbC67T83DWSph4A==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0
'@typescript-eslint/visitor-keys@8.5.0':
resolution: {integrity: sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/visitor-keys@8.6.0':
resolution: {integrity: sha512-wapVFfZg9H0qOYh4grNVQiMklJGluQrOUiOhYRrQWhx7BY/+I1IYb8BczWNbbUpO+pqy0rDciv3lQH5E1bCLrg==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@vap/core@0.0.12':
resolution: {integrity: sha512-3csHpkE1zUSRTZwl7xIf2uXg1cD4IhhtUm0F6K/dWydc95R5Nj+krB4OTNATuqkewIv/ViCbwjPfkafAgvZQSg==}
@ -1054,8 +1111,8 @@ packages:
supports-color:
optional: true
debug@4.3.6:
resolution: {integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==}
debug@4.3.7:
resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==}
engines: {node: '>=6.0'}
peerDependencies:
supports-color: '*'
@ -1759,9 +1816,6 @@ packages:
ms@2.0.0:
resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==}
ms@2.1.2:
resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
ms@2.1.3:
resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==}
@ -1953,8 +2007,8 @@ packages:
resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==}
engines: {node: '>=6'}
puppeteer-core@23.3.0:
resolution: {integrity: sha512-sB2SsVMFs4gKad5OCdv6w5vocvtEUrRl0zQqSyRPbo/cj1Ktbarmhxy02Zyb9R9HrssBcJDZbkrvBnbaesPyYg==}
puppeteer-core@23.3.1:
resolution: {integrity: sha512-m5gTpITEqqpSgAvPUI/Ch9igh5sNJV+BVVbqQMzqirRDVHDCkLGHaydEQZx2NZvSXdwCFrIV///cpSlX/uD0Sg==}
engines: {node: '>=18'}
q@1.5.1:
@ -2537,7 +2591,7 @@ snapshots:
'@eslint/config-array@0.18.0':
dependencies:
'@eslint/object-schema': 2.1.4
debug: 4.3.6
debug: 4.3.7
minimatch: 3.1.2
transitivePeerDependencies:
- supports-color
@ -2545,7 +2599,7 @@ snapshots:
'@eslint/eslintrc@3.1.0':
dependencies:
ajv: 6.12.6
debug: 4.3.6
debug: 4.3.7
espree: 10.1.0
globals: 14.0.0
ignore: 5.3.2
@ -2664,7 +2718,7 @@ snapshots:
'@puppeteer/browsers@2.4.0':
dependencies:
debug: 4.3.6
debug: 4.3.7
extract-zip: 2.0.1
progress: 2.0.3
proxy-agent: 6.4.0
@ -2679,7 +2733,7 @@ snapshots:
'@stylistic/eslint-plugin@2.8.0(patch_hash=hgabz23qzpdlfvbmkgegp3so3q)(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)':
dependencies:
'@typescript-eslint/utils': 8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)
'@typescript-eslint/utils': 8.6.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)
eslint: 9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)
eslint-visitor-keys: 4.0.0
espree: 10.1.0
@ -2798,29 +2852,86 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/eslint-plugin@8.6.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)':
dependencies:
'@eslint-community/regexpp': 4.11.0
'@typescript-eslint/parser': 8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)
'@typescript-eslint/scope-manager': 8.6.0
'@typescript-eslint/type-utils': 8.6.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)
'@typescript-eslint/utils': 8.6.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)
'@typescript-eslint/visitor-keys': 8.6.0
eslint: 9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)
graphemer: 1.4.0
ignore: 5.3.2
natural-compare: 1.4.0
ts-api-utils: 1.3.0(typescript@5.6.2)
optionalDependencies:
typescript: 5.6.2
transitivePeerDependencies:
- supports-color
optional: true
'@typescript-eslint/eslint-plugin@8.6.0(@typescript-eslint/parser@8.6.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)':
dependencies:
'@eslint-community/regexpp': 4.11.0
'@typescript-eslint/parser': 8.6.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)
'@typescript-eslint/scope-manager': 8.6.0
'@typescript-eslint/type-utils': 8.6.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)
'@typescript-eslint/utils': 8.6.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)
'@typescript-eslint/visitor-keys': 8.6.0
eslint: 9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)
graphemer: 1.4.0
ignore: 5.3.2
natural-compare: 1.4.0
ts-api-utils: 1.3.0(typescript@5.6.2)
optionalDependencies:
typescript: 5.6.2
transitivePeerDependencies:
- supports-color
optional: true
'@typescript-eslint/parser@8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)':
dependencies:
'@typescript-eslint/scope-manager': 8.5.0
'@typescript-eslint/types': 8.5.0
'@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2)
'@typescript-eslint/visitor-keys': 8.5.0
debug: 4.3.6
debug: 4.3.7
eslint: 9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)
optionalDependencies:
typescript: 5.6.2
transitivePeerDependencies:
- supports-color
'@typescript-eslint/parser@8.6.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)':
dependencies:
'@typescript-eslint/scope-manager': 8.6.0
'@typescript-eslint/types': 8.6.0
'@typescript-eslint/typescript-estree': 8.6.0(typescript@5.6.2)
'@typescript-eslint/visitor-keys': 8.6.0
debug: 4.3.7
eslint: 9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)
optionalDependencies:
typescript: 5.6.2
transitivePeerDependencies:
- supports-color
optional: true
'@typescript-eslint/scope-manager@8.5.0':
dependencies:
'@typescript-eslint/types': 8.5.0
'@typescript-eslint/visitor-keys': 8.5.0
'@typescript-eslint/scope-manager@8.6.0':
dependencies:
'@typescript-eslint/types': 8.6.0
'@typescript-eslint/visitor-keys': 8.6.0
'@typescript-eslint/type-utils@8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)':
dependencies:
'@typescript-eslint/typescript-estree': 8.5.0(typescript@5.6.2)
'@typescript-eslint/utils': 8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)
debug: 4.3.6
debug: 4.3.7
ts-api-utils: 1.3.0(typescript@5.6.2)
optionalDependencies:
typescript: 5.6.2
@ -2828,13 +2939,43 @@ snapshots:
- eslint
- supports-color
'@typescript-eslint/type-utils@8.6.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)':
dependencies:
'@typescript-eslint/typescript-estree': 8.6.0(typescript@5.6.2)
'@typescript-eslint/utils': 8.6.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)
debug: 4.3.7
ts-api-utils: 1.3.0(typescript@5.6.2)
optionalDependencies:
typescript: 5.6.2
transitivePeerDependencies:
- eslint
- supports-color
optional: true
'@typescript-eslint/types@8.5.0': {}
'@typescript-eslint/types@8.6.0': {}
'@typescript-eslint/typescript-estree@8.5.0(typescript@5.6.2)':
dependencies:
'@typescript-eslint/types': 8.5.0
'@typescript-eslint/visitor-keys': 8.5.0
debug: 4.3.6
debug: 4.3.7
fast-glob: 3.3.2
is-glob: 4.0.3
minimatch: 9.0.5
semver: 7.6.3
ts-api-utils: 1.3.0(typescript@5.6.2)
optionalDependencies:
typescript: 5.6.2
transitivePeerDependencies:
- supports-color
'@typescript-eslint/typescript-estree@8.6.0(typescript@5.6.2)':
dependencies:
'@typescript-eslint/types': 8.6.0
'@typescript-eslint/visitor-keys': 8.6.0
debug: 4.3.7
fast-glob: 3.3.2
is-glob: 4.0.3
minimatch: 9.0.5
@ -2856,11 +2997,27 @@ snapshots:
- supports-color
- typescript
'@typescript-eslint/utils@8.6.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)':
dependencies:
'@eslint-community/eslint-utils': 4.4.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))
'@typescript-eslint/scope-manager': 8.6.0
'@typescript-eslint/types': 8.6.0
'@typescript-eslint/typescript-estree': 8.6.0(typescript@5.6.2)
eslint: 9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)
transitivePeerDependencies:
- supports-color
- typescript
'@typescript-eslint/visitor-keys@8.5.0':
dependencies:
'@typescript-eslint/types': 8.5.0
eslint-visitor-keys: 3.4.3
'@typescript-eslint/visitor-keys@8.6.0':
dependencies:
'@typescript-eslint/types': 8.6.0
eslint-visitor-keys: 3.4.3
'@vap/core@0.0.12':
dependencies:
eventemitter3: 4.0.7
@ -2879,7 +3036,7 @@ snapshots:
agent-base@7.1.1:
dependencies:
debug: 4.3.6
debug: 4.3.7
transitivePeerDependencies:
- supports-color
@ -3136,9 +3293,9 @@ snapshots:
dependencies:
ms: 2.1.3
debug@4.3.6:
debug@4.3.7:
dependencies:
ms: 2.1.2
ms: 2.1.3
decode-uri-component@0.2.0: {}
@ -3264,8 +3421,8 @@ snapshots:
eslint-plugin-import-x@4.2.1(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2):
dependencies:
'@typescript-eslint/utils': 8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)
debug: 4.3.6
'@typescript-eslint/utils': 8.6.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)
debug: 4.3.7
doctrine: 3.0.0
eslint: 9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)
eslint-import-resolver-node: 0.3.9
@ -3338,11 +3495,17 @@ snapshots:
semver: 7.6.3
strip-indent: 3.0.0
eslint-plugin-unused-imports@4.1.4(@typescript-eslint/eslint-plugin@8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)):
eslint-plugin-unused-imports@4.1.4(@typescript-eslint/eslint-plugin@8.6.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)):
dependencies:
eslint: 9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)
optionalDependencies:
'@typescript-eslint/eslint-plugin': 8.5.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)
'@typescript-eslint/eslint-plugin': 8.6.0(@typescript-eslint/parser@8.5.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)
eslint-plugin-unused-imports@4.1.4(@typescript-eslint/eslint-plugin@8.6.0(@typescript-eslint/parser@8.6.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)):
dependencies:
eslint: 9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi)
optionalDependencies:
'@typescript-eslint/eslint-plugin': 8.6.0(@typescript-eslint/parser@8.6.0(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2))(eslint@9.10.0(patch_hash=wy5a2dwvtxac2ygzwebqqjurgi))(typescript@5.6.2)
eslint-scope@8.0.2:
dependencies:
@ -3369,7 +3532,7 @@ snapshots:
ajv: 6.12.6
chalk: 4.1.2
cross-spawn: 7.0.3
debug: 4.3.6
debug: 4.3.7
escape-string-regexp: 4.0.0
eslint-scope: 8.0.2
eslint-visitor-keys: 4.0.0
@ -3431,7 +3594,7 @@ snapshots:
extract-zip@2.0.1:
dependencies:
debug: 4.3.6
debug: 4.3.7
get-stream: 5.2.0
yauzl: 2.10.0
optionalDependencies:
@ -3538,7 +3701,7 @@ snapshots:
dependencies:
basic-ftp: 5.0.5
data-uri-to-buffer: 6.0.2
debug: 4.3.6
debug: 4.3.7
fs-extra: 11.2.0
transitivePeerDependencies:
- supports-color
@ -3644,14 +3807,14 @@ snapshots:
http-proxy-agent@7.0.2:
dependencies:
agent-base: 7.1.1
debug: 4.3.6
debug: 4.3.7
transitivePeerDependencies:
- supports-color
https-proxy-agent@7.0.4:
dependencies:
agent-base: 7.1.1
debug: 4.3.6
debug: 4.3.7
transitivePeerDependencies:
- supports-color
@ -3883,8 +4046,6 @@ snapshots:
ms@2.0.0: {}
ms@2.1.2: {}
ms@2.1.3: {}
nanoid@3.3.7: {}
@ -3978,7 +4139,7 @@ snapshots:
dependencies:
'@tootallnate/quickjs-emscripten': 0.23.0
agent-base: 7.1.1
debug: 4.3.6
debug: 4.3.7
get-uri: 6.0.3
http-proxy-agent: 7.0.2
https-proxy-agent: 7.0.4
@ -4069,7 +4230,7 @@ snapshots:
proxy-agent@6.4.0:
dependencies:
agent-base: 7.1.1
debug: 4.3.6
debug: 4.3.7
http-proxy-agent: 7.0.2
https-proxy-agent: 7.0.4
lru-cache: 7.18.3
@ -4088,11 +4249,11 @@ snapshots:
punycode@2.1.1: {}
puppeteer-core@23.3.0:
puppeteer-core@23.3.1:
dependencies:
'@puppeteer/browsers': 2.4.0
chromium-bidi: 0.6.5(devtools-protocol@0.0.1330662)
debug: 4.3.6
debug: 4.3.7
devtools-protocol: 0.0.1330662
typed-query-selector: 2.12.0
ws: 8.18.0
@ -4227,7 +4388,7 @@ snapshots:
socks-proxy-agent@8.0.3:
dependencies:
agent-base: 7.1.1
debug: 4.3.6
debug: 4.3.7
socks: 2.8.3
transitivePeerDependencies:
- supports-color
@ -4340,7 +4501,7 @@ snapshots:
cosmiconfig: 9.0.0(typescript@5.6.2)
css-functions-list: 3.2.2
css-tree: 2.3.1
debug: 4.3.6
debug: 4.3.7
fast-glob: 3.3.2
fastest-levenshtein: 1.0.16
file-entry-cache: 9.0.0

View file

@ -0,0 +1,7 @@
# User Voice Show
Shows an indicator when a user is in a Voice Channel
![a preview of the indicator in the user profile](https://github.com/user-attachments/assets/48f825e4-fad5-40d7-bb4f-41d5e595aae0)
![a preview of the indicator in the member list](https://github.com/user-attachments/assets/51be081d-7bbb-45c5-8533-d565228e50c1)

View file

@ -0,0 +1,181 @@
/*
* Vencord, a Discord client mod
* Copyright (c) 2024 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { classNameFactory } from "@api/Styles";
import ErrorBoundary from "@components/ErrorBoundary";
import { classes } from "@utils/misc";
import type { ChannelRecord, Store } from "@vencord/discord-types";
import { findByPropsLazy, findComponentByCodeLazy, findStoreLazy } from "@webpack";
import { ChannelStore, GuildStore, IconUtils, Permissions, PermissionStore, RouterUtils, showToast, Text, Toasts, Tooltip, useCallback, useMemo, UserStore, useStateFromStores } from "@webpack/common";
import type { HTMLAttributes, MouseEvent } from "react";
const cl = classNameFactory("vc-uvs-");
const { selectVoiceChannel } = findByPropsLazy("selectChannel", "selectVoiceChannel");
const VoiceStateStore: Store & Record<string, any> = findStoreLazy("VoiceStateStore");
const UserSummaryItem = findComponentByCodeLazy("defaultRenderUser", "showDefaultAvatarsForNullUsers");
interface IconProps extends HTMLAttributes<HTMLDivElement> {
size?: number;
}
function SpeakerIcon(props: IconProps) {
props.size ??= 16;
return (
<div
{...props}
role={props.onClick != null ? "button" : undefined}
className={classes(cl("speaker"), props.onClick != null ? cl("clickable") : undefined)}
>
<svg
width={props.size}
height={props.size}
viewBox="0 0 24 24"
fill="currentColor"
>
<path d="M12 3a1 1 0 0 0-1-1h-.06a1 1 0 0 0-.74.32L5.92 7H3a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h2.92l4.28 4.68a1 1 0 0 0 .74.32H11a1 1 0 0 0 1-1V3Zm3.1 17.75c-.58.14-1.1-.33-1.1-.92v-.03c0-.5.37-.92.85-1.05a7 7 0 0 0 0-13.5A1.11 1.11 0 0 1 14 4.2v-.03c0-.6.52-1.06 1.1-.92a9 9 0 0 1 0 17.5Zm.06-4.24c-.57.28-1.16-.2-1.16-.83v-.14c0-.43.28-.8.63-1.02a3 3 0 0 0 0-5.04c-.35-.23-.63-.6-.63-1.02v-.14c0-.63.59-1.1 1.16-.83a5 5 0 0 1 0 9.02Z" />
</svg>
</div>
);
}
function LockedSpeakerIcon(props: IconProps) {
props.size ??= 16;
return (
<div
{...props}
role={props.onClick != null ? "button" : undefined}
className={classes(cl("speaker"), props.onClick != null ? cl("clickable") : undefined)}
>
<svg
width={props.size}
height={props.size}
viewBox="0 0 24 24"
fill="currentColor"
>
<path d="M16 4h.5v-.5a2.5 2.5 0 0 1 5 0V4h.5a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Zm4-.5V4h-2v-.5a1 1 0 1 1 2 0ZM11 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1h-.06a1 1 0 0 1-.74-.32L5.92 17H3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h2.92l4.28-4.68a1 1 0 0 1 .74-.32H11Zm9.5 10c-.28 0-.5.22-.52.5a7 7 0 0 1-5.13 6.25c-.48.13-.85.55-.85 1.05v.03c0 .6.52 1.06 1.1.92a9 9 0 0 0 6.89-8.25.48.48 0 0 0-.49-.5h-1Zm-4 0c-.28 0-.5.23-.54.5a3 3 0 0 1-1.33 2.02c-.35.23-.63.6-.63 1.02v.14c0 .63.59 1.1 1.16.83a5 5 0 0 0 2.82-4.01c.02-.28-.2-.5-.48-.5h-1Z" />
</svg>
</div>
);
}
interface VoiceChannelTooltipProps {
channel: ChannelRecord;
}
function VoiceChannelTooltip({ channel }: VoiceChannelTooltipProps) {
const voiceStates = useStateFromStores([VoiceStateStore], () => VoiceStateStore.getVoiceStatesForChannel(channel.id));
const users = useMemo(
() => Object.values<any>(voiceStates).map(voiceState => UserStore.getUser(voiceState.userId)).filter(user => user != null),
[voiceStates]
);
const guild = useMemo(
() => channel.getGuildId() == null ? undefined : GuildStore.getGuild(channel.getGuildId()),
[channel]
);
const guildIcon = useMemo(
() => guild?.icon == null
? undefined
: IconUtils.getGuildIconURL({
id: guild.id,
icon: guild.icon,
size: 30
}),
[guild]
);
return (
<>
{guild != null && (
<div className={cl("guild-name")}>
{guildIcon != null && <img className={cl("guild-icon")} src={guildIcon} alt="" />}
<Text variant="text-sm/bold">{guild.name}</Text>
</div>
)}
<Text variant="text-sm/semibold">{channel.name}</Text>
<div className={cl("vc-members")}>
<SpeakerIcon size={18} />
<UserSummaryItem
users={users}
renderIcon={false}
max={7}
size={18}
/>
</div>
</>
);
}
// Must export to avoid TS4082, since VoiceChannelIndicator is used in the default export of './index.tsx'.
export interface VoiceChannelIndicatorProps {
userId: string;
}
const clickTimers: Record<string, any> = {};
export const VoiceChannelIndicator = ErrorBoundary.wrap(({ userId }: VoiceChannelIndicatorProps) => {
const channelId = useStateFromStores(
[VoiceStateStore],
() => VoiceStateStore.getVoiceStateForUser(userId)?.channelId
);
const channel = useMemo(
() => channelId == null ? undefined : ChannelStore.getChannel(channelId),
[channelId]
);
const onClick = useCallback((e: MouseEvent) => {
e.preventDefault();
e.stopPropagation();
if (channel == null || channelId == null) return;
if (!PermissionStore.can(Permissions.VIEW_CHANNEL, channel)) {
showToast("You cannot view the user's Voice Channel", Toasts.Type.FAILURE);
return;
}
clearTimeout(clickTimers[channelId]);
delete clickTimers[channelId];
if (e.detail > 1) {
if (!PermissionStore.can(Permissions.CONNECT, channel)) {
showToast("You cannot join the user's Voice Channel", Toasts.Type.FAILURE);
return;
}
selectVoiceChannel(channelId);
} else {
clickTimers[channelId] = setTimeout(() => {
RouterUtils.transitionTo(`/channels/${channel.getGuildId() ?? "@me"}/${channelId}`);
delete clickTimers[channelId];
}, 250);
}
}, [channelId]);
const isLocked = useMemo(
() => !PermissionStore.can(Permissions.VIEW_CHANNEL, channel) ||
!PermissionStore.can(Permissions.CONNECT, channel),
[channelId]
);
if (channel == null) return null;
return (
<Tooltip
text={<VoiceChannelTooltip channel={channel} />}
tooltipClassName={cl("tooltip-container")}
>
{props =>
isLocked ?
<LockedSpeakerIcon {...props} onClick={onClick} />
: <SpeakerIcon {...props} onClick={onClick} />
}
</Tooltip>
);
}, { noop: true });

View file

@ -1,27 +0,0 @@
.vc-uvs-button > div {
white-space: normal !important;
}
.vc-uvs-button {
width: 100%;
margin: auto;
height: unset;
}
.vc-uvs-header {
color: var(--header-primary);
margin-bottom: 6px;
}
.vc-uvs-modal-margin {
margin: 0 12px;
}
.vc-uvs-modal-margin div {
margin-bottom: 0 !important;
}
.vc-uvs-popout-margin-self > [class^="section"] {
padding-top: 0;
padding-bottom: 12px;
}

View file

@ -1,59 +0,0 @@
/*
* Vencord, a modification for Discord's desktop app
* Copyright (c) 2023 Vendicated and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import "./VoiceChannelSection.css";
import type { ChannelRecord } from "@vencord/discord-types";
import { findByPropsLazy } from "@webpack";
import { Button, Forms, Permissions, PermissionStore, Toasts } from "@webpack/common";
const SelectedChannelActionCreators = findByPropsLazy("selectChannel", "selectVoiceChannel");
interface VoiceChannelFieldProps {
channel: ChannelRecord;
label: string;
showHeader: boolean;
}
export const VoiceChannelSection = ({ channel, label, showHeader }: VoiceChannelFieldProps) => (
// @TODO The div is supposed to be a UserPopoutSection
<div>
{showHeader && <Forms.FormTitle className="vc-uvs-header">In a voice channel</Forms.FormTitle>}
<Button
className="vc-uvs-button"
color={Button.Colors.TRANSPARENT}
size={Button.Sizes.SMALL}
onClick={() => {
if (PermissionStore.can(Permissions.CONNECT, channel))
SelectedChannelActionCreators.selectVoiceChannel(channel.id);
else
Toasts.show({
message: "Insufficient permissions to enter the channel.",
id: "user-voice-show-insufficient-permissions",
type: Toasts.Type.FAILURE,
options: {
position: Toasts.Position.BOTTOM,
}
});
}}
>
{label}
</Button>
</div>
);

View file

@ -16,85 +16,86 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import "./style.css";
import { addDecorator, removeDecorator } from "@api/MemberListDecorators";
import { definePluginSettings } from "@api/Settings";
import ErrorBoundary from "@components/ErrorBoundary";
import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types";
import type { Store, UserRecord } from "@vencord/discord-types";
import { findStoreLazy } from "@webpack";
import { ChannelStore, GuildStore, UserStore } from "@webpack/common";
import { VoiceChannelSection } from "./components/VoiceChannelSection";
const VoiceStateStore: Store & Record<string, any> = findStoreLazy("VoiceStateStore");
import { VoiceChannelIndicator } from "./components";
const settings = definePluginSettings({
showInUserProfileModal: {
type: OptionType.BOOLEAN,
description: "Show a user's voice channel in their profile modal",
description: "Show a user's Voice Channel indicator in their profile next to the name",
default: true,
restartNeeded: true
},
showVoiceChannelSectionHeader: {
showInVoiceMemberList: {
type: OptionType.BOOLEAN,
description: 'Whether to show "IN A VOICE CHANNEL" above the join button',
description: "Show a user's Voice Channel indicator in the member and DMs list",
default: true,
restartNeeded: true
}
});
interface UserProps {
user: UserRecord;
}
const VoiceChannelField = ErrorBoundary.wrap(({ user }: UserProps) => {
const { channelId } = VoiceStateStore.getVoiceStateForUser(user.id) ?? {};
if (!channelId) return null;
const channel = ChannelStore.getChannel(channelId);
if (!channel) return null;
const guild = GuildStore.getGuild(channel.guild_id);
if (!guild) return null; // When in DM call
const result = `${guild.name} | ${channel.name}`;
return (
<VoiceChannelSection
channel={channel}
label={result}
showHeader={settings.store.showVoiceChannelSectionHeader}
/>
);
});
export default definePlugin({
name: "UserVoiceShow",
description: "Shows whether a User is currently in a voice channel somewhere in their profile",
authors: [Devs.LordElias],
description: "Shows an indicator when a user is in a Voice Channel",
authors: [Devs.LordElias, Devs.Nuckyz],
settings,
patchModal({ user }: UserProps) {
if (!settings.store.showInUserProfileModal)
return null;
return (
<div className="vc-uvs-modal-margin">
<VoiceChannelField user={user} />
</div>
);
},
patchProfilePopout: ({ user }: UserProps) => {
const isMe = user.id === UserStore.getCurrentUser()!.id;
return (
<div className={isMe ? "vc-uvs-popout-margin-self" : ""}>
<VoiceChannelField user={user} />
</div>
);
},
patches: [
// @TODO Maybe patch UserVoiceShow in simplified profile popout
// @TODO Patch new profile modal
// User Popout, Full Size Profile, Direct Messages Side Profile
{
find: ".Messages.USER_PROFILE_LOAD_ERROR",
replacement: {
match: /(\.fetchError.+?\?)null/,
replace: (_, rest) => `${rest}$self.VoiceChannelIndicator({userId:arguments[0]?.userId})`
},
predicate: () => settings.store.showInUserProfileModal
},
// To use without the MemberList decorator API
/* // Guild Members List
{
find: ".lostPermission)",
replacement: {
match: /\.lostPermission\).+?(?=avatar:)/,
replace: "$&children:[$self.VoiceChannelIndicator({userId:arguments[0]?.user?.id})],"
},
predicate: () => settings.store.showVoiceChannelIndicator
},
// Direct Messages List
{
find: "PrivateChannel.renderAvatar",
replacement: {
match: /\.Messages\.CLOSE_DM.+?}\)(?=])/,
replace: "$&,$self.VoiceChannelIndicator({userId:arguments[0]?.user?.id})"
},
predicate: () => settings.store.showVoiceChannelIndicator
}, */
// Friends List
{
find: ".avatar,animate:",
replacement: {
match: /\.subtext,children:.+?}\)\]}\)(?=])/,
replace: "$&,$self.VoiceChannelIndicator({userId:arguments[0]?.user?.id})"
},
predicate: () => settings.store.showInVoiceMemberList
}
],
start() {
if (settings.store.showInVoiceMemberList) {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
addDecorator("UserVoiceShow", ({ user }) => user == null ? null : <VoiceChannelIndicator userId={user.id} />);
}
},
stop() {
removeDecorator("UserVoiceShow");
},
VoiceChannelIndicator
});

View file

@ -0,0 +1,37 @@
.vc-uvs-speaker {
color: var(--interactive-normal);
padding: 0 4px;
display: flex;
align-items: center;
justify-content: center;
}
.vc-uvs-clickable {
cursor: pointer;
}
.vc-uvs-clickable:hover {
color: var(--interactive-hover);
}
.vc-uvs-tooltip-container {
max-width: 200px;
}
.vc-uvs-guild-name {
display: flex;
align-items: center;
gap: 8px;
}
.vc-uvs-guild-icon {
border-radius: 100%;
align-self: center;
}
.vc-uvs-vc-members {
display: flex;
margin: 8px 0;
flex-direction: row;
gap: 6px;
}