mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-15 02:21:21 +01:00
Targeting user messages by roles is now possible
This commit is contained in:
parent
37a992b8b1
commit
10e3d39acf
@ -164,6 +164,7 @@ class Gateway(Namespace):
|
||||
usr["color"] = self.get_user_color(guild_id, usr["id"])
|
||||
if (usr["avatar"]):
|
||||
usr["avatar_url"] = "https://cdn.discordapp.com/avatars/{}/{}.jpg".format(usr["id"], usr["avatar"])
|
||||
usr["roles"] = json.loads(member.roles)
|
||||
usr["stargazer"] = "star" in get_badges(member.user_id)
|
||||
else:
|
||||
member = db.session.query(GuildMembers).filter(GuildMembers.guild_id == guild_id, GuildMembers.nickname == name, GuildMembers.discriminator == discriminator).first()
|
||||
@ -175,6 +176,7 @@ class Gateway(Namespace):
|
||||
usr["color"] = self.get_user_color(guild_id, usr["id"])
|
||||
if (usr["avatar"]):
|
||||
usr["avatar_url"] = "https://cdn.discordapp.com/avatars/{}/{}.jpg".format(usr["id"], usr["avatar"])
|
||||
usr["roles"] = json.loads(member.roles)
|
||||
usr["stargazer"] = "star" in get_badges(member.user_id)
|
||||
emit("lookup_user_info", usr)
|
||||
self.teardown_db_session()
|
@ -1200,9 +1200,10 @@
|
||||
parent.find(".chatusername").addClass("stargazer");
|
||||
}
|
||||
if (usr.avatar_url) {
|
||||
parent.attr("discord_userid", usr.id);
|
||||
parent.find(".authoravatar").prop("src", usr.avatar_url);
|
||||
}
|
||||
parent.attr("discord_userid", usr.id);
|
||||
parent.attr("discord_userroles", usr.roles.join(" "));
|
||||
}
|
||||
collapse_messages();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user