Giter Club home page Giter Club logo

betterdiscord-emotereplacer's Introduction

BetterDiscord EmoteReplacer

Check for known emote names and replace them with an embedded image of the emote.
Also supports modifiers similar to BetterDiscord's emotes.

Usage

Install BetterDiscord from here
https://github.com/BetterDiscord/Installer/releases
Reminder: BetterDiscord is against the TOS, use at your own risk!

Download this library https://raw.githubusercontent.com/rauenzi/BDPluginLibrary/master/release/0PluginLibrary.plugin.js
And the plugin: https://raw.githubusercontent.com/Yentis/betterdiscord-emotereplacer/master/EmoteReplacer.plugin.js
(Rightclick -> Save as...)

Open Discord -> Settings -> Plugins -> Open plugin folder and place the 2 plugins there.
Enable them in the Plugins menu and hit Ctrl + R.

Custom emotes can be added and the prefix can be changed through the settings menu.
Begin typing emote names as you would regular Discord emotes with ; instead of :

Preview
You can also use any existing Discord emotes (and stickers!) along with whatever modifiers you like.
Just type them as usual and they will be sent as an image if you don't currently have nitro.

Resources

List of emotes: https://yentis.github.io/emotes

Modifiers

Modifiers can be chained!
.flip - Flip emote horizontally.
.flap - Flip emote vertically.
.rotate-<degrees> - Rotate emote by x degrees.
.speed-<speed> - For gifs, change delay between frames in hundredths of a second.
.hyperspeed - Remove every other frame and set delay to the minimum for extreme speed.
.reverse - Make a gif play backwards.
.spin-<speed> - Make your emote spin! Speed can be: left empty, fast, faster or hyper.
.spinrev-<speed> - Same as above but spin in the other direction.
.slide-<speed> - Make your emote slide! Speed can be: left empty, fast, faster or hyper.
.sliderev-<speed> - Same as above but slide in the other direction.
.shake-<speed> - Make your emote shake! Speed can be: left empty, fast, faster or hyper.
.rainbow-<speed> - Make your emote strobe with a rainbow of colors! Speed can be: left empty, fast, faster or hyper.
.infinite-<speed> - Make your emote pulse outwards! Speed can be: left empty, fast, faster or hyper.
.wiggle-<intensity> - Make your emote wiggle! Intensity can be: left empty, big, bigger or huge.
.wide-<wideness> - Make your emote extra wide! Wideness can be: left empty, big, huge, extreme or a number from 2 to 8.
.resize-<size> - Resize your emote. Can be: small, medium, large or a number from 32 to 128.
.rain-<option> - Add a rain effect to the emote. Option can be: left empty, glitter.

Examples:
;yentDogSmug.flip
;yentKrisDance.speed-5
;yentKannaDance.rotate-90

Extra Features

Size - Emotes can be 32 to 128px large, with 48 being the normal emote size.
Spoilers - Emotes can be hidden behind a spoiler using spoiler tags.

betterdiscord-emotereplacer's People

Contributors

maxohn avatar rmanky avatar yentis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

betterdiscord-emotereplacer's Issues

Hide Gift Feature not working

Hi! I just installed betterdiscord to remove the minimum window size limit, however I found that the hide gift feature is not working. Keep up the good work, devs!

Stable 84785 (fe5e237)
BetterDiscord 1.1.0
Host 1.0.9001
Windows 10 64-Bit (10.0.19042)

Emote take long time to send

Sometime when i try to send an emote, nothing happen for a long time (a minute or so) then it get sent.

it's kinda annoying and sometime it send when i'm writting another message that's either a "reply" or contain an image or something else, so the message lose all it's meaning.

I have no idea why it happen, i can send big files really fast like normal.

Offline custom emotes?

I have a few custom emotes that are not hosted on the internet, it would be great if you can implement this.

Thank you

text after emoji with modifier doesn't appear.

Error Info:

If I added text after an emoji with a modifier it doesn't appear or send it.

Date of Error

I have gotten it multiple times, I even got it today.

Examples

1.

emoji with modifier

I don't know if this will help you but I feel extra info might help. Text after emojis without modifers do appear or send.
emoji without modifier

[FEATURE] Modifier Option Tip / Autocomplete Modifier Options

[FEATURE] Modifier Option Tip / Autocomplete Modifier Options

Hey Yentis, thank you for creating such a great plugin. It would be great if there was an autocomplete modifier options (like the modifiers) or something like this would be awesome as well
image
This feature would be great for the plugin because whenever I use a modifier, I keep forgetting what are the available options and either I type the wrong a modifier option, or I must refer to the GitHub page which takes time to search and stuff.
This would be a GREAT feature. Thank you so much ๐Ÿ™

Plugin broken: TypeError: Illegal invocation

I am getting the following error since the update when loading the plugin:

EmoteReplacer TypeError: Illegal invocation
    at Function.getModule (<anonymous>:4:46957)
    at Function.get ConfirmationModal [as ConfirmationModal] (<anonymous>:4:69308)
    at Function.showConfirmationModal (<anonymous>:4:72288)
    at Function.bn [as showConfirmationModal] (<anonymous>:4:367842)
    at RawPlugin.showLibraryMissingModal (EmoteReplacer.plugin.js:24386)

