misticos
Discord account connection with API

Supported Games

Discord account connection with game account with API. Make sure you know who is who :)

Configuration

Default Configuration

{
  "Discord Bot Token": "",
  "Channel ID For Authentication Log": "",
  "Enable Bot Status": true,
  "Bot Status": "Send me your code",
  "Group To Assign Once Connected": "discord-connected",
  "Group To Revoke Once Left": "discord-connected",
  "Delete Data On Discord Leave": false,
  "Allow Data Overwrite": true,
  "Chat Prefix": "Auth",
  "Auth Command": "auth",
  "Code Lifetime": "15m",
  "Code Length": 6
}

How-To

Discord Bot Token is Discord bot token :P

Channel ID For Authentication Log is a Discord channel ID for auth log

Enable Bot Status is used to enable/disable Bot Status feature

Bot Status is the Bot Status in Discord

Group To Assign Once Connected is an oxide group to assign once the player has connected his in-game account with discord one. Leave empty to ignore

Group To Revoke Once Left is an oxide group to revoke once the player has left your discord server. Leave empty to ignore

Delete Data On Discord Leave is whether to delete user's data from the data file once he leaves your discord server

Allow Data Overwrite is the option to allow or deny data (connection) overwrite

Chat Prefix is chat prefix

Auth Command is a command for this plugin

Code Lifetime is lifetime for a connection (auth) code in format 1h1m1s

Code Length is the length of a connection code

Localization

English

{
  "Code Generation": "Here is your code: {code}",
  "Code Expired": "Your code has expired!",
  "Authenticated": "Thank you for authenticating your account!",
  "Already Authenticated": "You have already authenticated your account, no need to do it again!",
  "Unable To Find Code": "Sorry, we couldn't find your code. Try to authenticate again.",
  "Log": "{discordName} ({discordId}) has authenticated his account to in-game {gameName} ({gameId})",
  "Discord Overwrite": "Your old connection with this Discord account will be overwritten!",
  "In-Game Overwrite": "Your old connection with this in-game account will be overwritten!"
}

Developers

Connection API

// Get the Discord ID by Player ID
string GetDiscordOf(string id)
// Get the Player ID by Discord ID
string GetGameOf(string id)

Authorization Hooks

// On Discord connection overwrite
void OnDiscordAuthOverwrite(string oldGameId, string newGameId, string oldDiscordId, string newDiscordId)
// On Discord connection created
void OnDiscordAuthenticate(string gameId, string discordId)
// Can Discord connection be created? Return false to deny, true to allow and null to ignore
object CanDiscordAuthenticate(string gameId, string discordId)
// On Discord user leaves the server
void OnDiscordAuthLeave(string gameId, string discordId)

Donate

Click me

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.

10.2K downloads
50 watchers

discordauthapiconnect
Collaborators
  • MJSU
    Developer