UseDiscordIdentity
Asks joining players for their Discord account.
Off by default. On, a player’s launcher sends their Discord account to this server (and offers a sign-in with Discord to a player who
has none), and GetPlayerDiscordId and join.discord in OnPlayerJoinRequest have it. A player who never signed in, or whose
account did not hold, simply has none: the mode decides what that means. Call it in OnGameModeInit: the launchers read it when they
look at the server. A reload of the mode turns it off until the new copy calls it again.
The server takes the account only for itself: a player’s game proves it to the address it dialed. A server that players dial at an
address it does not know as its own - behind a forwarding service, say, and not on the public list - sets [master] public_address
to that address (the server log says so when a player’s account was refused for it).
Syntax
Section titled “Syntax”UseDiscordIdentity([on])| Parameter | Type | |
|---|---|---|
on |
boolean | false stops asking; left out, true (optional) |
Example
Section titled “Example”function OnGameModeInit() UseDiscordIdentity(true)endSee also
Section titled “See also”IsUsingDiscordIdentity · GetPlayerDiscordId · OnPlayerJoinRequest · the Joins and Discord group of the index
