Path aliases, better lazyWebpack (#268)

This commit is contained in:
Ven 2022-11-28 13:37:55 +01:00 committed by GitHub
parent 7a4402f142
commit bad96b7887
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
138 changed files with 572 additions and 547 deletions

View file

@ -16,13 +16,12 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { ApplicationCommandInputType, sendBotMessage } from "../api/Commands";
import { migratePluginSettings } from "../api/settings";
import { Devs } from "../utils/constants";
import { lazyWebpack } from "../utils/misc";
import definePlugin from "../utils/types";
import { filters } from "../webpack";
import { FluxDispatcher } from "../webpack/common";
import { ApplicationCommandInputType, sendBotMessage } from "@api/Commands";
import { migratePluginSettings } from "@api/settings";
import { Devs } from "@utils/constants";
import definePlugin from "@utils/types";
import { findByPropsLazy } from "@webpack";
import { FluxDispatcher } from "@webpack/common";
interface Album {
id: string;
@ -54,9 +53,9 @@ interface Track {
name: string;
}
const Spotify = lazyWebpack(filters.byProps("getPlayerState"));
const MessageCreator = lazyWebpack(filters.byProps("getSendMessageOptionsForReply", "sendMessage"));
const PendingReplyStore = lazyWebpack(filters.byProps("getPendingReply"));
const Spotify = findByPropsLazy("getPlayerState");
const MessageCreator = findByPropsLazy("getSendMessageOptionsForReply", "sendMessage");
const PendingReplyStore = findByPropsLazy("getPendingReply");
function sendMessage(channelId, message) {
message = {