Template:DiscordMessage: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| (26 intermediate revisions by the same user not shown) | |||
| Line 4: | Line 4: | ||
|username=Username | |username=Username | ||
|timestamp=01-Jan-21 12:00 AM | |timestamp=01-Jan-21 12:00 AM | ||
|content=Message content here. Use @mention to ping someone. | |content=Message content here. | ||
|mentions= | |||
Use @mention to ping someone. | |||
|mentions=@test | |||
}} | }} | ||
</noinclude> | </noinclude> | ||
<includeonly><div class="discord-message" style="display: flex; margin: 1em 0; padding: 0.5em; background: #36393f; border-radius: 4px; color: #dcddde; font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;"> | <includeonly><div class="discord-message" style="display: flex; margin: -1em 0 0 0; padding: 2em 1.3em 0.5em 1.1em; background: #36393f; border-radius: 4px; color: #dcddde; font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;"> | ||
<div class="avatar" style="margin-right: 1em;">[[File:{{{avatar}}}|50px|border-radius:50%;]]</div> | <div class="avatar" style="margin-right: 1em;">[[File:{{{avatar}}}|50px|border-radius:50%;]]</div> | ||
<div class="message-content" style="flex: 1;"> | <div class="message-content" style="flex: 1;"> | ||
| Line 15: | Line 17: | ||
<span class="timestamp" style="color: #72767d; font-size: 0.75em; margin-left: 0.5em;">{{{timestamp}}}</span> | <span class="timestamp" style="color: #72767d; font-size: 0.75em; margin-left: 0.5em;">{{{timestamp}}}</span> | ||
</div> | </div> | ||
{{{content}}} | |||
{{#if:{{{mentions|}}}|{{#ifeq:{{{mentions}}}|None||<div><span style="background: rgba(88,101,242,0.3); color: #c9cdfb; border-radius: 3px; padding: 0 2px;">{{{mentions}}}</span></div>}}}} | |||
</div></div></includeonly> | </div></div></includeonly> | ||
<noinclude> | |||
<templatedata> | |||
{ | |||
"params": { | |||
"avatar": { | |||
"description": "Name of the image file.", | |||
"type": "string" | |||
}, | |||
"username": { | |||
"description": "Discord username", | |||
"type": "string" | |||
}, | |||
"timestamp": { | |||
"type": "string" | |||
}, | |||
"content": { | |||
"type": "string" | |||
}, | |||
"mentions": { | |||
"description": "Discord username", | |||
"type": "string" | |||
} | |||
} | |||
} | |||
</templatedata> | |||
</noinclude> | |||
Latest revision as of 02:43, 12 April 2025
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| avatar | avatar | Name of the image file. | String | optional |
| username | username | Discord username | String | optional |
| timestamp | timestamp | no description | String | optional |
| content | content | no description | String | optional |
| mentions | mentions | Discord username | String | optional |