<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.mudlet.org/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADiscord_Functions%2Fpl</id>
	<title>Manual:Discord Functions/pl - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.mudlet.org/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADiscord_Functions%2Fpl"/>
	<link rel="alternate" type="text/html" href="https://wiki.mudlet.org/index.php?title=Manual:Discord_Functions/pl&amp;action=history"/>
	<updated>2026-06-04T15:55:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://wiki.mudlet.org/index.php?title=Manual:Discord_Functions/pl&amp;diff=10969&amp;oldid=prev</id>
		<title>WikiSysop: Updating translation from gettext import</title>
		<link rel="alternate" type="text/html" href="https://wiki.mudlet.org/index.php?title=Manual:Discord_Functions/pl&amp;diff=10969&amp;oldid=prev"/>
		<updated>2020-07-03T06:09:35Z</updated>

		<summary type="html">&lt;p&gt;Updating translation from gettext import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
{{TOC right}}&lt;br /&gt;
For an overview on how all of these functions tie in together, see our [[Special:MyLanguage/Manual:Scripting#Discord_Rich_Presence|Discord scripting overview]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;getdiscorddetail&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==getDiscordDetail==&lt;br /&gt;
&lt;br /&gt;
;getDiscordDetail()&lt;br /&gt;
: Returns the text used for the Discord Rich Presence detail field. See [https://discordapp.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields Discord docs] for a handy image reference on where the detail is shown.&lt;br /&gt;
&lt;br /&gt;
See also: &lt;br /&gt;
[[#setdiscorddetail|setDiscordDetail]]&lt;br /&gt;
&lt;br /&gt;
{{note}} Available since Mudlet 3.14.&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
print(&amp;quot;Discord detail is: &amp;quot;.. getDiscordDetail())&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;getdiscordlargeicon&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==getDiscordLargeIcon==&lt;br /&gt;
&lt;br /&gt;
;getDiscordLargeIcon()&lt;br /&gt;
: Returns the large icon name used for the Discord Rich Presence. See [https://discordapp.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields Discord docs] for a handy image reference on where the large icon is shown.&lt;br /&gt;
&lt;br /&gt;
See also: &lt;br /&gt;
[[#setdiscordlargeicon|setDiscordLargeIcon]]&lt;br /&gt;
&lt;br /&gt;
{{note}} Available since Mudlet 3.14.&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
print(&amp;quot;Discord large icon is: &amp;quot;.. getDiscordLargeIcon())&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;getdiscordlargeicontext&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==getDiscordLargeIconText==&lt;br /&gt;
&lt;br /&gt;
;getDiscordLargeIconText()&lt;br /&gt;
: Returns the text used as a tooltip for the large icon in the Discord Rich Presence. See [https://discordapp.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields Discord docs] for a handy image reference on where the large icon is shown.&lt;br /&gt;
&lt;br /&gt;
See also: &lt;br /&gt;
[[#setdiscordlargeicontext|setDiscordLargeIconText]]&lt;br /&gt;
&lt;br /&gt;
{{note}} Available since Mudlet 3.14.&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
print(&amp;quot;Discord large icon tooltip is: &amp;quot;.. setDiscordLargeIconText())&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;getdiscordparty&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==getDiscordParty==&lt;br /&gt;
&lt;br /&gt;
;getDiscordParty()&lt;br /&gt;
: Returns the current and max party values used in the Discord Rich Presence. See [https://discordapp.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields Discord docs] for a handy image reference on where the the party info is shown.&lt;br /&gt;
&lt;br /&gt;
See also: &lt;br /&gt;
[[#setdiscordparty|setDiscordParty]]&lt;br /&gt;
&lt;br /&gt;
{{note}} Available since Mudlet 3.14.&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local currentsize, maxsize = getDiscordParty()&lt;br /&gt;
print(string.format(&amp;quot;Discord party: %d out of %d&amp;quot;, currentsize, maxsize))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;getdiscordsmallicon&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==getDiscordSmallIcon==&lt;br /&gt;
&lt;br /&gt;
;getDiscordSmallIcon()&lt;br /&gt;
: Returns the small icon name used for the Discord Rich Presence. See [https://discordapp.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields Discord docs] for a handy image reference on where the small icon is shown.&lt;br /&gt;
&lt;br /&gt;
See also: &lt;br /&gt;
[[#setdiscordsmallicon|setDiscordSmallIcon]]&lt;br /&gt;
&lt;br /&gt;
{{note}} Available since Mudlet 3.14.&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
print(&amp;quot;Discord small icon is: &amp;quot;.. getDiscordSmallIcon())&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==getDiscordSmallIconText==&lt;br /&gt;
&lt;br /&gt;
;getDiscordSmallIconText()&lt;br /&gt;
: Returns the text used as a tooltip for the small icon in the Discord Rich Presence. See [https://discordapp.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields Discord docs] for a handy image reference on where the small icon is shown.&lt;br /&gt;
&lt;br /&gt;
See also: &lt;br /&gt;
[[#setdiscordsmallicontext|setDiscordSmallIconText]]&lt;br /&gt;
&lt;br /&gt;
{{note}} Available since Mudlet 3.14.&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
print(&amp;quot;Discord small icon tooltip is: &amp;quot;.. setDiscordSmallIconText())&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;getdiscordstate&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==getDiscordState==&lt;br /&gt;
&lt;br /&gt;
;getDiscordState()&lt;br /&gt;
: Returns the text used for the Discord Rich Presence state field. See [https://discordapp.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields Discord docs] for a handy image reference on where the state is shown.&lt;br /&gt;
&lt;br /&gt;
See also: &lt;br /&gt;
[[#setdiscordstate|setDiscordState]]&lt;br /&gt;
&lt;br /&gt;
{{note}} Available since Mudlet 3.14.&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
print(&amp;quot;Discord state is: &amp;quot;.. getDiscordState())&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;setdiscordapplicationid&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==setDiscordApplicationID==&lt;br /&gt;
&lt;br /&gt;
;setDiscordApplicationID(id)&lt;br /&gt;
: Set a custom Discord ID so Discord Rich Presence will show &amp;quot;Playing &amp;lt;your game&amp;gt;&amp;quot; instead of &amp;quot;Playing Mudlet&amp;quot;. This function is intended for game authors. Note that you can also set it [[Standards:Discord GMCP|automatically over GMCP]], no pre-installation of scripts required. The Discord privacy option &amp;quot;Enable Lua API&amp;quot; must be enabled for this to work. Returns true if the Discord application ID is in the correct format.&lt;br /&gt;
&lt;br /&gt;
If you&amp;#039;re a game author, you can register your game [https://discordapp.com/developers/applications/ over at Discord] to obtain the &amp;quot;client ID&amp;quot; to be used for this function. Once you do so, make sure to upload the games icon as an art asset under the name of &amp;lt;code&amp;gt;server-icon&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Mudlet calls the client ID an application ID to avoid confusion with the Mudlet internal Discord client ID.&lt;br /&gt;
&lt;br /&gt;
;Parameters &lt;br /&gt;
* &amp;#039;&amp;#039;id:&amp;#039;&amp;#039; (required) id as a string.&lt;br /&gt;
&lt;br /&gt;
[[File:Mudlet Discord ApplicationID.png|thumb|right]]&lt;br /&gt;
&lt;br /&gt;
See also: &lt;br /&gt;
[[#setdiscordgame|setDiscordGame]], [[#usingmudletsdiscordid|usingMudletsDiscordID]]&lt;br /&gt;
&lt;br /&gt;
{{note}} Available since Mudlet 3.14.&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- set the ID to Mudlets own as an example&lt;br /&gt;
setDiscordApplicationID(&amp;quot;450571881909583884&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{note}} So you do not have to remember that long number you can also reset to the default Mudlet ID by calling this function without an argument:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setDiscordApplicationID()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;setdiscorddetail&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==setDiscordDetail==&lt;br /&gt;
&lt;br /&gt;
;setDiscordDetail()&lt;br /&gt;
: Sets the text to be shown in the detail field of Discord Rich Presence. See [https://discordapp.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields Discord docs] for a handy image reference on where the detail is shown. Note that this will overwrite the same information set by [[#setdiscordgame|setDiscordGame()]].&lt;br /&gt;
&lt;br /&gt;
See also: &lt;br /&gt;
[[#getdiscorddetail|getDiscordDetail]], [[#setdiscordgame|setDiscordGame]]&lt;br /&gt;
&lt;br /&gt;
{{note}} To ensure privacy, the detail will only be shown if the Lua API is enabled and the detail is not hidden.&lt;br /&gt;
&lt;br /&gt;
{{note}} Available since Mudlet 3.14.&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- set detail to your character name in-game, as an example&lt;br /&gt;
setDiscordDetail(&amp;quot;Vadi&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;setdiscordelapsedstarttime&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==setDiscordElapsedStartTime==&lt;br /&gt;
&lt;br /&gt;
;setDiscordElapsedStartTime(time)&lt;br /&gt;
: Sets the time to be shown for &amp;quot;## elapsed&amp;quot; field in Discord Rich Presence. See [https://discordapp.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields Discord docs] for a handy image reference on where the elapsed time is shown.&lt;br /&gt;
&lt;br /&gt;
;Parameters &lt;br /&gt;
* &amp;#039;&amp;#039;time:&amp;#039;&amp;#039; (required) time as a [https://en.wikipedia.org/wiki/Unix_time Unix time]. To get the current Unix time in Lua, use &amp;lt;code&amp;gt;os.time(os.date(&amp;quot;*t&amp;quot;))&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
See also: &lt;br /&gt;
[[#setdiscordremainingendtime|setDiscordRemainingEndTime]]&lt;br /&gt;
&lt;br /&gt;
{{note}} To ensure privacy, the time will only be shown if the Lua API is enabled and the time is not hidden.&lt;br /&gt;
&lt;br /&gt;
{{note}} Available since Mudlet 3.14.&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- set the timer to start counting up from now:&lt;br /&gt;
setDiscordElapsedStartTime(os.time(os.date(&amp;quot;*t&amp;quot;)))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;setdiscordgame&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==setDiscordGame==&lt;br /&gt;
&lt;br /&gt;
;setDiscordGame()&lt;br /&gt;
: Sets the given game to be shown in the &amp;quot;detail&amp;quot; field and the game&amp;#039;s icon as the large icon in Discord Rich Presence. See [https://discordapp.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields Discord docs] for a handy image reference on where the detail and large icon is shown. This is an alternative way of showing which game you&amp;#039;re playing - a better way, if you&amp;#039;re the game author, is to use [[Standards:Discord GMCP|GMCP]] (no pre-installation of scripts required) or [[#setdiscordapplicationid|setDiscordApplicationID()]].&lt;br /&gt;
&lt;br /&gt;
Currently supported games are: Achaea, Aetolia, Imperian, Luminari, Lusternia, MidMUD, Starmourn, WoTMUD. To add a new game to the list, [https://www.mudlet.org/contact/ get in touch].&lt;br /&gt;
&lt;br /&gt;
See also: &lt;br /&gt;
[[#setdiscordapplicationid|setDiscordApplicationID]]&lt;br /&gt;
&lt;br /&gt;
{{note}} To ensure privacy, the game and icon will only be shown if the Lua API is enabled, and detail and large icon are set to show.&lt;br /&gt;
&lt;br /&gt;
{{note}} Available since Mudlet 3.14.&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setDiscordGame(&amp;quot;WoTMUD&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;setdiscordlargeicon&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==setDiscordLargeIcon==&lt;br /&gt;
&lt;br /&gt;
;setDiscordLargeIcon()&lt;br /&gt;
: Sets the large icon to be shown in Discord Rich Presence. See [https://discordapp.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields Discord docs] for a handy image reference the icon is shown.&lt;br /&gt;
&lt;br /&gt;
Icons supported by default in Mudlet: armor, axe, backpack, bow, coin, dagger, envelope, gem-blue, gem-green, gem-red, hammer, heart, helmet, map, shield, tome, tools, wand, wood-sword ([https://opengameart.org/content/fantasy-icon-pack-by-ravenmore-0 icons credit]). To add a new icon to the list, [https://www.mudlet.org/contact/ get in touch] (the Discord limit is 150 icons).&lt;br /&gt;
&lt;br /&gt;
If you&amp;#039;re a game author, you can register your own game with Discord and upload your own icons instead of using the ones registered by Mudlet, see [[#setdiscordapplicationid|setDiscordApplicationID()]].&lt;br /&gt;
&lt;br /&gt;
See also: &lt;br /&gt;
[[#getdiscordlargeicon|getDiscordLargeIcon]], [[#setdiscordlargeicontext|setDiscordLargeIconText]], [[#setdiscordapplicationid|setDiscordApplicationID]]&lt;br /&gt;
&lt;br /&gt;
{{note}} To ensure privacy, the icon will only be shown if the Lua API is enabled and the large icon is not hidden.&lt;br /&gt;
&lt;br /&gt;
{{note}} Available since Mudlet 3.14.&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setDiscordLargeIcon(&amp;quot;coin&amp;quot;)&lt;br /&gt;
setDiscordLargeIconText(&amp;quot;Fishing&amp;quot;)&lt;br /&gt;
setDiscordState(&amp;quot;Fishing&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;setdiscordlargeicontext&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==setDiscordLargeIconText==&lt;br /&gt;
&lt;br /&gt;
;setDiscordLargeIconText()&lt;br /&gt;
: Sets the tooltip for the large icon in the Discord Rich Presence. See [https://discordapp.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields Discord docs] for a handy image reference the large icon is shown.&lt;br /&gt;
&lt;br /&gt;
See also: &lt;br /&gt;
[[#setdiscordlargeicon|setDiscordLargeIcon]]&lt;br /&gt;
&lt;br /&gt;
{{note}} To ensure privacy, the tooltip will only be shown if the Lua API is enabled, and large icon with the large icon tooltip is set to show.&lt;br /&gt;
&lt;br /&gt;
{{note}} Available since Mudlet 3.14.&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setDiscordLargeIcon(&amp;quot;axe&amp;quot;)&lt;br /&gt;
setDiscordLargeIconText(&amp;quot;Killing heterics&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;setdiscordparty&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==setDiscordParty==&lt;br /&gt;
&lt;br /&gt;
;setDiscordParty(current, max)&lt;br /&gt;
: Sets the party information the Discord Rich Presence. See [https://discordapp.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields Discord docs] for a handy image reference the party is shown.&lt;br /&gt;
&lt;br /&gt;
;Parameters &lt;br /&gt;
* &amp;#039;&amp;#039;current:&amp;#039;&amp;#039; (required) current party amount.&lt;br /&gt;
* &amp;#039;&amp;#039;max:&amp;#039;&amp;#039; (optional) max party amount - if not provided, then the max is set to the current amount.&lt;br /&gt;
&lt;br /&gt;
See also: &lt;br /&gt;
[[#getdiscordparty|getDiscordParty]]&lt;br /&gt;
&lt;br /&gt;
{{note}} To ensure privacy, the party will only be shown if the Lua API is enabled and the party information is not hidden.&lt;br /&gt;
&lt;br /&gt;
{{note}} Available since Mudlet 3.14.&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- show that 5 out of 10 people are in currently in the party&lt;br /&gt;
setDiscordParty(5, 10)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;setdiscordremainingendtime&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==setDiscordRemainingEndTime==&lt;br /&gt;
&lt;br /&gt;
;setDiscordRemainingEndTime(time)&lt;br /&gt;
: Sets the time to be shown for &amp;quot;## remaining&amp;quot; field in Discord Rich Presence. See [https://discordapp.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields Discord docs] for a handy image reference on where the remaining time is shown.&lt;br /&gt;
&lt;br /&gt;
;Parameters &lt;br /&gt;
* &amp;#039;&amp;#039;time:&amp;#039;&amp;#039; (required) time as a [https://en.wikipedia.org/wiki/Unix_time Unix time]. To get the current Unix time in Lua, use &amp;lt;code&amp;gt;os.time(os.date(&amp;quot;*t&amp;quot;))&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
See also: &lt;br /&gt;
[[#setdiscordelapsedstarttime|setDiscordElapsedStartTime]]&lt;br /&gt;
&lt;br /&gt;
{{note}} To ensure privacy, the time will only be shown if the Lua API is enabled and the time is not hidden.&lt;br /&gt;
&lt;br /&gt;
{{note}} Available since Mudlet 3.14.&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- set the timer to start counting down from an hour from now&lt;br /&gt;
setDiscordRemainingEndTime(os.time(os.date(&amp;quot;*t&amp;quot;))+(60 * 60))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;setdiscordsmallicon&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==setDiscordSmallIcon==&lt;br /&gt;
&lt;br /&gt;
;setDiscordSmallIcon()&lt;br /&gt;
: Sets the small icon to be shown in Discord Rich Presence. See [https://discordapp.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields Discord docs] for a handy image reference the icon is shown.&lt;br /&gt;
&lt;br /&gt;
Icons supported by default in Mudlet: armor, axe, backpack, bow, coin, dagger, envelope, gem-blue, gem-green, gem-red, hammer, heart, helmet, map, shield, tome, tools, wand, wood-sword ([https://opengameart.org/content/fantasy-icon-pack-by-ravenmore-0 icons credit]). To add a new icon to the list, [https://www.mudlet.org/contact/ get in touch] (the Discord limit is 150 icons).&lt;br /&gt;
&lt;br /&gt;
If you&amp;#039;re a game author, you can register your own game with Discord and upload your own icons instead of using the ones registered by Mudlet, see [[#setdiscordapplicationid|setDiscordApplicationID()]].&lt;br /&gt;
&lt;br /&gt;
See also: &lt;br /&gt;
[[#getdiscordsmallicon|getDiscordSmallIcon]], [[#setdiscordsmallicontext|setDiscordSmallIconText]], [[#setdiscordapplicationid|setDiscordApplicationID]]&lt;br /&gt;
&lt;br /&gt;
{{note}} To ensure privacy, the icon will only be shown if the Lua API is enabled and the small icon is not hidden.&lt;br /&gt;
&lt;br /&gt;
{{note}} Available since Mudlet 3.14.&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setDiscordSmallIcon(&amp;quot;envelope&amp;quot;)&lt;br /&gt;
setDiscordSmallIconText(&amp;quot;Writing letters&amp;quot;)&lt;br /&gt;
setDiscordState(&amp;quot;Writing letters&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;setdiscordsmallicontext&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==setDiscordSmallIconText==&lt;br /&gt;
&lt;br /&gt;
;setDiscordSmallIconText()&lt;br /&gt;
: Sets the tooltip for the small icon in the Discord Rich Presence. See [https://discordapp.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields Discord docs] for a handy image reference the small icon is shown.&lt;br /&gt;
&lt;br /&gt;
See also: &lt;br /&gt;
[[#setdiscordsmallicon|setDiscordSmallIcon]]&lt;br /&gt;
&lt;br /&gt;
{{note}} To ensure privacy, the tooltip will only be shown if the Lua API is enabled, and small icon with the small icon tooltip is set to show.&lt;br /&gt;
&lt;br /&gt;
{{note}} Available since Mudlet 3.14.&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setDiscordSmallIcon(&amp;quot;map&amp;quot;)&lt;br /&gt;
setDiscordSmallIconText(&amp;quot;Exploring&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;setdiscordstate&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==setDiscordState==&lt;br /&gt;
&lt;br /&gt;
;setDiscordState(state)&lt;br /&gt;
: Sets the text to be shown in the state field of Discord Rich Presence. See [https://discordapp.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields Discord docs] for a handy image reference on where the state is shown.&lt;br /&gt;
&lt;br /&gt;
See also: &lt;br /&gt;
[[#getdiscordstate|getDiscordState]], [[#setdiscorddetail|setDiscordDetail]]&lt;br /&gt;
&lt;br /&gt;
{{note}} To ensure privacy, the state will only be shown if the Lua API is enabled and the state is not hidden.&lt;br /&gt;
&lt;br /&gt;
{{note}}  Available since Mudlet 3.14.&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- set state to your current area&lt;br /&gt;
local currentarea = getRoomArea(getPlayerRoom())&lt;br /&gt;
local areaname = getAreaTableSwap()[currentarea]&lt;br /&gt;
setDiscordDetail(areaname)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;usingmudletsdiscordid&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
==usingMudletsDiscordID==&lt;br /&gt;
&lt;br /&gt;
;usingMudletsDiscordID()&lt;br /&gt;
: Returns true if the currently playing game is set to &amp;quot;Mudlet&amp;quot;. You can change this with [[#setdiscordapplicationid|setDiscordApplicationID()]].&lt;br /&gt;
&lt;br /&gt;
See also: &lt;br /&gt;
[[#setdiscordapplicationid|setDiscordApplicationID]]&lt;br /&gt;
&lt;br /&gt;
{{note}} Available since Mudlet 3.14.&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
if usingMudletsDiscordID() then&lt;br /&gt;
  print(&amp;#039;It is showing &amp;quot;Playing Mudlet&amp;quot; right now!&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
</feed>