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

Send embedded image of color palette to bypass Discords caching #2

Closed
bdbch opened this issue Mar 8, 2017 · 5 comments
Closed

Send embedded image of color palette to bypass Discords caching #2

bdbch opened this issue Mar 8, 2017 · 5 comments
Assignees

Comments

@bdbch
Copy link
Owner

bdbch commented Mar 8, 2017

Example URL:
https://coolors.co/export/png/FF0000-ff0000-b30000-ffbfbf-ff8080

@bdbch bdbch self-assigned this Mar 8, 2017
@ciruz
Copy link
Contributor

ciruz commented Mar 8, 2017

The fix is really simple, just need to change this:

message.reply('Here is your palette: https://coolors.co/' + colorString)

to this:

message.reply('Here is your palette: https://coolors.co/' + colorString, {
    embed: {
        image: {
            url: 'https://coolors.co/export/png/' + colorString
        }
    }
})

image

The only problem here is, that the used discord.js version in cordlr not really supports embed messages (not as reply and the method message.channel.sendEmbed doesnt exist, also you can't send an embed message with message.channel.sendMessage as second argument).

I updated discord.js inside cordlr for testing purpose to the latest discord.js version (11.0.0 right now) and this fix worked fine, but with the current used discord.js version, I'm pretty sure you cant send an embed message.

We really need to upgrade discord.js.

@bdbch
Copy link
Owner Author

bdbch commented Mar 8, 2017

I'll update Discord.js. Could you add an issue for that on the cordlr-cli repository? I'll take care of that. You can also send in a PR if you want to.

Otherwise great one! I'll implement embeds into other modules too.

@ciruz
Copy link
Contributor

ciruz commented Mar 8, 2017

I did bdbch/cordlr-cli#112.

I'll go to bed now, maybe I can make a PR tomorrow or you are faster.

@bdbch
Copy link
Owner Author

bdbch commented Mar 9, 2017

Discord.js is updated!

@ciruz
Copy link
Contributor

ciruz commented Mar 9, 2017

I made an PR and I reported this bug to coolors.co. They said, they gonna fix this too.

@bdbch bdbch closed this as completed in 38924e0 Mar 9, 2017
bdbch pushed a commit that referenced this issue Mar 9, 2017
Changed reply to embed Message to fix #2 and updated to latest color
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

No branches or pull requests

2 participants