Adds a /players chat command to Discord with the currently connected players

Supported Games

Features

  • Add Commands For Players / Admins to use to see connected players in discord
  • The command will return an embed with up to 25 connected players each. Buttons are added to the embed to sort and page through all connected players
  • Support for multiple commands to customize how you want the embed to look and feel.
  • Support for permanent messages that are updated on a set interval

/players Default Embed

/playersaadmin Default Embed

Discord Link

This plugin supports Discord Link provided by the Discord Extension.This plugin will work with any plugin that provides linked player data through Discord Link.

Permissions

  • discordplayers.use - Allows players to use the /players discord command
  • discordplayers.admin - Allows players to use the /playersadmin discord command

Discord Commands

  • /players -- returns a list of all the connected players
  • /playersadmin -- returns a list of all the connected players

Note: Commands can be customized in the config

Getting Your Bot Token

Click Here to learn how to get an Discord Bot Token

Configuration

{
  "Discord Bot Token": "",
  "Player Amount Per Page": 25,
  "Permanent Embeds": [
    {
      "Enabled": false,
      "Permanent Message Channel ID": "",
      "Update Rate (Minutes)": 1.0,
      "Command To Use": "players"
    },
    {
      "Enabled": false,
      "Permanent Message Channel ID": "",
      "Update Rate (Minutes)": 1.0,
      "Command To Use": "playersadmin"
    }
  ],
  "Command Embeds": {
    "players": {
      "Permissions Needed To Use Command": {
        "Require Permissions To Use Command": false,
        "Oxide Permission To Use Command": "discordplayers.use",
        "Allow Discord Commands In Direct Messages": true,
        "Allow Discord Commands In Guild": false,
        "Allow Guild Commands Only In The Following Guild Channel Or Category (Channel ID Or Category ID)": [],
        "Allow Commands for members having role (Role ID)": []
      },
      "Display Setting For The Embed": {
        "Title": "{server.name}",
        "Description": "{server.players}/{server.players.max} Online Players | {server.players.loading} Loading | {server.players.queued} Queued",
        "Url": "",
        "Embed Color (Hex Color Code)": "#de8732",
        "Image Url": "",
        "Thumbnail Url": "",
        "Add Timestamp": true,
        "Format Applied To Fields": {
          "Title": "{player.name}",
          "Value": "**Online For:** {discordplayers.player.duration}",
          "Inline": true
        },
        "Footer": {
          "Icon Url": "",
          "Text": "",
          "Enabled": true
        }
      },
      "Display Admins In The Player List": true
    },
    "playersadmin": {
      "Permissions Needed To Use Command": {
        "Require Permissions To Use Command": true,
        "Oxide Permission To Use Command": "discordplayers.admin",
        "Allow Discord Commands In Direct Messages": true,
        "Allow Discord Commands In Guild": false,
        "Allow Guild Commands Only In The Following Guild Channel Or Category (Channel ID Or Category ID)": [],
        "Allow Commands for members having role (Role ID)": []
      },
      "Display Setting For The Embed": {
        "Title": "{server.name}",
        "Description": "{server.players}/{server.players.max} Online Players | {server.players.loading} Loading | {server.players.queued} Queued",
        "Url": "",
        "Embed Color (Hex Color Code)": "#de8732",
        "Image Url": "",
        "Thumbnail Url": "",
        "Add Timestamp": true,
        "Format Applied To Fields": {
          "Title": "{player.name}",
          "Value": "**Steam ID:**{player.id}\n**Online For:** {discordplayers.player.duration}\n**Ping:** {player.ping}ms\n**Country:** {player.address.data!country}",
          "Inline": true
        },
        "Footer": {
          "Icon Url": "",
          "Text": "",
          "Enabled": true
        }
      },
      "Display Admins In The Player List": true
    }
  },
  "Discord Extension Log Level (Verbose, Debug, Info, Warning, Error, Exception, Off)": "Info"
}

Localization

{
  "NoPermission": "You do not have permission to use this command",
  "BackButtonLabel": "Back",
  "BackButtonEmoji": "⬅",
  "PageButtonLabel": "Page: {0}/{1}",
  "PageButtonEmoji": "",
  "NextButtonLabel": "Next",
  "NextButtonEmoji": "➡",
  "RefreshButtonLabel": "Refresh",
  "RefreshButtonEmoji": "🔄",
  "SortedByButtonLabel": "Sorted By: {0}",
  "SortedByButtonEmoji": "",
  "SortByEnumName": "Name",
  "SortByEnumTime": "Time",
  "OnlineTimeFormat": "{1}h {2}m {3}s"
}
MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.