mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-11-04 07:47:10 +01:00 
			
		
		
		
	Fixes and Handling nick mentions to usernames
This commit is contained in:
		@@ -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 %}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user