Merge branch 'dev'

This commit is contained in:
thororen1234 2025-03-04 08:36:27 -05:00
commit bd33013f44
No known key found for this signature in database
28 changed files with 19113 additions and 302 deletions

View file

@ -16,7 +16,7 @@ permissions: write-all
jobs:
Build:
name: Build Equicord
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- uses: actions/checkout@v4

View file

@ -11,12 +11,38 @@ on:
jobs:
codeberg:
name: Sync Codeberg and Github
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pixta-dev/repository-mirroring-action@674e65a7d483ca28dafaacba0d07351bdcc8bd75 # v1.1.1
with:
target_repo_url: "git@codeberg.org:thororen/Equicord.git"
- name: Set up SSH private key
run: |
mkdir -p ~/.ssh
echo "${{ env.ssh_private_key }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
env:
ssh_private_key: ${{ secrets.CODEBERG }}
- name: Add SSH known host
run: |
mkdir -p ~/.ssh
ssh-keyscan -t rsa codeberg.org >> ~/.ssh/known_hosts
- name: Set up SSH username
run: |
export GIT_SSH_COMMAND="ssh -v -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no -l git"
- name: Add remote mirror and push
run: |
if git remote get-url mirror > /dev/null 2>&1; then
git remote remove mirror
fi
git remote add mirror "${{ env.target_repo_url}}"
git fetch --unshallow
git push --tags --force --prune mirror "refs/remotes/origin/*:refs/heads/*"
env:
target_repo_url: "git@codeberg.org:thororen/Equicord.git"
- name: Clean up
run: git remote remove mirror

View file

@ -17,7 +17,7 @@ on:
jobs:
TestPlugins:
name: Test Patches
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
@ -39,6 +39,8 @@ jobs:
- name: Install dependencies
run: |
pnpm install --no-frozen-lockfile
sudo apt update
sudo apt-get install ca-certificates fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils -y
- name: Install Google Chrome
id: setup-chrome

View file

@ -13,7 +13,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- name: Sync Vencord Dev
id: sync

View file

@ -13,7 +13,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
runs-on: self-hosted
steps:
- name: Sync Vencord Main
id: sync

View file

@ -53,6 +53,7 @@ You can join our [discord server](https://discord.gg/5Xh2W87egW) for commits, ch
- FakeProfileThemesAndEffects by ryan
- FindReply by newwares
- FixFileExtensions by thororen
- FollowVoiceUser by TheArmagan
- FrequentQuickSwitcher by Samwich
- FriendshipRanks by Samwich
- FullVcPfp by mochie
@ -185,6 +186,8 @@ MacOS
- [GUI](https://github.com/Equicord/Equilotl/releases/latest/download/Equilotl.MacOS.zip)
Linux
- [GUI-X11](https://github.com/Equicord/Equilotl/releases/latest/download/Equilotl-x11)
- [GUI-Wayland](https://github.com/Equicord/Equilotl/releases/latest/download/Equilotl-wayland)
- [CLI](https://github.com/Equicord/Equilotl/releases/latest/download/EquilotlCli-Linux)
- [AUR](https://aur.archlinux.org/packages?O=0&K=equicord)
```shell
@ -215,7 +218,7 @@ cd Equicord
Install dependencies:
```shell
pnpm install --frozen-lockfile
pnpm install --no-frozen-lockfile
```
Build Equicord:

18735
misc/keys-mapping.json Normal file

File diff suppressed because it is too large Load diff

110
pnpm-lock.yaml generated
View file

@ -6,10 +6,10 @@ settings:
patchedDependencies:
'@types/less@3.0.6':
hash: krcufrsfhsuxuoj7hocqugs6zi
hash: 641e6c93bb737bac7fc283416857bd095cd85bcbcba63becb7a8bbcc78f73076
path: patches/@types__less@3.0.6.patch
eslint@9.20.1:
hash: xm46kqcmdgzlmm4aifkfpxaho4
hash: 4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215
path: patches/eslint@9.20.1.patch
importers:
@ -30,7 +30,7 @@ importers:
version: 0.3.5
'@types/less':
specifier: ^3.0.6
version: 3.0.6(patch_hash=krcufrsfhsuxuoj7hocqugs6zi)
version: 3.0.6(patch_hash=641e6c93bb737bac7fc283416857bd095cd85bcbcba63becb7a8bbcc78f73076)
'@types/stylus':
specifier: ^0.48.42
version: 0.48.42
@ -79,7 +79,7 @@ importers:
version: 3.2.10
'@stylistic/eslint-plugin':
specifier: ^4.0.0
version: 4.0.0(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3)
version: 4.0.0(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3)
'@types/chrome':
specifier: ^0.0.304
version: 0.0.304
@ -112,22 +112,22 @@ importers:
version: 0.25.0
eslint:
specifier: ^9.20.1
version: 9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)
version: 9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)
eslint-import-resolver-alias:
specifier: ^1.1.2
version: 1.1.2(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3))(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)))
version: 1.1.2(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3))(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)))
eslint-plugin-react:
specifier: ^7.37.3
version: 7.37.4(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))
version: 7.37.4(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))
eslint-plugin-simple-header:
specifier: ^1.2.1
version: 1.2.2(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))
version: 1.2.2(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))
eslint-plugin-simple-import-sort:
specifier: ^12.1.1
version: 12.1.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))
version: 12.1.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))
eslint-plugin-unused-imports:
specifier: ^4.1.4
version: 4.1.4(@typescript-eslint/eslint-plugin@8.24.1(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3))(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3))(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))
version: 4.1.4(@typescript-eslint/eslint-plugin@8.24.1(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3))(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3))(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))
highlight.js:
specifier: 11.11.1
version: 11.11.1
@ -169,7 +169,7 @@ importers:
version: 5.7.3
typescript-eslint:
specifier: ^8.19.0
version: 8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3)
version: 8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3)
typescript-transform-paths:
specifier: ^3.5.3
version: 3.5.3(typescript@5.7.3)
@ -2887,9 +2887,9 @@ snapshots:
'@esbuild/win32-x64@0.25.0':
optional: true
'@eslint-community/eslint-utils@4.4.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))':
'@eslint-community/eslint-utils@4.4.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))':
dependencies:
eslint: 9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)
eslint: 9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)
eslint-visitor-keys: 3.4.3
'@eslint-community/regexpp@4.12.1': {}
@ -3013,10 +3013,10 @@ snapshots:
'@socket.io/component-emitter@3.1.2': {}
'@stylistic/eslint-plugin@4.0.0(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3)':
'@stylistic/eslint-plugin@4.0.0(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3)':
dependencies:
'@typescript-eslint/utils': 8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3)
eslint: 9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)
'@typescript-eslint/utils': 8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3)
eslint: 9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)
eslint-visitor-keys: 4.2.0
espree: 10.3.0
estraverse: 5.3.0
@ -3061,7 +3061,7 @@ snapshots:
dependencies:
'@types/node': 22.13.4
'@types/less@3.0.6(patch_hash=krcufrsfhsuxuoj7hocqugs6zi)': {}
'@types/less@3.0.6(patch_hash=641e6c93bb737bac7fc283416857bd095cd85bcbcba63becb7a8bbcc78f73076)': {}
'@types/lodash@4.17.15': {}
@ -3123,15 +3123,15 @@ snapshots:
dependencies:
'@types/node': 22.13.4
'@typescript-eslint/eslint-plugin@8.24.1(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3))(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3)':
'@typescript-eslint/eslint-plugin@8.24.1(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3))(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3)':
dependencies:
'@eslint-community/regexpp': 4.12.1
'@typescript-eslint/parser': 8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3)
'@typescript-eslint/parser': 8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3)
'@typescript-eslint/scope-manager': 8.24.1
'@typescript-eslint/type-utils': 8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3)
'@typescript-eslint/utils': 8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3)
'@typescript-eslint/type-utils': 8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3)
'@typescript-eslint/utils': 8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3)
'@typescript-eslint/visitor-keys': 8.24.1
eslint: 9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)
eslint: 9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)
graphemer: 1.4.0
ignore: 5.3.1
natural-compare: 1.4.0
@ -3140,14 +3140,14 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3)':
'@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3)':
dependencies:
'@typescript-eslint/scope-manager': 8.24.1
'@typescript-eslint/types': 8.24.1
'@typescript-eslint/typescript-estree': 8.24.1(typescript@5.7.3)
'@typescript-eslint/visitor-keys': 8.24.1
debug: 4.4.0
eslint: 9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)
eslint: 9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)
typescript: 5.7.3
transitivePeerDependencies:
- supports-color
@ -3157,12 +3157,12 @@ snapshots:
'@typescript-eslint/types': 8.24.1
'@typescript-eslint/visitor-keys': 8.24.1
'@typescript-eslint/type-utils@8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3)':
'@typescript-eslint/type-utils@8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3)':
dependencies:
'@typescript-eslint/typescript-estree': 8.24.1(typescript@5.7.3)
'@typescript-eslint/utils': 8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3)
'@typescript-eslint/utils': 8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3)
debug: 4.4.0
eslint: 9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)
eslint: 9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)
ts-api-utils: 2.0.1(typescript@5.7.3)
typescript: 5.7.3
transitivePeerDependencies:
@ -3184,13 +3184,13 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@typescript-eslint/utils@8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3)':
'@typescript-eslint/utils@8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3)':
dependencies:
'@eslint-community/eslint-utils': 4.4.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))
'@eslint-community/eslint-utils': 4.4.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))
'@typescript-eslint/scope-manager': 8.24.1
'@typescript-eslint/types': 8.24.1
'@typescript-eslint/typescript-estree': 8.24.1(typescript@5.7.3)
eslint: 9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)
eslint: 9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)
typescript: 5.7.3
transitivePeerDependencies:
- supports-color
@ -3816,9 +3816,9 @@ snapshots:
optionalDependencies:
source-map: 0.6.1
eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3))(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))):
eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3))(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))):
dependencies:
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3))(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3))(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))
eslint-import-resolver-node@0.3.9:
dependencies:
@ -3828,17 +3828,17 @@ snapshots:
transitivePeerDependencies:
- supports-color
eslint-module-utils@2.12.0(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)):
eslint-module-utils@2.12.0(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)):
dependencies:
debug: 3.2.7
optionalDependencies:
'@typescript-eslint/parser': 8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3)
eslint: 9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)
'@typescript-eslint/parser': 8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3)
eslint: 9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)
eslint-import-resolver-node: 0.3.9
transitivePeerDependencies:
- supports-color
eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3))(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)):
eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3))(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)):
dependencies:
'@rtsao/scc': 1.1.0
array-includes: 3.1.8
@ -3847,9 +3847,9 @@ snapshots:
array.prototype.flatmap: 1.3.3
debug: 3.2.7
doctrine: 2.1.0
eslint: 9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)
eslint: 9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)
eslint-import-resolver-node: 0.3.9
eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))
eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3))(eslint-import-resolver-node@0.3.9)(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))
hasown: 2.0.2
is-core-module: 2.16.1
is-glob: 4.0.3
@ -3861,13 +3861,13 @@ snapshots:
string.prototype.trimend: 1.0.9
tsconfig-paths: 3.15.0
optionalDependencies:
'@typescript-eslint/parser': 8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3)
'@typescript-eslint/parser': 8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3)
transitivePeerDependencies:
- eslint-import-resolver-typescript
- eslint-import-resolver-webpack
- supports-color
eslint-plugin-react@7.37.4(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)):
eslint-plugin-react@7.37.4(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)):
dependencies:
array-includes: 3.1.8
array.prototype.findlast: 1.2.5
@ -3875,7 +3875,7 @@ snapshots:
array.prototype.tosorted: 1.1.4
doctrine: 2.1.0
es-iterator-helpers: 1.2.1
eslint: 9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)
eslint: 9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)
estraverse: 5.3.0
hasown: 2.0.2
jsx-ast-utils: 3.3.5
@ -3889,19 +3889,19 @@ snapshots:
string.prototype.matchall: 4.0.12
string.prototype.repeat: 1.0.0
eslint-plugin-simple-header@1.2.2(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)):
eslint-plugin-simple-header@1.2.2(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)):
dependencies:
eslint: 9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)
eslint: 9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)
eslint-plugin-simple-import-sort@12.1.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)):
eslint-plugin-simple-import-sort@12.1.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)):
dependencies:
eslint: 9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)
eslint: 9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)
eslint-plugin-unused-imports@4.1.4(@typescript-eslint/eslint-plugin@8.24.1(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3))(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3))(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)):
eslint-plugin-unused-imports@4.1.4(@typescript-eslint/eslint-plugin@8.24.1(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3))(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3))(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)):
dependencies:
eslint: 9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)
eslint: 9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)
optionalDependencies:
'@typescript-eslint/eslint-plugin': 8.24.1(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3))(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3)
'@typescript-eslint/eslint-plugin': 8.24.1(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3))(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3)
eslint-scope@8.2.0:
dependencies:
@ -3912,9 +3912,9 @@ snapshots:
eslint-visitor-keys@4.2.0: {}
eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4):
eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215):
dependencies:
'@eslint-community/eslint-utils': 4.4.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))
'@eslint-community/eslint-utils': 4.4.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))
'@eslint-community/regexpp': 4.12.1
'@eslint/config-array': 0.19.2
'@eslint/core': 0.11.0
@ -5268,12 +5268,12 @@ snapshots:
typed-query-selector@2.12.0: {}
typescript-eslint@8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3):
typescript-eslint@8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3):
dependencies:
'@typescript-eslint/eslint-plugin': 8.24.1(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3))(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3)
'@typescript-eslint/parser': 8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3)
'@typescript-eslint/utils': 8.24.1(eslint@9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.7.3)
eslint: 9.20.1(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)
'@typescript-eslint/eslint-plugin': 8.24.1(@typescript-eslint/parser@8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3))(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3)
'@typescript-eslint/parser': 8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3)
'@typescript-eslint/utils': 8.24.1(eslint@9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215))(typescript@5.7.3)
eslint: 9.20.1(patch_hash=4f22e92770bf528b2448fbec0984b9c0761dd588ed0e83dcc41edfc9af711215)
typescript: 5.7.3
transitivePeerDependencies:
- supports-color

View file

@ -32,7 +32,7 @@ export default function DonateButton({
{...props}
look={look}
color={color}
onClick={() => VencordNative.native.openExternal("https://github.com/sponsors/verticalsync")}
onClick={() => VencordNative.native.openExternal("https://ko-fi.com/authenticators")}
innerClassName="vc-donate-button"
>
<Heart />

View file

@ -16,13 +16,21 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import "@equicordplugins/_misc/styles.css";
import { EquicordDevs } from "@utils/constants";
import definePlugin from "@utils/types";
import { Forms } from "@webpack/common";
export default definePlugin({
name: "EquicordHelper",
description: "Fixes some misc issues with discord",
authors: [EquicordDevs.thororen, EquicordDevs.nyx],
settingsAboutComponent: () => <>
<Forms.FormText className="plugin-warning">
This Plugin is used for fixing misc issues with discord such as some crashes
</Forms.FormText>
</>,
required: true,
patches: [
{

View file

@ -1,4 +1,4 @@
.quests-warning{
.plugin-warning {
font-size: 16px !important;
background-color: var(--info-warning-background) !important;
color: var(--info-warning-text) !important;

View file

@ -0,0 +1,119 @@
/*
* Vencord, a Discord client mod
* Copyright (c) 2025 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import "@equicordplugins/_misc/styles.css";
import { NavContextMenuPatchCallback } from "@api/ContextMenu";
import { definePluginSettings } from "@api/Settings";
import { EquicordDevs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types";
import { findByPropsLazy, findStoreLazy } from "@webpack";
import { Forms, Menu, React } from "@webpack/common";
import { VoiceState } from "@webpack/types";
import { Channel, User } from "discord-types/general";
type TFollowedUserInfo = {
lastChannelId: string;
userId: string;
} | null;
interface UserContextProps {
channel: Channel;
user: User;
guildId?: string;
}
let followedUserInfo: TFollowedUserInfo = null;
const voiceChannelAction = findByPropsLazy("selectVoiceChannel");
const VoiceStateStore = findStoreLazy("VoiceStateStore");
const UserStore = findStoreLazy("UserStore");
const RelationshipStore = findStoreLazy("RelationshipStore");
const settings = definePluginSettings({
onlyWhenInVoice: {
type: OptionType.BOOLEAN,
default: true,
description: "Only follow the user when you are in a voice channel"
},
leaveWhenUserLeaves: {
type: OptionType.BOOLEAN,
default: false,
description: "Leave the voice channel when the user leaves. (That can cause you to sometimes enter infinite leave/join loop)"
}
});
const UserContextMenuPatch: NavContextMenuPatchCallback = (children, { channel, user }: UserContextProps) => {
if (UserStore.getCurrentUser().id === user.id || !RelationshipStore.getFriendIDs().includes(user.id)) return;
const [checked, setChecked] = React.useState(followedUserInfo?.userId === user.id);
children.push(
<Menu.MenuSeparator />,
<Menu.MenuCheckboxItem
id="fvu-follow-user"
label="Follow User"
checked={checked}
action={() => {
if (followedUserInfo?.userId === user.id) {
followedUserInfo = null;
setChecked(false);
return;
}
followedUserInfo = {
lastChannelId: UserStore.getCurrentUser().id,
userId: user.id
};
setChecked(true);
}}
></Menu.MenuCheckboxItem>
);
};
export default definePlugin({
name: "FollowVoiceUser",
description: "Follow a friend in voice chat.",
authors: [EquicordDevs.TheArmagan],
settings,
settingsAboutComponent: () => <>
<Forms.FormText className="plugin-warning">
This Plugin is used to follow a Friend/Friends into voice chat(s).
</Forms.FormText>
</>,
flux: {
async VOICE_STATE_UPDATES({ voiceStates }: { voiceStates: VoiceState[]; }) {
if (!followedUserInfo) return;
if (!RelationshipStore.getFriendIDs().includes(followedUserInfo.userId)) return;
if (
settings.store.onlyWhenInVoice
&& VoiceStateStore.getVoiceStateForUser(UserStore.getCurrentUser().id) === null
) return;
voiceStates.forEach(voiceState => {
if (
voiceState.userId === followedUserInfo!.userId
&& voiceState.channelId
&& voiceState.channelId !== followedUserInfo!.lastChannelId
) {
followedUserInfo!.lastChannelId = voiceState.channelId;
voiceChannelAction.selectVoiceChannel(followedUserInfo!.lastChannelId);
} else if (
voiceState.userId === followedUserInfo!.userId
&& !voiceState.channelId
&& settings.store.leaveWhenUserLeaves
) {
voiceChannelAction.selectVoiceChannel(null);
}
});
}
},
contextMenus: {
"user-context": UserContextMenuPatch
}
});

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import "./style.css";
import "@equicordplugins/_misc/styles.css";
import { EquicordDevs } from "@utils/constants";
import definePlugin from "@utils/types";
@ -27,7 +27,7 @@ export default definePlugin({
description: "Prevents in-call/PiP previews (screenshare, streams, etc) from pausing even if the client loses focus",
authors: [EquicordDevs.vappstar],
settingsAboutComponent: () => <>
<Forms.FormText className="platform-warning">
<Forms.FormText className="plugin-warning">
This plugin will cause discord to use more resources than normal
</Forms.FormText>
</>,

View file

@ -1,11 +0,0 @@
.platform-warning {
font-size: 16px !important;
background-color: rgb(240 71 71 / 10%);
color: rgb(240 71 71) !important;
border: 1px solid rgb(240 71 71 / 60%) !important;
border-radius: 5px !important;
font-weight: bold;
padding: 6px 10px;
text-align: center;
margin-top: 10px;
}

View file

@ -39,11 +39,13 @@ export default definePlugin({
authors: [EquicordDevs.thororen],
patches: [
{
find: "ProductCatalog",
replacement: {
match: /\i\.warn\("Cannot find the corresponding SKU to the user's premium type "\.concat\(\i\.premiumType\)\),/,
replace: ""
}
find: "#{intl::USER_PROFILE_ENTRY_POINTS_AMP_UP_YOUR_PROFILE}",
replacement: [
{
match: /}\);return \i\?.*?}\)}}/,
replace: "});return null}}"
}
],
}
],
start() {

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import "./style.css";
import "@equicordplugins/_misc/styles.css";
import { definePluginSettings } from "@api/Settings";
import { EquicordDevs } from "@utils/constants";
@ -43,7 +43,7 @@ export default definePlugin({
description: "Spoof what platform or device you're on",
authors: [EquicordDevs.Drag],
settingsAboutComponent: () => <>
<Forms.FormText className="platform-warning">
<Forms.FormText className="plugin-warning">
We can't guarantee this plugin won't get you warned or banned.
</Forms.FormText>
</>,

View file

@ -1,11 +0,0 @@
.platform-warning {
font-size: 16px !important;
background-color: rgb(240 71 71 / 10%);
color: rgb(240 71 71) !important;
border: 1px solid rgb(240 71 71 / 60%) !important;
border-radius: 5px !important;
font-weight: bold;
padding: 6px 10px;
text-align: center;
margin-top: 10px;
}

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import "./style.css";
import "@equicordplugins/_misc/styles.css";
import { ApplicationCommandInputType, ApplicationCommandOptionType, findOption, sendBotMessage } from "@api/Commands";
import { Devs, EquicordDevs } from "@utils/constants";
@ -48,7 +48,7 @@ export default definePlugin({
description: "Purges messages from a channel",
authors: [EquicordDevs.bhop, Devs.nyx],
settingsAboutComponent: () => <>
<Forms.FormText className="purge-warning">
<Forms.FormText className="plugin-warning">
We can't guarantee this plugin won't get you warned or banned.
</Forms.FormText>
</>,

View file

@ -1,11 +0,0 @@
.purge-warning {
font-size: 16px !important;
background-color: rgb(240 71 71 / 10%) !important;
color: rgb(240 71 71) !important;
border: 1px solid rgb(240 71 71 / 60%) !important;
border-radius: 5px !important;
font-weight: bold;
padding: 6px 10px;
text-align: center;
margin-top: 10px;
}

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import "./style.css";
import "@equicordplugins/_misc/styles.css";
import { showNotification } from "@api/Notifications";
import ErrorBoundary from "@components/ErrorBoundary";
@ -229,7 +229,7 @@ export default definePlugin({
description: "A plugin to complete quests without having the game installed.",
authors: [Devs.amia],
settingsAboutComponent: () => <>
<Forms.FormText className="quests-warning">
<Forms.FormText className="plugin-warning">
Game Quests do not work on Equibop/Web Platforms. Only Video Quests do.
</Forms.FormText>
</>,

View file

@ -18,7 +18,7 @@
import "./style.css";
import { definePluginSettings, Settings } from "@api/Settings";
import { definePluginSettings } from "@api/Settings";
import { getUserSettingLazy } from "@api/UserSettings";
import ErrorBoundary from "@components/ErrorBoundary";
import { EquicordDevs } from "@utils/constants";
@ -125,13 +125,8 @@ const RenderStatusMenuItem = ({ status, update, disabled }: { status: DiscordSta
const StatusSubMenuComponent = () => {
let premiumType;
if (Settings.plugins.NoNitroUpsell?.enabled) {
// @ts-ignore
premiumType = UserStore?.getCurrentUser()?._realPremiumType ?? UserStore?.getCurrentUser()?.premiumType ?? 0;
} else {
premiumType = UserStore?.getCurrentUser()?.premiumType ?? 0;
}
// @ts-ignore
const premiumType = UserStore?.getCurrentUser()?._realPremiumType ?? UserStore?.getCurrentUser()?.premiumType ?? 0;
const update = useForceUpdater();
return <Menu.Menu navId="sp-custom-status-submenu" onClose={() => { }}>
{Object.entries((settings.store.StatusPresets as { [k: string]: DiscordStatus | undefined; })).map(([index, status]) => status != null ? <Menu.MenuItem

View file

@ -10,7 +10,6 @@ import { Margins } from "@utils/margins";
import { wordsToTitle } from "@utils/text";
import definePlugin, {
OptionType,
PluginOptionsItem,
} from "@utils/types";
import { findByPropsLazy } from "@webpack";
import {
@ -232,10 +231,9 @@ const settings = definePluginSettings({
export default definePlugin({
name: "VcNarratorCustom",
description:
"Announces when users join, leave, or move voice channels via narrator. TikTok TTS version; speechSynthesis is pretty boring. Ported from https://github.com/Loukious/Vencord",
description: "Announces when users join, leave, or move voice channels via narrator. TikTok TTS version; speechSynthesis is pretty boring. Ported from https://github.com/Loukious/Vencord",
authors: [Devs.Ven, Devs.Nyako, EquicordDevs.Loukios, EquicordDevs.examplegit],
settings,
flux: {
VOICE_STATE_UPDATES({ voiceStates }: { voiceStates: VoiceState[]; }) {
const myGuildId = SelectedGuildStore.getGuildId();
@ -297,13 +295,10 @@ export default definePlugin({
},
},
optionsCache: null as Record<string, PluginOptionsItem> | null,
settings,
settingsAboutComponent({ tempSettings: s }) {
const types = useMemo(
() =>
Object.keys(settings.store)
Object.keys(settings.store!)
.filter(k => k.endsWith("Message"))
.map(k => k.slice(0, -7)),
[]

View file

@ -17,7 +17,7 @@
*/
import { addMessagePreEditListener, addMessagePreSendListener, removeMessagePreEditListener, removeMessagePreSendListener } from "@api/MessageEvents";
import { definePluginSettings, Settings } from "@api/Settings";
import { definePluginSettings } from "@api/Settings";
import { Devs } from "@utils/constants";
import { ApngBlendOp, ApngDisposeOp, importApngJs } from "@utils/dependencies";
import { getCurrentGuild, getEmojiURL } from "@utils/discord";
@ -30,13 +30,8 @@ import type { Message } from "discord-types/general";
import { applyPalette, GIFEncoder, quantize } from "gifenc";
import type { ReactElement, ReactNode } from "react";
let premiumType;
if (Settings.plugins.NoNitroUpsell?.enabled) {
// @ts-ignore
premiumType = UserStore?.getCurrentUser()?._realPremiumType ?? UserStore?.getCurrentUser()?.premiumType ?? 0;
} else {
premiumType = UserStore?.getCurrentUser()?.premiumType ?? 0;
}
// @ts-ignore
const premiumType = UserStore?.getCurrentUser()?._realPremiumType ?? UserStore?.getCurrentUser()?.premiumType ?? 0;
const StickerStore = findStoreLazy("StickersStore") as {
getPremiumPacks(): StickerPack[];

View file

@ -77,6 +77,11 @@ const settings = definePluginSettings({
description: "Show all channels automatically",
type: OptionType.BOOLEAN,
default: true
},
mobilePush: {
description: "Mute Mobile Push Notifications automatically",
type: OptionType.BOOLEAN,
default: true
}
});
@ -99,6 +104,7 @@ function applyDefaultSettings(guildId: string | null) {
updateGuildNotificationSettings(guildId,
{
muted: settings.store.guild,
mobile_push: !settings.store.mobilePush,
suppress_everyone: settings.store.everyone,
suppress_roles: settings.store.role,
mute_scheduled_events: settings.store.events,

View file

@ -96,6 +96,6 @@
.vc-shiki-root .vc-shiki-table-cell:last-child {
padding-left: 8px;
overflow-wrap: break-word;
overflow-wrap: anywhere;
width: 100%;
}

View file

@ -16,13 +16,13 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Settings } from "@api/Settings";
import { definePluginSettings, Settings } from "@api/Settings";
import { ErrorCard } from "@components/ErrorCard";
import { Devs } from "@utils/constants";
import { Logger } from "@utils/Logger";
import { Margins } from "@utils/margins";
import { wordsToTitle } from "@utils/text";
import definePlugin, { OptionType, PluginOptionsItem, ReporterTestable } from "@utils/types";
import definePlugin, { OptionType, ReporterTestable } from "@utils/types";
import { findByPropsLazy } from "@webpack";
import { Button, ChannelStore, Forms, GuildMemberStore, SelectedChannelStore, SelectedGuildStore, useMemo, UserStore } from "@webpack/common";
import { ReactElement } from "react";
@ -39,29 +39,112 @@ interface VoiceState {
const VoiceStateStore = findByPropsLazy("getVoiceStatesForChannel", "getCurrentClientVoiceChannelId");
const settings = definePluginSettings({
voice: {
type: OptionType.SELECT,
description: "Narrator Voice",
options: [
{
label: "Microsoft David - English (United States)",
value: "Microsoft David - English (United States)",
default: true
},
{
label: "Microsoft Mark - English (United States)",
value: "Microsoft Mark - English (United States)"
},
{
label: "Microsoft Zira - English (United States)",
value: "Microsoft Zira - English (United States)"
}
],
},
volume: {
type: OptionType.SLIDER,
description: "Narrator Volume",
default: 1,
markers: [0, 0.25, 0.5, 0.75, 1],
stickToMarkers: false
},
rate: {
type: OptionType.SLIDER,
description: "Narrator Speed",
default: 1,
markers: [0.1, 0.5, 1, 2, 5, 10],
stickToMarkers: false
},
sayOwnName: {
description: "Say own name",
type: OptionType.BOOLEAN,
default: false
},
latinOnly: {
description: "Strip non latin characters from names before saying them",
type: OptionType.BOOLEAN,
default: false
},
joinMessage: {
type: OptionType.STRING,
description: "Join Message",
default: "{{USER}} joined"
},
leaveMessage: {
type: OptionType.STRING,
description: "Leave Message",
default: "{{USER}} left"
},
moveMessage: {
type: OptionType.STRING,
description: "Move Message",
default: "{{USER}} moved to {{CHANNEL}}"
},
muteMessage: {
type: OptionType.STRING,
description: "Mute Message (only self for now)",
default: "{{USER}} muted"
},
unmuteMessage: {
type: OptionType.STRING,
description: "Unmute Message (only self for now)",
default: "{{USER}} unmuted"
},
deafenMessage: {
type: OptionType.STRING,
description: "Deafen Message (only self for now)",
default: "{{USER}} deafened"
},
undeafenMessage: {
type: OptionType.STRING,
description: "Undeafen Message (only self for now)",
default: "{{USER}} undeafened"
}
});
// Mute/Deaf for other people than you is commented out, because otherwise someone can spam it and it will be annoying
// Filtering out events is not as simple as just dropping duplicates, as otherwise mute, unmute, mute would
// not say the second mute, which would lead you to believe they're unmuted
function speak(text: string, settings: any = Settings.plugins.VcNarrator) {
function speak(text: string) {
if (!text) return;
const set = settings.store;
const speech = new SpeechSynthesisUtterance(text);
let voice = speechSynthesis.getVoices().find(v => v.voiceURI === settings.voice);
let voice = speechSynthesis.getVoices().find(v => v.voiceURI === settings.store.voice);
if (!voice) {
new Logger("VcNarrator").error(`Voice "${settings.voice}" not found. Resetting to default.`);
new Logger("VcNarrator").error(`Voice "${settings.store.voice}" not found. Resetting to default.`);
voice = speechSynthesis.getVoices().find(v => v.default);
settings.voice = voice?.voiceURI;
if (!voice) return; // This should never happen
settings.store.voice = voice.voiceURI;
}
speech.voice = voice!;
speech.volume = settings.volume;
speech.rate = settings.rate;
speech.volume = settings.store.volume;
speech.rate = settings.store.rate;
speechSynthesis.speak(speech);
}
function clean(str: string) {
const replacer = Settings.plugins.VcNarrator.latinOnly
const replacer = settings.store.latinOnly
? /[^\p{Script=Latin}\p{Number}\p{Punctuation}\s]/gu
: /[^\p{Letter}\p{Number}\p{Punctuation}\s]/gu;
@ -79,13 +162,6 @@ function formatText(str: string, user: string, channel: string, displayName: str
.replaceAll("{{NICKNAME}}", clean(nickname) || (nickname ? "Someone" : ""));
}
/*
let StatusMap = {} as Record<string, {
mute: boolean;
deaf: boolean;
}>;
*/
// For every user, channelId and oldChannelId will differ when moving channel.
// Only for the local user, channelId and oldChannelId will be the same when moving channel,
// for some ungodly reason
@ -101,55 +177,15 @@ function getTypeAndChannelId({ channelId, oldChannelId }: VoiceState, isMe: bool
if (channelId) return [oldChannelId ? "move" : "join", channelId];
if (oldChannelId) return ["leave", oldChannelId];
}
/*
if (channelId) {
if (deaf || selfDeaf) return ["deafen", channelId];
if (mute || selfMute) return ["mute", channelId];
const oldStatus = StatusMap[userId];
if (oldStatus.deaf) return ["undeafen", channelId];
if (oldStatus.mute) return ["unmute", channelId];
}
*/
return ["", ""];
}
/*
function updateStatuses(type: string, { deaf, mute, selfDeaf, selfMute, userId, channelId }: VoiceState, isMe: boolean) {
if (isMe && (type === "join" || type === "move")) {
StatusMap = {};
const states = VoiceStateStore.getVoiceStatesForChannel(channelId!) as Record<string, VoiceState>;
for (const userId in states) {
const s = states[userId];
StatusMap[userId] = {
mute: s.mute || s.selfMute,
deaf: s.deaf || s.selfDeaf
};
}
return;
}
if (type === "leave" || (type === "move" && channelId !== SelectedChannelStore.getVoiceChannelId())) {
if (isMe)
StatusMap = {};
else
delete StatusMap[userId];
return;
}
StatusMap[userId] = {
deaf: deaf || selfDeaf,
mute: mute || selfMute
};
}
*/
function playSample(tempSettings: any, type: string) {
const settings = Object.assign({}, Settings.plugins.VcNarrator, tempSettings);
const settingsobj = Object.assign({}, settings.store, tempSettings);
const currentUser = UserStore.getCurrentUser();
const myGuildId = SelectedGuildStore.getGuildId();
speak(formatText(settings[type + "Message"], currentUser.username, "general", (currentUser as any).globalName ?? currentUser.username, GuildMemberStore.getNick(myGuildId, currentUser.id) ?? currentUser.username), settings);
speak(formatText(settingsobj[type + "Message"], currentUser.username, "general", (currentUser as any).globalName ?? currentUser.username, GuildMemberStore.getNick(myGuildId, currentUser.id) ?? currentUser.username));
}
export default definePlugin({
@ -157,7 +193,7 @@ export default definePlugin({
description: "Announces when users join, leave, or move voice channels via narrator",
authors: [Devs.Ven],
reporterTestable: ReporterTestable.None,
settings,
flux: {
VOICE_STATE_UPDATES({ voiceStates }: { voiceStates: VoiceState[]; }) {
const myGuildId = SelectedGuildStore.getGuildId();
@ -177,8 +213,8 @@ export default definePlugin({
const [type, id] = getTypeAndChannelId(state, isMe);
if (!type) continue;
const template = Settings.plugins.VcNarrator[type + "Message"];
const user = isMe && !Settings.plugins.VcNarrator.sayOwnName ? "" : UserStore.getUser(userId).username;
const template = settings.store[type + "Message"];
const user = isMe && !settings.store.sayOwnName ? "" : UserStore.getUser(userId).username;
const displayName = user && ((UserStore.getUser(userId) as any).globalName ?? user);
const nickname = user && (GuildMemberStore.getNick(myGuildId, userId) ?? user);
const channel = ChannelStore.getChannel(id).name;
@ -215,82 +251,6 @@ export default definePlugin({
);
return;
}
},
optionsCache: null as Record<string, PluginOptionsItem> | null,
get options() {
return this.optionsCache ??= {
voice: {
type: OptionType.SELECT,
description: "Narrator Voice",
options: window.speechSynthesis?.getVoices().map(v => ({
label: v.name,
value: v.voiceURI,
default: v.default
})) ?? []
},
volume: {
type: OptionType.SLIDER,
description: "Narrator Volume",
default: 1,
markers: [0, 0.25, 0.5, 0.75, 1],
stickToMarkers: false
},
rate: {
type: OptionType.SLIDER,
description: "Narrator Speed",
default: 1,
markers: [0.1, 0.5, 1, 2, 5, 10],
stickToMarkers: false
},
sayOwnName: {
description: "Say own name",
type: OptionType.BOOLEAN,
default: false
},
latinOnly: {
description: "Strip non latin characters from names before saying them",
type: OptionType.BOOLEAN,
default: false
},
joinMessage: {
type: OptionType.STRING,
description: "Join Message",
default: "{{USER}} joined"
},
leaveMessage: {
type: OptionType.STRING,
description: "Leave Message",
default: "{{USER}} left"
},
moveMessage: {
type: OptionType.STRING,
description: "Move Message",
default: "{{USER}} moved to {{CHANNEL}}"
},
muteMessage: {
type: OptionType.STRING,
description: "Mute Message (only self for now)",
default: "{{USER}} muted"
},
unmuteMessage: {
type: OptionType.STRING,
description: "Unmute Message (only self for now)",
default: "{{USER}} unmuted"
},
deafenMessage: {
type: OptionType.STRING,
description: "Deafen Message (only self for now)",
default: "{{USER}} deafened"
},
undeafenMessage: {
type: OptionType.STRING,
description: "Undeafen Message (only self for now)",
default: "{{USER}} undeafened"
}
} satisfies Record<string, PluginOptionsItem>;
},
settingsAboutComponent({ tempSettings: s }) {
@ -300,7 +260,7 @@ export default definePlugin({
}, []);
const types = useMemo(
() => Object.keys(Vencord.Plugins.plugins.VcNarrator.options!).filter(k => k.endsWith("Message")).map(k => k.slice(0, -7)),
() => Object.keys(settings.store!).filter(k => k.endsWith("Message")).map(k => k.slice(0, -7)),
[],
);

View file

@ -175,31 +175,21 @@ export default definePlugin({
<div
style={{ marginLeft: "0.5em", transform: "scale(0.9)" }}
>
{settings.store.avatarClick ? (
<div onClick={handleClickAvatar} onKeyPress={handleClickAvatar}>
<UserSummaryItem
users={users}
guildId={ChannelStore.getChannel(message.channel_id)?.guild_id}
renderIcon={false}
max={5}
showDefaultAvatarsForNullUsers
showUserPopout
renderMoreUsers={makeRenderMoreUsers(users)}
/>
</div>
) : (
<div>
<UserSummaryItem
users={users}
guildId={ChannelStore.getChannel(message.channel_id)?.guild_id}
renderIcon={false}
max={5}
showDefaultAvatarsForNullUsers
showUserPopout
renderMoreUsers={makeRenderMoreUsers(users)}
/>
</div>
)}
<div
onClick={handleClickAvatar}
onKeyDown={handleClickAvatar}
style={settings.store.avatarClick ? {} : { pointerEvents: "none" }}
>
<UserSummaryItem
users={users}
guildId={ChannelStore.getChannel(message.channel_id)?.guild_id}
renderIcon={false}
max={5}
showDefaultAvatarsForNullUsers
showUserPopout
renderMoreUsers={makeRenderMoreUsers(users)}
/>
</div>
</div>
);
},

View file

@ -1008,6 +1008,14 @@ export const EquicordDevs = Object.freeze({
name: "port",
id: 1318383159645311009n,
},
PhoenixAceVFX: {
name: "PhoenixAceVFX",
id: 1016895892055396484n,
},
TheArmagan: {
name: "TheArmagan",
id: 707309693449535599n
}
} satisfies Record<string, Dev>);
// iife so #__PURE__ works correctly