SetDiscordRichPresenceSmallAsset: 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 use this function, you must set up your own application [[setDiscordApplicationID]]}} | {{Important Note|To use this function, you must set up your own application [[setDiscordApplicationID]]}} | ||
{{New feature/item|3. | {{New feature/item|3.0161|1.6.0|22270| | ||
Using this function, you can set the small image asset of the application. The maximum size of assets is ''1024x1024'', the minimum ''512x512''. | Using this function, you can set the small image asset of the application. The maximum size of assets is ''1024x1024'', the minimum ''512x512''. | ||
}} | }} |
Latest revision as of 22:13, 11 October 2023
Important Note: To use this function, you must set up your own application setDiscordApplicationID |
Syntax
bool setDiscordRichPresenceSmallAsset(string assetImage, string text)
OOP Syntax Help! I don't understand this!
- Method: DiscordRPC:setSmallAsset(...)
Required arguments
- assetImage: a string containing the key of the small image asset you uploaded to your application's asset list.
- text: a string containing the hover text of the small image asset.
Returns
Returns true if function succeeds, false otherwise.
Example
The example sets the small image asset to my_logo.
addCommandHandler("setsmalllogo", function () if isDiscordRichPresenceConnected() then setDiscordRichPresenceSmallAsset("my_small_logo", "This is my small logo!") end end )