Template:DiscordMessage: Difference between revisions

From ServantPedia™, the paid (but reliable) encyclopedia
Jump to navigation Jump to search
No edit summary
No edit summary
 
(30 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.
|content=Message content here.  
Use @mention to ping someone. |mentions=mention1#1234,mention2#5678
 
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>
<div class="content" style="white-space: pre-wrap;">{{#replace:{{{content}}}|@{{{mentions}}}|<span style="background: rgba(88,101,242,0.3); color: #c9cdfb; border-radius: 3px; padding: 0 2px;">@$1</span>}}</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


border-radius:50%;

Username 01-Jan-21 12:00 AM

Message content here.

Use @mention to ping someone.

@test



No description.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
avataravatar

Name of the image file.

Stringoptional
usernameusername

Discord username

Stringoptional
timestamptimestamp

no description

Stringoptional
contentcontent

no description

Stringoptional
mentionsmentions

Discord username

Stringoptional