(fixed) |
(Update documentation) |
||
(One intermediate revision by the same user not shown) | |||
Line 4: | Line 4: | ||
Example: <code><nowiki>{{Discord tag|955229594842185758}}</nowiki></code> (which is [[Cmonster]]'s ID) outputs: {{Discord tag|955229594842185758}} | Example: <code><nowiki>{{Discord tag|955229594842185758}}</nowiki></code> (which is [[Cmonster]]'s ID) outputs: {{Discord tag|955229594842185758}} | ||
It will automatically link to that user's wiki page. If you don't want it to do that, you can set <code>|link=no</code>. Example: <code><nowiki>{{Discord tag|955229594842185758|link=no}}</nowiki></code> which outputs: {{Discord tag|955229594842185758|link=no}} | |||
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 22: | Line 24: | ||
"type": "string", | "type": "string", | ||
"default": "(no tag found)" | "default": "(no tag found)" | ||
}, | |||
"link": { | |||
"label": "Link?", | |||
"description": "If set to yes (which is the default), the output will also be a link to the user's wiki page.", | |||
"type": "boolean", | |||
"default": "yes", | |||
"suggested": true | |||
} | } | ||
}, | }, | ||
"description": "Outputs the Discord tag or username for a user. The tag is pulled 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.", | ||
"paramOrder": [ | |||
"1", | |||
"link", | |||
"default" | |||
] | |||
} | } | ||
</templatedata> | </templatedata> | ||
<includeonly> | |||
[[Category:Templates that query Cargo]] | |||
</includeonly> |
Latest revision as of 21:28, 20 October 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
It will automatically link to that user's wiki page. If you don't want it to do that, you can set |link=no
. Example: {{Discord tag|955229594842185758|link=no}}
which 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 Edit
Outputs the Discord tag or username for a user. The tag is pulled from the Discord tag field of that user's infobox.
Parameter | Description | Type | Status | |
---|---|---|---|---|
User | 1 | 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.
| String | required |
Link? | link | If set to yes (which is the default), the output will also be a link to the user's wiki page.
| Boolean | suggested |
default | default | What to output if no tag could be found.
| String | optional |