Difference between revisions of "Template:Discord message"

(For formatting Discord messages and their metadata on reference pages)
 
m (Trying to figure out a paragraph break problem)
Line 1: Line 1:
'''{{{author}}}''' at {{#if:{{{url|}}}|[{{{url}}} {{{date|{{#time:F j, Y H:i:s|@{{#expr:floor({{#titleparts:{{{url}}}|1|-1}} / 4194304000) + 1420070400}}}} (UTC)}}}]|{{{date}}}}} in ''{{{channel}}}'' on ''{{{server}}}'':
+
'''{{{author}}}''' at {{#if:{{{url|}}}|[{{{url}}} {{{date|{{#time:F j, Y H:i:s|@{{#expr:floor({{#titleparts:{{{url}}}|1|-1}} / 4194304000) + 1420070400}}}} (UTC)}}}]|{{{date}}}}} in ''{{{channel}}}'' on ''{{{server}}}'':<blockquote>{{{text}}}</blockquote><noinclude><!--
<blockquote>{{{text}}}</blockquote><noinclude><!--
 
 
Discord's identifier numbers include a timestamp. The exact format is documented here:
 
Discord's identifier numbers include a timestamp. The exact format is documented here:
 
https://discord.com/developers/docs/reference#snowflakes
 
https://discord.com/developers/docs/reference#snowflakes
 
We extract this timestamp and use it to automatically fill out the message date/time.
 
We extract this timestamp and use it to automatically fill out the message date/time.
 
-->{{documentation}}</noinclude>
 
-->{{documentation}}</noinclude>

Revision as of 17:24, 4 May 2021

{{{author}}} at {{{date}}} in {{{channel}}} on {{{server}}}:

{{{text}}}

Template documentation[view] [edit] [history] [purge]

Template for formatting Discord messages with author, URL, etc. on reference pages.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Message URLurl

URL of the quoted Discord message.

Example
https://discord.com/channels/341414079673401346/354051647133057024/599347550109302799
URLsuggested
Authorauthor

The Discord username of the author of the message.

Example
Chogon
Stringrequired
Message date and timedate

The time at which the message was sent. This time is automatically extracted from the message URL if possible, so usually it doesn't need to be set manually.

Default
(extracted from message URL)
Example
April 30, 2021 16:13:39 (UTC)
Stringoptional
Channel namechannel

The name of the channel in which the message was posted.

Example
#moula-discussion
Stringrequired
Server nameserver

The name of the Discord server in which the message was posted.

Example
Official Cyan Chat
Stringrequired
Message texttext

The text content of the message.

Example
Since we are sharing old stuff... the static version of cho.cyan.com can still be accessed at: https://s3.amazonaws.com/cho.cyan.com/index.html
Contentrequired