update (randomVoice) (#195)
Some checks are pending
Sync to Codeberg / Sync Codeberg and Github (push) Waiting to run
Test / Test (push) Waiting to run

* Add files via upload

* Revert "Add files via upload"

This reverts commit 7b0c9f2d5d.

* Fix PR

* Managed CSS

---------

Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
This commit is contained in:
Eazvy 2025-03-25 00:29:51 -04:00 committed by GitHub
parent 444b308f7b
commit 189845819c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 0 deletions

View file

@ -5,6 +5,7 @@
*/ */
import { definePluginSettings } from "@api/Settings"; import { definePluginSettings } from "@api/Settings";
import { disableStyle, enableStyle } from "@api/Styles";
import ErrorBoundary from "@components/ErrorBoundary"; import ErrorBoundary from "@components/ErrorBoundary";
import { makeRange } from "@components/PluginSettings/components"; import { makeRange } from "@components/PluginSettings/components";
import { debounce } from "@shared/debounce"; import { debounce } from "@shared/debounce";
@ -13,6 +14,8 @@ import definePlugin, { OptionType } from "@utils/types";
import { findByPropsLazy, findComponentByCodeLazy, findStoreLazy } from "@webpack"; import { findByPropsLazy, findComponentByCodeLazy, findStoreLazy } from "@webpack";
import { ChannelStore, ContextMenuApi, GuildStore, Menu, NavigationRouter, PermissionStore, React, SelectedChannelStore, Toasts, UserStore } from "@webpack/common"; import { ChannelStore, ContextMenuApi, GuildStore, Menu, NavigationRouter, PermissionStore, React, SelectedChannelStore, Toasts, UserStore } from "@webpack/common";
import style from "./styles.css?managed";
const ChatVoiceIcon = findComponentByCodeLazy("22H12Zm2-5.26c0"); const ChatVoiceIcon = findComponentByCodeLazy("22H12Zm2-5.26c0");
const Button = findComponentByCodeLazy(".NONE,disabled:", ".PANEL_BUTTON"); const Button = findComponentByCodeLazy(".NONE,disabled:", ".PANEL_BUTTON");
const VoiceStateStore = findStoreLazy("VoiceStateStore"); const VoiceStateStore = findStoreLazy("VoiceStateStore");
@ -148,6 +151,12 @@ export default definePlugin({
} }
} }
], ],
start() {
enableStyle(style);
},
stop() {
disableStyle(style);
},
settings, settings,
randomVoice: ErrorBoundary.wrap(randomVoice, { noop: true }), randomVoice: ErrorBoundary.wrap(randomVoice, { noop: true }),
}); });

View file

@ -0,0 +1,8 @@
[class^="buttons__"] {
width: 150px;
margin-left: -15px;
}
[class^="micButtonParent__"] {
width: 16px;
}