mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 22:47:04 +01:00
Fixes and Handling nick mentions to usernames
This commit is contained in:
parent
aaaf735554
commit
f5d53dd89a
@ -2,6 +2,7 @@
|
||||
Discord webpage embedded client
|
||||
|
||||
## Required PIP Packages
|
||||
- flask
|
||||
- flask-sqlalchemy
|
||||
- cachetools
|
||||
- Flask-Cache
|
||||
|
@ -217,6 +217,7 @@ function replace_message_mentions(message) {
|
||||
for (var i = 0; i < mentions.length; i++) {
|
||||
var mention = mentions[i];
|
||||
message.content = message.content.replace(new RegExp("<@" + mention.id + ">", 'g'), "@" + mention.username + "#" + mention.discriminator);
|
||||
message.content = message.content.replace(new RegExp("<@!" + mention.id + ">", 'g'), "@" + mention.username + "#" + mention.discriminator);
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@
|
||||
<div class="nav-wrapper container">
|
||||
<a href="/" class="brand-logo"><b>Titan</b>Embeds <span class="betatag">BETA</span></a>
|
||||
<ul id="nav-mobile" class="right">
|
||||
<li><a href="{{url_for("embed.guild_embed", guild_id="295085744249110529")}}" class="waves-effect btn z-depth-3">Visit Us!</a></li> <!-- TODO: Add discord guild invite -->
|
||||
<li><a href="{{url_for("embed.guild_embed", guild_id="295085744249110529")}}" class="waves-effect btn z-depth-3">Visit Us!</a></li>
|
||||
{% if session['unauthenticated'] is defined and not session['unauthenticated'] %}
|
||||
<li><a id="menu_drop" data-activates="menu_dropdown" class="waves-effect btn z-depth-3 btn-floating dropdown-button avatar_menu" style='background-image: url(" {{ session['avatar'] }} ")'></a></li>
|
||||
{% else %}
|
||||
|
Loading…
Reference in New Issue
Block a user