Plugin version: 1.13.1 (latest)
Better Discord version: 1.9.0 (latest)
OS: Arch Linux
OpenAsar: 3a52bd2 (latest Nightly)

Could not open settings.

Fresh Update of BetterDiscord and only having ZeresPluginLibrary 2.0.14 and EmoteReplacer 1.13.1 installed causes a red warning to appear when I try to change the settings of EmoteReplacer in the BetterDiscord plugins menu, aka pressing the settings cogwheel.

It's been this way for me for a long while now, long before updating BetterDiscord.

EmoteReplacer itself seems to be broken for me in general too, but that might be update related? I am now using BetterDiscord 1.9.1 .

image

.speed Modifiers throws an error

Error Info:

speed modifier throws an error. it doesnt depend upon the emote or the speed (fast, faster, hyper) it just keeps giving the same error.

Date of Error

I have gotten it multiple times, I even got it today.

Example

mod

It seems to be broken again

The preview in the text zone still works, but when i press enter the message get "sent" but not really, it just clear out the text zone

[Feature] Upload multiple emotes/emojis as images

Hey Yentis, could you please add a multiple emotes/emojis uploading feature? ๐Ÿ™ As you can see from the above example other emojis/emotes don't work after typing one emote/emoji.

Also, there is a multiple upload image feature of discord. Like so...

Thank you so much for the plugin ๐Ÿ™ Good day!

[Suggestion] Merging images

Adding the possibilty to post multiple emotes in a single merged image/gif would be a nice feature. Something of the order of

yentPepoGun:yentBlobGun

could work for this

Disable emotes in channel with no image perms

The emotes should be disabled automatically in channels where the user doesn't have permission to send pictures, this might be helpful.
i might mess up indentations a bit cuz I had it opened in notepad,

