SetDiscordRichPresenceSmallAsset: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Client function}} The function, you can set the small image of the application. The maximum size of Assets is ''1024x1024'', the minimum ''512x512''. ==Syntax== <syntaxhighlight lang="lua"> bool setDiscordRichPresenceSmallAsset(string assetImage, string text) </syntaxhighlight> {{OOP||DiscordRPC:setSmallAsset}} ===Required arguments=== *'''assetImage''': a string indicating the image you uploaded to your application's asset list. *'''text''': a strin...") |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function}} | {{Client function}} | ||
{{Important Note|To use this function, you must set up own application [[setDiscordApplicationID]]}} | |||
The function, you can set the small image of the application. The maximum size of Assets is ''1024x1024'', the minimum ''512x512''. | The function, you can set the small image of the application. The maximum size of Assets is ''1024x1024'', the minimum ''512x512''. | ||
Revision as of 20:07, 10 October 2023
Important Note: To use this function, you must set up own application setDiscordApplicationID |
The function, you can set the small image of the application. The maximum size of Assets is 1024x1024, the minimum 512x512.
Syntax
bool setDiscordRichPresenceSmallAsset(string assetImage, string text)
OOP Syntax Help! I don't understand this!
- Method: DiscordRPC:setSmallAsset(...)
Required arguments
- assetImage: a string indicating the image you uploaded to your application's asset list.
- text: a string displayed if someone hovers over the image in Discord.
Returns
Returns true if function succeeds, false if the client has disabled synchronisation.
Example
The example sets the image to my_logo.
addCommandHandler("setsmalllogo", function () if isDiscordRichPresenceConnected() then setDiscordRichPresenceSmallAsset("my_small_logo", "This is my small logo!") end end )