Vital.sandbox
Discord

discord.set_application_id

Client

Sets the Discord application-id and reconnects the client


Syntax

local status = discord.set_application_id(id, authenticate = false, force_reauth = false)

Parameters

TypeNameDescription
stringidDiscord application-id to connect with
boolauthenticateDetermines the authentication state:
• When true - authenticates the client with OAuth
• When false - connects without authentication
boolforce_reauthDetermines the re-authentication state:
• When true - forces re-authentication even if a cached token exists
• When false - uses the cached token if available

Returns

TypeNameDescription
boolstatustrue on successful execution, or false on failure

Examples

Connect with various authentication options
--Connect with a specific application-id
discord.set_application_id("1461425342722998474")

--Connect with authentication
discord.set_application_id("1461425342722998474", true)

--Connect and force re-authentication
discord.set_application_id("1461425342722998474", true, true)

On this page