Plugin
Sekai Stickers
Sekai Stickers built in discord originally from github.com/TheOriginalAyaka
1
/*2
* FiveCord — a Discord client mod3
* Copyright (c) 2025 FiveCord4
* SPDX-License-Identifier: GPL-3.0-or-later5
*/6
7
import { addChatBarButton, ChatBarButton, removeChatBarButton } from "@api/ChatButtons";8
import { definePluginSettings } from "@api/Settings";9
import { Devs } from "@utils/constants";10
import { openModal } from "@utils/modal";11
import definePlugin, { OptionType } from "@utils/types";12
13
import SekaiStickersModal from "./Components/SekaiStickersModal";14
import { kanadeSvg } from "./kanade.svg";15
16
const settings = definePluginSettings({17
AutoCloseModal: {18
type: OptionType.BOOLEAN,19
description: "Auto close modal when done",20
default: true21
},22
});23
24
const SekaiStickerChatButton: ChatBarButton = () => {25
return (26
<ChatBarButton onClick={() => openModal(props => <SekaiStickersModal modalProps={props} settings={settings} />)} tooltip="Sekai Stickers">27
{kanadeSvg()}28
</ChatBarButton>29
);30
};31
32
let IS_FONTS_LOADED = false;33
export default definePlugin({34
name: "Sekai Stickers",35
description: "Sekai Stickers built in discord originally from github.com/TheOriginalAyaka",36
authors: [Devs.FiveCord],37
dependencies: ["ChatInputButtonAPI"],38
settings,39
start: async () => {40
const fonts = [{ name: "YurukaStd", url: "https:class="ts-cmt">//raw.githubusercontent.com/TheOriginalAyaka/sekai-stickers/main/src/fonts/YurukaStd.woff2" }, { name: "SSFangTangTi", url: "https://raw.githubusercontent.com/TheOriginalAyaka/sekai-stickers/main/src/fonts/ShangShouFangTangTi.woff2" }];41
if (!IS_FONTS_LOADED) {42
fonts.map(n => {43
new FontFace(n.name, `url(${n.url})`).load().then(44
font => { document.fonts.add(font); },45
err => { console.log(err); }46
);47
});48
IS_FONTS_LOADED = true;49
}50
addChatBarButton("SekaiStickers", SekaiStickerChatButton);51
},52
stop: () => removeChatBarButton("SekaiStickers")53
});54