|
|
|
@ -25,7 +25,7 @@ import { Logger } from "@utils/Logger";
|
|
|
|
|
import definePlugin, { OptionType } from "@utils/types";
|
|
|
|
|
import { findByPropsLazy, findStoreLazy, proxyLazyWebpack } from "@webpack";
|
|
|
|
|
import { Alerts, ChannelStore, DraftType, EmojiStore, FluxDispatcher, Forms, IconUtils, lodash, Parser, PermissionsBits, PermissionStore, UploadHandler, UserSettingsActionCreators, UserStore } from "@webpack/common";
|
|
|
|
|
import type { CustomEmoji } from "@webpack/types";
|
|
|
|
|
import type { Emoji } from "@webpack/types";
|
|
|
|
|
import type { Message } from "discord-types/general";
|
|
|
|
|
import { applyPalette, GIFEncoder, quantize } from "gifenc";
|
|
|
|
|
import type { ReactElement, ReactNode } from "react";
|
|
|
|
@ -812,8 +812,8 @@ export default definePlugin({
|
|
|
|
|
UploadHandler.promptToUpload([file], ChannelStore.getChannel(channelId), DraftType.ChannelMessage);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
canUseEmote(e: CustomEmoji, channelId: string) {
|
|
|
|
|
if (e.require_colons === false) return true;
|
|
|
|
|
canUseEmote(e: Emoji, channelId: string) {
|
|
|
|
|
if (e.type === "UNICODE") return true;
|
|
|
|
|
if (e.available === false) return false;
|
|
|
|
|
|
|
|
|
|
const isUnusableRoleSubEmoji = RoleSubscriptionEmojiUtils.isUnusableRoleSubscriptionEmojiOriginal ?? RoleSubscriptionEmojiUtils.isUnusableRoleSubscriptionEmoji;
|
|
|
|
|