IsDiscordRichPresenceConnected: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Client function}}
{{Client function}}
{{New feature/item|3.0162|1.6.0|22269|
{{New feature/item|3.0161|1.6.0|22270|
The function checks if the client has Discord Rich Presence enabled.
The function checks if the client has Discord Rich Presence enabled.
}}
}}

Latest revision as of 22:12, 11 October 2023

ADDED/UPDATED IN VERSION 1.6.0 r22270:

The function checks if the client has Discord Rich Presence enabled.

Syntax

bool isDiscordRichPresenceConnected()

OOP Syntax Help! I don't understand this!

Method: DiscordRPC:isConnected(...)


Returns

Returns true if Discord Rich Presence is enabled on the client, false if disabled.

Example

This example outputs whether the client has enabled Discord Rich Presence.

addCommandHandler("checkdiscord",
    function ()
        if isDiscordRichPresenceConnected() then 
            outputChatBox("You are using Discord Rich Presence, that's cool!")
        end 
    end
)

See Also

ADDED/UPDATED IN VERSION 1.6.0 r22270:
ADDED/UPDATED IN VERSION 1.6.0 r22276:
ADDED/UPDATED IN VERSION 1.6.0 r22342: