mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-25 06:27:03 +01:00
Return normal titan logo if guest icon does not exist and av fixes
This commit is contained in:
parent
86a2a5fe66
commit
d6c43e853b
@ -180,7 +180,7 @@ def update_administrate_guild(guild_id):
|
|||||||
guest_icon = None
|
guest_icon = None
|
||||||
db_guild.guest_icon = guest_icon
|
db_guild.guest_icon = guest_icon
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
emit("guest_icon_change", {"guest_icon": guest_icon}, room="GUILD_"+guild_id, namespace="/gateway")
|
emit("guest_icon_change", {"guest_icon": guest_icon if guest_icon else url_for('static', filename='img/titanembeds_square.png')}, room="GUILD_"+guild_id, namespace="/gateway")
|
||||||
return jsonify(
|
return jsonify(
|
||||||
id=db_guild.id,
|
id=db_guild.id,
|
||||||
guild_id=db_guild.guild_id,
|
guild_id=db_guild.guild_id,
|
||||||
|
@ -359,8 +359,8 @@ def change_unauthenticated_username():
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
def get_guild_guest_icon(guild_id):
|
def get_guild_guest_icon(guild_id):
|
||||||
return db.session.query(Guilds).filter(Guilds.guild_id == guild_id).first().guest_icon
|
guest_icon = db.session.query(Guilds).filter(Guilds.guild_id == guild_id).first().guest_icon
|
||||||
|
return guest_icon if guest_icon else url_for('static', filename='img/titanembeds_square.png')
|
||||||
|
|
||||||
def process_query_guild(guild_id, visitor=False):
|
def process_query_guild(guild_id, visitor=False):
|
||||||
widget = discord_api.get_widget(guild_id)
|
widget = discord_api.get_widget(guild_id)
|
||||||
|
@ -243,7 +243,7 @@ def update_administrate_guild(guild_id):
|
|||||||
db_guild.guest_icon = guest_icon
|
db_guild.guest_icon = guest_icon
|
||||||
|
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
emit("guest_icon_change", {"guest_icon": guest_icon}, room="GUILD_"+guild_id, namespace="/gateway")
|
emit("guest_icon_change", {"guest_icon": guest_icon if guest_icon else url_for('static', filename='img/titanembeds_square.png')}, room="GUILD_"+guild_id, namespace="/gateway")
|
||||||
return jsonify(
|
return jsonify(
|
||||||
id=db_guild.id,
|
id=db_guild.id,
|
||||||
guild_id=db_guild.guild_id,
|
guild_id=db_guild.guild_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user