Vital.sandbox
Discord

discord.get_username

Client

Retrieves the username of the currently connected Discord account


Syntax

local result = discord.get_username()

Parameters

TypeNameDescription

Returns

TypeNameDescription
stringresultUsername of the connected Discord account, or false if not connected

Examples

Get the username of the connected discord account
local username = discord.get_username()

engine.print("info", "Discord username:", username)

On this page