module.exports = (() => {
    const config = {
        
        defaultConfig: [
            {
                type: 'dropdown',
                id: 'missingEmbedPerms',
                name: 'Missing Embed Perms Behaviour',
                note: 'What should happen if you select an emoji even though you have no embed permissions.',
                value: 'showDialog',
                options: [
                    {
                        label: 'Show Confirmation Dialog',
                        value: 'showDialog'
                    },
                    {
                        label: 'Insert Anyway',
                        value: 'insert'
                    },
                    {
                        label: 'Nothing',
                        value: 'nothing'
                    }
                ]
            },
            
            
        ]
    };
    
    selectEmoji({emoji, isFinalSelection, onSelectEmoji, closePopout, selectedChannel, disabled}) {
                    if (disabled) {
                        const perms = this.hasEmbedPerms(selectedChannel);
                        if (!perms && this.settings.missingEmbedPerms == 'nothing') return; 
                        if (!perms && this.settings.missingEmbedPerms == 'showDialog') {
                            BdApi.showConfirmationModal(
                                "Missing Image Embed Permissions", 
                                [`It looks like you are trying to send an Emoji using Freemoji but you dont have the permissions to send embeded images in this channel. You can choose to send it anyway but it will only show as a link.`], {
                                confirmText: "Send Anyway",
                                cancelText: "Cancel",
                                onConfirm: () => {
                                    if (this.settings.sendDirectly) {
                                        MessageUtilities.sendMessage(selectedChannel.id, {content: `${emoji.url}&size=${this.settings.size}`});
                                    } else {
                                        onSelectEmoji(emoji, isFinalSelection);
                                    }
                                }
                            });
                            return;
                        }
                        if (this.settings.sendDirectly) {
                            MessageUtilities.sendMessage(SelectedChannelStore.getChannelId(), {content: `${emoji.url}&size=${this.settings.size}`});
                        } else {
                            onSelectEmoji(emoji, isFinalSelection);
                        }
                    } else {
                        onSelectEmoji(emoji, isFinalSelection);
                    }
                    
                    if(isFinalSelection) closePopout();
                }

Emote Replacer will always ping on reply messages

Just tested this with all plugins turned off except for EmoteReplacer. When replying to a message even when the ping is turned off it will mention the user if the message contains an emote that EmoteReplacer attaches.

Unable to select emote from the list.

As the title says, I am unable to select an emote from the list after typing ;(searchterm). I cannot click to select an emote, or use enter to select and emote. This happened with the "fixed" version (from being broken by betterdiscord), and the "unfixed" normal version. I've tried it with all other plugins but emotereplacer and the library disabled, but I still can't get it to work.

[Suggestion] Hide emojis I can't use for reactions

While this plugin makes it possible to post emojis everywhere, it doesn't make it possible to use any emoji to react. The emoji picker will still show all emojis, however (at least, it won't grey them out). This is especially frustrating when multiple servers use the same emoji image, because then you manually have to check which one is the correct one to use.

Plugin broken: this.modulesService.cloudUploader.n is not a constructor

I am getting the following error since a few days when sending a message with an emote:

EmoteReplacer Error in onDeletePendingReply TypeError: this.modulesService.cloudUploader.n is not a constructor
    at SendMessageService.uploadFile (EmoteReplacer.plugin.js:24252)
    at SendMessageService.fetchBlobAndUpload (EmoteReplacer.plugin.js:24185)

Plugin version: 1.13.0 (latest)
Better Discord version: 1.9.0 (latest)
OS: Arch Linux
OpenAsar: 40b27dd (latest Nightly)

Is it possible to add the option to send the emote link instead?

Would it be possible to add a option that sends the link of the emote itself?

Much like in its predecessor this option allowed to change the image size by just adding a extension to the image link, it also allowed a quick output in slow systems and slow connections.

Sorry to make this request I don't mean to put pressure in anyone, specially in these dates

[Suggestion/bug] Multiple Emote unconverted

when sending multiples emote, only one get converted, and the other are "written"
image

I don't know if sending multiple image via the plugin is possible, so instead maybe removing the "non converted" emote from the message
So it leaves only one emote

Plugin not working

1.13.0
Latest BetterDiscord
Latest Plugin

Using Emotes not working again, nothing happens if im trying to use Emote from other servers.

[Suggestion] Modifiers on all emotes

I love the emotes and the modifiers, but I currently find it bothersome to copy the emote's picture and make it a custom emote only to be able to apply all the cool modifiers on them.

I would love it if I was able to do :emote_from_any_server.modifier instead of only ;customemote.modifier.

I don't know if it's possible, but it would definitely make quick reactions with modifiers a lot... well... quicker :D
cause you wouldn't need to copy the emote into your custom emotes first to apply the modifiers.

needs ability to require a specific suffix before emote list shows up

I like this plugin, but the emote suggestions pop up constantly when I'm typing normally. Can there be an option (which is perhaps on by default) to need to prefix your emote name with a character before the emote list shows up? : would be ideal but that clashes with discord's emote suggestion list, so perhaps ; or something?

Better splitting of messages and emotes?

Currently, all emotes send after the message, but could you make it so emotes placed before the message send before the message?

This plugin has an implementation of it in its "split" version, but yours could be better if it were also compatible with images.

https://github.com/An00nymushun/DiscordFreeEmojis

In my opinion, images should be sent after the message that you type with it along with any emotes, but having a toggle for before or after would be fine too.

Just to be clear, here would be how various messages are formatted if you were to implement this:

  1. ":emote: Words words words" -> Emote gets sent first, then the words are sent below it.
  2. "Words words words :emote:" -> Words are sent first, then the emote gets sent below it. This is the current implementation.
  3. "Words words :emote: words" -> The message gets split into "Words words", followed by the emote, followed by "words"
  4. "Words words :emote: [image.png]" -> The message will be formatted according to the above 3 examples, which is then followed by the image upload.

Powercord Support

With the BDCompat plugin, everything works except prefixes and actually sending the messages: nothing is sent. I can't find any alternatives and this is a useful plugin.

forbidden emoji error

Error Info:

There are random emotes/emojis that do not work and throw a forbidden error. I did get some other errors other than the forbidden error but I got them only once.

Date of Error

I have gotten it multiple times, I even got it today.

Examples:

1.

pepeAhh

2.

twerk

3.

pepeHigh

Is it still broken?

After the discord's update, this plugin still seems to be broken. i would like to know if its being worked on since i recently discovered this amazing plugin and i would love to see it working.

Failed to execute 'open' on 'XMLHttpRequest'

Failed to get emote names and/or modifiers DOMException: Failed to execute 'open' on 'XMLHttpRequest': Synchronous requests from a document must not set a response type.
at XMLHttpRequest. (https://discord.com/assets/d19cf4d7a2924ae2da5f.js:2:132503)
at XMLHttpRequest.open [as realOpen] (:4:289607)
at XMLHttpRequest.myOpen [as open] (:31:14)
at :812:29 and :831:29
at new Promise ()
at EmoteReplacer.getEmoteNames (:787:20)
at EmoteReplacer.onStart (:165:22)

FIX: httpRequest.open("GET", link, true); instead httpRequest.open("GET", link);

Add possibility to Bypass Emote restriction

I have a few server where you can post images but you cannot send emote from outside server.
could it be possible to bypass the lock ?

Or do you wish to keep it like this ?

Gifs not sending, stuck on "Processing gif" until gifsicle is modified

Hi, so I'm facing this issue since about 1-2 months, I can't seem to send gifs anymore with emotereplacer.
Emotereplacer sends the "Processing gif..." toast notification and then nothing happens, unless you wait for ~5 minutes or you rename/move/delete the gifsicle executable in the plugins folder of betterdiscord.
After that, no gifs will be processed correctly as gifsicle would not be present, until you restore it back in the plugins folder, and then when you try again to send a gif it gets stuck on processing gif.
I compiled the latest gifsicle version and the problem still occurs.
Sending non-gif emotes work as expected.

I am on Linux, KDE neon (ubuntu based) if that matters.

Certain emotes not uploading

I found this plugin the other day, and I really like it. I just have one issue:
Most emotes seem to work fine, but with some emotes (E.G. yentStitchCry), it just says Processing gif... and then the message fails to send.

EDIT: It appears this happens sporadically - It's not always the same emoji/modifier combination. It seems random

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.