API to embed tabs into the emoji picker
Copy this folder into the Plugins
folder of the DiscordInjections project.
This Plugin does nothing on its own, it needs other plugins to completly work. Either install LineStickers or TelegramStickers by @SnazzyPine25 (inbuilt support) or any other Plugin that supports Emoji Menu
To use emoji menu in your project, add a dependency to it Required dependency:
class MyPlugin extends Plugin {
static get after() { return ["emojimenu"] }
}
Optional dependency:
class MyPlugin extends Plugin {
load() { this.on("plugins-loaded", plugins => {
if (plugins.includes("emojimenu")) { /* do stuff */ }
})
And then add a tab to EmojiMenu
function () {
window.DI.PluginManager.plugins.emojimenu.addTab("Tab Name", targetElement => { /* do stuff */})
}
addTab(tabName, callback)
needs the Tab Name as the first parameter, the callback receives one parameter, the parent<div>
removeTab(tabName)
removes the Tab specified by the Tab Name