SetDiscordApplicationID: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
{{Client function}} | {{Client function}} | ||
{{Important Note|To reset, please use [[resetDiscordRichPresenceData]]}} | {{Important Note|To reset, please use [[resetDiscordRichPresenceData]]}} | ||
{{Important Note|In order for the function to work correctly, each must set in the discord -> settings -> activity privacy -> activity status to on.}} | |||
The function can assign your own application to use in Rich Presence. | The function can assign your own application to use in Rich Presence. | ||
You can create own '''[https://discord.com/developers/applications here]''' | You can create own '''[https://discord.com/developers/applications here]''' |
Revision as of 20:23, 10 October 2023
Important Note: To reset, please use resetDiscordRichPresenceData |
Important Note: In order for the function to work correctly, each must set in the discord -> settings -> activity privacy -> activity status to on. |
The function can assign your own application to use in Rich Presence. You can create own here
Syntax
bool setDiscordApplicationID(string applicationKey)
OOP Syntax Help! I don't understand this!
- Method: DiscordRPC:setApplication(...)
Required arguments
- applicationKey: a string represent key your's Application on Discord.
Returns
Returns true if function succeeds, false if the client has disabled synchronisation.
Example
This example prints out if the application was successfully set up and set custom asset image.
local app_key = "YOUR_APPLICATION_KEY" if setDiscordApplicationID(app_key) then setDiscordRichPresenceAsset("asset_name_from_application") outputChatBox("Yay, we using now own application!") end