DiscordMessages for Rust

Report and Ban plugin with messages sent straight to discord!

Total Downloads: 840 - First Release: May 26, 2017 - Last Update: Dec 3, 2017

5/5, 15 likes
  1. Slut
    Optional Dependencies:
    http://oxidemod.org/plugins/betterchat-mute.2272/
    Configuration File:
    Yes
    Introduction

    This plugin is for those who are unable to setup real discord bots or do not have the hardware for it. DiscordMessages makes use of the webhook function of Discord therefore you do not need any dependencies to get up and running!

    Features

    All of these features can be enabled/disabled via the config.
    • Ban - (/ban) - Allows a player with permission to ban another player and have the message announced to the server and sent to discord, this replaces the vanilla ban command but works better in the way that it lets you ban offline players with simplicity.
    • Report - (/report) - Allows a player with permission to report another player and have their message sent to discord.
    • Mute Messages - (Requires BetterChatMute) - When a player is muted via BetterChatMute a message is sent to Discord.
    • Message - (/message) - Allows a player with permission to send a message to Discord.
    • Server Chat - Posts to discord once a player types in chat with the option to enable TTS (Text To Speech)
    Commands

    () = Required - <> = Optional
    • /report (player) (message) - This will send a report to the discord channel.
    • /ban (player) <message> - This will ban the player and send it to the specified discord channel.
    • /message (message) - Sends a message to discord.

    Permissions

    The default permissions are as followed, they are changeable via the configuration.
    • discordmessages.report
    • discordmessages.ban
    • discordmessages.message

    Default Configuration

    Code (Text):

    {
      "Bans - Broadcast to server": true,
      "Bans - Enabled": true,
      "Bans - Webhook URL": "https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks",
      "Message - Enabled": true,
      "Message - Webhook URL": "https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks",
      "Mutes - Enabled": false,
      "Mutes - Webhook URL": "https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks",
      "Reports - Cooldown": 30,
      "Reports - Enabled": true,
      "Reports - Webhook URL": "https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks"
    }
     
    API

    Sending a text message with API_SendTextMessage is straight forward, all you need to do is use DiscordMessages?.Call("API_SendTextMessage", string webhookURL, string message)

    In order to use FancyMessage you are required to serialize your list or object into a json string.

    You can either make a Fields class as shown below and then make a list of that class OR an object which is in API_TEST.

    Examples:

    [​IMG]

    [​IMG]
    ToppDogg420, hoppel, mspeedie and 7 others like this.