Template:Discord tag/doc: Difference between revisions

From Irony Wiki
Jump to navigation Jump to search
(doc)
 
(fixed)
Line 1: Line 1:
Outputs the Discord tag or username for a user. The link is pulled (via [[Special:CargoTables/users|Cargo]]) from that user's infobox.
Outputs the Discord tag or username for a user. The link is pulled (via [[Special:CargoTables/users|Cargo]]) from that user's infobox.
Note: The output will be ''exactly'' the same as the entire "Discord tag" field in the infobox. On some pages, this field includes extra formatting, notes, or multiple tags. This is because I haven't yet figured out how to extract only the actual tag.


Usage: <code>&#123;&#123;Discord tag|''name or Discord ID''}}</code>
Usage: <code>&#123;&#123;Discord tag|''name or Discord ID''}}</code>


Example: <code><nowiki>{{Discord tag|301164188070576128}}</nowiki></code> (which is [[Cmonster]]'s ID) outputs: {{Discord tag|301164188070576128}}
Example: <code><nowiki>{{Discord tag|955229594842185758}}</nowiki></code> (which is [[Cmonster]]'s ID) outputs: {{Discord tag|955229594842185758}}


Using an ID is recommended, as names are more likely to change. If using a name, it must match the name at the very top of the infobox. If using an ID, it must match the first ID in the Discord ID field of the infobox.
Using an ID is recommended, as names are more likely to change. If using a name, it must match the name at the very top of the infobox. If using an ID, it must match the first ID in the Discord ID field of the infobox.
Line 16: Line 14:
"label": "User",
"label": "User",
"description": "The name or Discord ID of the user. ID is recommended, as names are more likely to change. If using a name, it must match the name at the very top of the infobox. If using an ID, it must match the first ID in the Discord ID field of the infobox.",
"description": "The name or Discord ID of the user. ID is recommended, as names are more likely to change. If using a name, it must match the name at the very top of the infobox. If using an ID, it must match the first ID in the Discord ID field of the infobox.",
"example": "301164188070576128",
"example": "955229594842185758",
"type": "string",
"type": "string",
"required": true
"required": true
Line 26: Line 24:
}
}
},
},
"description": "Outputs the Discord tag or username for a user. The tag is pulled verbatim from the Discord tag field of that user's infobox."
"description": "Outputs the Discord tag or username for a user. The tag is pulled from the Discord tag field of that user's infobox."
}
}
</templatedata>
</templatedata>

Revision as of 08:04, 18 July 2023

Outputs the Discord tag or username for a user. The link is pulled (via Cargo) from that user's infobox.

Usage: {{Discord tag|name or Discord ID}}

Example: {{Discord tag|955229594842185758}} (which is Cmonster's ID) outputs: hornymemelover

Using an ID is recommended, as names are more likely to change. If using a name, it must match the name at the very top of the infobox. If using an ID, it must match the first ID in the Discord ID field of the infobox.

TemplateData

Outputs the Discord tag or username for a user. The tag is pulled from the Discord tag field of that user's infobox.

Template parameters

ParameterDescriptionTypeStatus
User1

The name or Discord ID of the user. ID is recommended, as names are more likely to change. If using a name, it must match the name at the very top of the infobox. If using an ID, it must match the first ID in the Discord ID field of the infobox.

Example
955229594842185758
Stringrequired
defaultdefault

What to output if no tag could be found.

Default
(no tag found)
Stringoptional