Template:cite Discord: Difference between revisions

From sona pona, the Toki Pona wiki
Content added Content deleted
No edit summary
No edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#if:{{{name|}}}|{{{name}}}{{#if:{{{username|}}}|<nowiki/> [@{{{username}}}]}}|{{#if:{{{username|}}}|@{{{username}}}|{{Error|User not specified}}}}}} ({{#time:d F Y|@{{#expr:trunc({{#explode:{{{url}}}|/|-1}}/4194304000)+1420070400}}}}). [{{{url}}} [{{{message type|Message}}} posted{{#if:{{{thread|}}}|<nowiki/> in the <code>#{{{thread}}}</code> thread}} in the <code>#{{{channel}}}</code> channel in the {{{server}}} Discord server<nowiki>]</nowiki>].{{#if:{{{quote|}}}|<nowiki/> "{{{quote}}}".}} ''Discord''.{{#if:{{{retrieved|}}}|<nowiki/> Retrieved {{{retrieved}}}.}}<noinclude>
{{cite web|url={{{url}}}|title={{#if:{{{title|}}}|{{{title}}} <nowiki />}}<nowiki>[</nowiki>{{ucfirst:{{{message type|message}}}}} posted{{#if:{{{thread|}}}|<nowiki/> in the <code>#{{#replace:{{{thread}}}|#}}</code> thread}} in the <code>#{{#replace:{{{channel}}}|#}}</code> channel in the {{{server}}} Discord server<nowiki>]</nowiki>|delimiters={{{delimiters|}}}|trans-title={{{trans-title|}}}|language={{{lang|{{{language|}}}}}}|author={{{name|{{{author|}}}}}}|username={{#if:{{{username|}}}|@{{#replace:{{{username}}}|@}}}}|date={{{date|@{{#expr:trunc({{#explode:{{{url}}}|/|-1}}/4194304000)+1420070400}}}}}|website={{{website|Discord}}}|publisher={{{publisher|}}}|archive-url={{{archive-url|}}}|archive-date={{{archive-date|}}}|access-date={{{retrieved|{{{access-date|}}}}}}|quote={{{quote|}}}}}<noinclude>

==Documentation==
This template is a variant of [[Template:cite web]] for citing Discord messages. While all of the parameters for that template still work here, this version has more convenient parameters that can be used instead.

<pre>
<ref>{{cite Discord|url=|channel=|server=|author=|username=|access-date=|quote=}}</ref>
</pre>

If the message is within a thread, add this parameter: <code>|thread=</code>

To change the word "Message", add this parameter: <code>|message type=</code>
[[Category:Citation templates]]

===Template data===
<templatedata>
<templatedata>
{
{
Line 6: Line 20:
"example": "sonjalang",
"example": "sonjalang",
"type": "string",
"type": "string",
"suggested": true,
"label": "Username",
"label": "Username",
"description": "Speaker's username (without @ symbol)"
"description": "Author's username",
"required": true
},
"name": {
"example": "{{tok|[[jan Sonja]]}}",
"type": "string",
"required": true,
"label": "Name",
"description": "Speaker's Toki Pona name or legal name (not always the same as Discord display name)"
},
},
"server": {
"server": {
"example": "{{tp|[[ma pona pi toki pona]]}}",
"example": "{{tp|ma pona pi toki pona}}",
"type": "string",
"type": "string",
"required": true,
"required": true,
"label": "Server",
"label": "Server",
"description": "Name of server"
"description": "Title of the Discord server where the message was sent"
},
},
"channel": {
"channel": {
"example": "pana-sona",
"example": "{{tok|pana-sona}}",
"type": "string",
"type": "string",
"required": true,
"required": true,
"label": "Channel",
"label": "Channel",
"description": "Name of channel (without # symbol)"
"description": "Title of the channel where the message was sent"
},
},
"quote": {
"quote": {
"example": "visually i resemble a deer",
"example": "visually i resemble a deer",
"type": "string",
"type": "line",
"suggested": true,
"suggested": true,
"label": "Quote",
"label": "Quote",
"description": "Relevant part of message (if long, place in a separate paragraph after template)"
"description": "Specific quote to cite. If long, place in a separate blockquote after this template."
},
"retrieved": {
"example": "16 October 2023",
"type": "date",
"suggested": true,
"label": "Retrieval date",
"description": "Date the citation was added"
},
},
"url": {
"url": {
"example": "https://discord.com/channels/301377942062366741/301378960468738050/805912264334508132",
"example": "//discord.com/channels/301377942062366741/301378960468738050/805912264334508132",
"type": "url",
"type": "url",
"required": true,
"required": true,
"label": "URL",
"label": "URL",
"description": "Link to the message"
"description": "Web address of the message you're citing. In the message's context menu, press Copy Message Link and paste this here."
},
},
"message type": {
"message type": {
Line 57: Line 57:
"type": "string",
"type": "string",
"label": "Message type",
"label": "Message type",
"description": "Noun to use instead of \"Message\", first letter uppercase"
"description": "Noun to use instead of \"Message\""
},
},
"thread": {
"thread": {
Line 63: Line 63:
"suggested": true,
"suggested": true,
"label": "Thread",
"label": "Thread",
"description": "Name of thread, if applicable"
"description": "Title of the thread where the message was sent, if applicable"
},
"author": {
"aliases": [
"name"
],
"label": "Author",
"description": "Author's Toki Pona name or legal name. Not always the same as their current Discord display name.",
"example": "{{tok|[[jan Sonja]]}}",
"type": "line",
"suggested": true
},
"access-date": {
"aliases": [
"retrieved"
],
"label": "Access date",
"description": "Full date when the message was accessed",
"example": "16 October 2023",
"type": "date",
"suggested": true
},
"title": {
"label": "Title",
"description": "Included for compatibility with {{cite web}}",
"type": "string",
"deprecated": "|message type=|thread=|channel=|server="
},
"date": {
"label": "Source date",
"description": "Included for compatibility with {{cite web}}",
"type": "date",
"deprecated": "Automatically calculated from the URL"
},
"website": {
"label": "Website name",
"description": "Included for compatibility with {{cite web}}",
"type": "string",
"default": "Discord",
"deprecated": true
},
"publisher": {
"label": "Publisher",
"description": "Included for compatibility with {{cite web}}",
"type": "string",
"deprecated": true
},
"trans-title": {
"label": "Translated title",
"description": "Included for compatibility with {{cite web}}",
"type": "string",
"deprecated": true
},
"language": {
"aliases": [
"lang"
],
"label": "Language",
"description": "Included for compatibility with {{cite web}}",
"type": "string",
"deprecated": true
},
"archive-url": {
"label": "Archive URL",
"description": "Included for compatibility with {{cite web}}",
"type": "url",
"deprecated": true
},
"archive-date": {
"label": "Archive date",
"description": "Included for compatibility with {{cite web}}",
"type": "date",
"deprecated": true
},
"delimiters": {
"label": "Delimiters",
"description": "Included for compatibility with {{cite web}}",
"type": "string",
"deprecated": true
}
}
},
},
"paramOrder": [
"paramOrder": [
"name",
"author",
"username",
"username",
"date",
"url",
"url",
"server",
"title",
"channel",
"message type",
"thread",
"thread",
"channel",
"server",
"delimiters",
"trans-title",
"language",
"quote",
"quote",
"retrieved",
"website",
"message type"
"publisher",
"archive-url",
"archive-date",
"access-date"
],
],
"description": "Use in a <ref> tag to cite a Discord message. The message date will automatically be calculated from the link."
"description": "Cites a Discord message"
}
}
</templatedata>
</templatedata>

Latest revision as of 13:20, 1 February 2024

(Error: Invalid time.). [{{{url}}} [Message posted in the #{{{channel}}} channel in the {{{server}}} Discord server]]. Discord.

Documentation[edit source]

This template is a variant of Template:cite web for citing Discord messages. While all of the parameters for that template still work here, this version has more convenient parameters that can be used instead.

<ref>{{cite Discord|url=|channel=|server=|author=|username=|access-date=|quote=}}</ref>

If the message is within a thread, add this parameter: |thread=

To change the word "Message", add this parameter: |message type=

Template data[edit source]

Cites a Discord message

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Authorauthor name

Author's Toki Pona name or legal name. Not always the same as their current Discord display name.

Example
{{tok|[[jan Sonja]]}}
Linesuggested
Usernameusername

Author's username

Example
sonjalang
Stringrequired
Source datedate

Included for compatibility with {{cite web}}

Datedeprecated
URLurl

Web address of the message you're citing. In the message's context menu, press Copy Message Link and paste this here.

Example
//discord.com/channels/301377942062366741/301378960468738050/805912264334508132
URLrequired
Titletitle

Included for compatibility with {{cite web}}

Stringdeprecated
Message typemessage type

Noun to use instead of "Message"

Default
Message
Example
Informal poll
Stringoptional
Threadthread

Title of the thread where the message was sent, if applicable

Stringsuggested
Channelchannel

Title of the channel where the message was sent

Example
{{tok|pana-sona}}
Stringrequired
Serverserver

Title of the Discord server where the message was sent

Example
{{tp|ma pona pi toki pona}}
Stringrequired
Delimitersdelimiters

Included for compatibility with {{cite web}}

Stringdeprecated
Translated titletrans-title

Included for compatibility with {{cite web}}

Stringdeprecated
Languagelanguage lang

Included for compatibility with {{cite web}}

Stringdeprecated
Quotequote

Specific quote to cite. If long, place in a separate blockquote after this template.

Example
visually i resemble a deer
Linesuggested
Website namewebsite

Included for compatibility with {{cite web}}

Default
Discord
Stringdeprecated
Publisherpublisher

Included for compatibility with {{cite web}}

Stringdeprecated
Archive URLarchive-url

Included for compatibility with {{cite web}}

URLdeprecated
Archive datearchive-date

Included for compatibility with {{cite web}}

Datedeprecated
Access dateaccess-date retrieved

Full date when the message was accessed

Example
16 October 2023
Datesuggested