Discord Embeds

v239
embed
discord

#1

PhantomBot Version: 2.3.9 (Revision: 37009b50)
OS Version: Windows 10
Java Version: Java
Browser and Version (for Panel Support): Chrome 61.0.3163.100
Stock PhantomBot: Yes/No (Yes if you have not modified the scripts or Java Core) Minor change to the quote system
Any Recent Changes to Your System: No

Description of Issue: Since the update to 2.3.9, Discord embeds are ignoring anything before the last comma in a sentence, and the colour is not being applied. This was an issue previously, and was successfully resolved.


This has no commas anywhere in the command.


And then with the test.


#2

Try using 255 0 0, this isn’t really a bug. It’s just like impossible to fix.


#3

It’s now getting the colour correctly, however it’s still ignoring most of the text.


#4

I am going to take a look into this, I am sure it is just an evil incarnation of a regular expression.


#5

I’ll see if it can be fixed, if not, I’ll remove it or strip commas.


#6

NO, I’ll look. RACE YOU! <3


#7

I feel so loved… :stuck_out_tongue:


#8

Well, I am opening a Guinness and also looking at issues from my full time job, so we’ll see how fast I am :smiley:


#9

This is running stock 2.3.9 and a patched bot at the same time in Discord:

I will post a patch and see if there can be a quick hotfix to just overlay the current release.


#10

If we can’t push a quick hotfix and you want a quick fix:

Modify scripts/discord/core/misc.js

Near the top, replace the RegExp:

var embedReg = new RegExp(/\(embed\s([\w\s\d]+),\s(.*)\)/),


#11

OK thanks. :slight_smile:
Awesome as always.


#12

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.