DiscordMessages

Moved

Total Downloads: 1,769 - First Release: May 26, 2017 - Last Update: Feb 6, 2018

5/5, 16 likes
  1. Hi ROGU3,

    Add this before line 386 :

    Code:
    private object OnServerMessage(string message, string name)
    {
          if (!ChatEnabled)
          {
                return null;
          }
          HandleMessage(name, message);
          return null;
    }
    And if you want not displaying give add this in condition :
    Code:
    if (!ChatEnabled || (message.Contains("gave") && name == "SERVER"))
    My #region PlayerChat

    Code:
    #region PlayerChatprivate object OnServerMessage(string message, string name)
    {
        if (!ChatEnabled || (message.Contains("gave") && name == "SERVER"))
        {
            return null;
        }
            HandleMessage(name, message);
            return null;
    }
    private object OnUserChat(IPlayer player, string message)
    {
        if (!ChatEnabled)
        {
            return null;
        }
        HandleMessage(player.Name, message);
        return null;
    }
    private void HandleMessage(string name, string message)
    {
        string discordMessage = GetLang("PlayerChatFormat", null, name, message);
        discordMessage = String.Concat("`", DateTime.Now.ToString("HH:mm"), "` ", discordMessage);
        FancyMessage dmessage = new FancyMessage(discordMessage, ChatTTS, null);
        var payload = dmessage.toJSON();
        Request(ChatURL, payload);
    }
    #endregion
     
    Last edited by a moderator: Jan 25, 2018
  2. Slut updated DiscordMessages with a new update entry:

    1.7.3

     
  3. download link broken?
     
  4. Slut updated DiscordMessages with a new update entry:

    1.7.4

     
  5. Awesome got it working great! One question, how can I remove or reset the # of "Times Reported" ? After some testing and setup one has a few to many xD haha
     
  6. You can either delete the DiscordMessages data file in serverdirectory/oxide/data/DiscordMessages.json and reload the plugin or restart server,

    or go through the DiscordMessages data file and delete the users stat/change the
    Code:
     "reports": 26,
    to 0.
     
  7. Unload first then make changes. I'll probably add a command to deal with that.
     
  8. so it worked once where it alerts another role in the discord when a report is made but now its not working anymore. ive tried resetting it back to the role i want but it still wont work.
     
  9. Can you copy the config option and paste it here please?
     
  10. Code:
    "Reports - Alert Channel": true,
      "Reports - Alert Role": "<@&407079602486378517>",
     
  11. Can you screenshot what it does?
     
  12. Thank you much!
    [DOUBLEPOST=1517540235][/DOUBLEPOST]Currently using the built in DiscordMessages /report system. Has anyone had any luck with PlayerReport GUI plugin and it posting to Discord? It seems when I tried that plugin all I would get was the @here notification with no report information. If someone has had luck with this and or know how to get that working with Discord please PM me! Thanks!
     
  13. Then you must be using an old version because @here is not referenced in the plugin at all.
    [DOUBLEPOST=1517551599][/DOUBLEPOST]
    I have notified the plugin developer.
     
  14. Fantastic! Thanks!! Awesome plugin btw!
     
  15. Web request callback raised an exception (NullReferenceException: Object reference not set to an instance of an object)
    at Oxide.Plugins.DiscordMessages+<Request>c__AnonStorey0.<>m__1 (Int32 code, System.String response) [0x00000] in <filename unknown>:0
    at Oxide.Core.Libraries.WebRequests+WebRequest.<OnComplete>b__42_0 () [0x00000] in <filename unknown>:0
     
  16. Do you know what lead up to that? Anything you were trying to send?
     
  17. It appeared after /mute
     
  18. im getting the same thing @Lopol_Pol after using /mute

    Code:
    (00:23:57) | Web request callback raised an exception (NullReferenceException: Object reference not set to an instance of an object)
      at Oxide.Plugins.DiscordMessages+<Request>c__AnonStorey0.<>m__1 (Int32 code, System.String response) [0x00000] in <filename unknown>:0
      at Oxide.Core.Libraries.WebRequests+WebRequest.<OnComplete>b__42_0 () [0x00000] in <filename unknown>:0
     
  19. i usually update the plugin as soon as its released but ill double check Thanks!