discord.get_username

Client

Retrieves the username of the currently connected Discord account


Syntax

local result = discord.get_username()

Parameters

No parameters are accepted by this function

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