Cannot send an empty messageFixed
Error message with the following text:
[DiscordMessages] Failed! Discord responded with code: 400. Plugin: DiscordMessages
{"message": "Cannot send an empty message", "code": 50006}
[DiscordMessages] Failed! Discord responded with code: 400. Plugin: DiscordMessages
{"message": "Cannot send an empty message", "code": 50006}
Same issue. Something within the Discord API changed or our hooks are being flagged as malicious or something? I have no clue what the issue may be.

Merged post

Just to update I have determined its 100% a Discord issue. I have submitted a request to Discord directly to determine what the cause is and how to remedy it. If anyone has any additional input I would love to hear it!
when will fix?

yeah, they must have changed something in the formatting requirements at discord since we get the error 400.

I'v also submittet a ticket with discord to get them on the issue asap.

From my tests and research the plugin need and update on the Send function from Class Request as it appear we need to specify header now (or like it should be) like :

            public void Send()
            {
                var headers = new Dictionary<string, string>()
                {
                    {"Content-Type", "application/json"}
                };
                _instance.webrequest.Enqueue(_url, _payload, (code, rawResponse) =>
                {
                    var response = new BaseResponse()
                    {
                        Message = rawResponse,
                        Code = code
                    };
                    if (response.IsRatelimit)
                    {
                        response.SetRateLimit();
                        _handler.AddMessage(response.RateLimit, this);
                    }
                    if (response.IsBad)
                    {
                        _instance.PrintWarning("Failed! Discord responded with code: {0}. Plugin: {1}\n{2}", code, _plugin != null ? _plugin.Name : "Unknown Plugin", response.Message);
                    }
                    try
                    {
                        _response?.Invoke(response);
                    }
                    catch (Exception ex)
                    {
                        Interface.Oxide.LogException("[DiscordMessages] Request callback raised an exception!", ex);
                    }
                }, _instance, Core.Libraries.RequestMethod.POST, headers);
            }
​
Error while compiling: DiscordMessages.cs(1074,246): error CS1525: Unexpected symbol `end-of-file'
                var headers = new Dictionary<string, string>()
                {
                    {"Content-Type", "application/json"}
                };
​

I tried adding that bit of code to the .cs and it still doesn't work for me,don't know if I'm doing it right though.

[DiscordMessages] Failed! Discord responded with code: 400. Plugin: DiscordMessages
{"message": "Cannot send an empty message", "code": 50006}​

I got this mail back from discord though;



Does anyone have a fix for this issue ?

ynzo
Error while compiling: DiscordMessages.cs(1074,246): error CS1525: Unexpected symbol `end-of-file'
That means the plugin file was not edited right else encoding was unreadble. Make sure to save as UTF-8.
when will fix on? 
[DiscordMessages] Failed! Discord responded with code: 400. Plugin: DiscordMessages
{"message": "Cannot send an empty message", "code": 50006}
Sami, your fix worked for a little bit, now its back to the same error message.

Merged post

[DiscordMessages] Failed! Discord responded with code: 400. Plugin: Unknown Plugin {"message": "Cannot send an empty message", "code": 50006}

This message is different and I am seeing this one
I want to add that i am seeing the exactly same error 400. Plugin: Unknown Plugin {"message": "Cannot send an empty message", "code": 50006}
Is Arkan installed?v1.0.12 can sometimes give this error when it sends a discord message through DiscordMessages about a NoRecoil violation.
no Arkan here. also, this error occurs on scripts that have been running error free for several months now and haven't been edited or changed on my side at all.
Thanks for fixing the issue!
Thanks for the update @Slut :o)
Much appriciated.
Locked automatically