Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to send images as links #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KulaGGin
Copy link

I've been using this extension for a long time. I added ability to send images as links at one point, because then it works much quicker and also at some point images that are sent as images are lower quality than images that are sent as links. Here's the comparison between the two:
image

I usually added changes to the compiled javascript file and decided to finally create a pull request. But I didn't build the project from sources, I only tested it on the compiled javascript file.

As you can see, in my send as link change, I also separate the content before and after from sending the image itself.

Copy link
Owner

@Yentis Yentis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the screenshot you attached the image sent as link looks blurrier to me.

if(contentAfter) {
args[1].content = contentAfter;
await callDefault(...args);
}
Copy link
Owner

@Yentis Yentis Dec 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will send up to 3 messages for a single user action, which qualifies as self-botting

if(this.settingsService.settings.sendAsLink) {
let contentBefore = args[1].content.substring(0, foundEmote.pos);
let emojiContent = foundEmote.url + `?size=${this.settingsService.settings.emoteSize}`;
let contentAfter = args[1].content.substring(foundEmote.pos + foundEmote.emoteLength, args[1].content.length);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code doesn't / can't handle emote modifiers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants