Preview color when setting member color
This commit is contained in:
parent
66c456f2ec
commit
f9b156c4a2
@ -110,10 +110,9 @@ async def system_set(conn, message, args):
|
|||||||
db_prop = db_properties[prop]
|
db_prop = db_properties[prop]
|
||||||
await db.update_system_field(conn, system_id=system["id"], field=db_prop, value=value)
|
await db.update_system_field(conn, system_id=system["id"], field=db_prop, value=value)
|
||||||
|
|
||||||
|
response = "{} system {}.".format("Updated" if value else "Cleared", prop)
|
||||||
if prop == "avatar" and value:
|
if prop == "avatar" and value:
|
||||||
response = make_default_embed("Updated system avatar.").set_image(url=value)
|
response.set_image(url=value)
|
||||||
else:
|
|
||||||
response = "{} system {}.".format("Updated" if value else "Cleared", prop)
|
|
||||||
return True, response
|
return True, response
|
||||||
|
|
||||||
@command(cmd="system link", usage="<account>", description="Links another account to your system.", category="System commands")
|
@command(cmd="system link", usage="<account>", description="Links another account to your system.", category="System commands")
|
||||||
@ -352,10 +351,11 @@ async def member_set(conn, message, member, args):
|
|||||||
db_prop = db_properties[prop]
|
db_prop = db_properties[prop]
|
||||||
await db.update_member_field(conn, member_id=member["id"], field=db_prop, value=value)
|
await db.update_member_field(conn, member_id=member["id"], field=db_prop, value=value)
|
||||||
|
|
||||||
|
response = make_default_embed("{} {}'s {}.".format("Updated" if value else "Cleared", member["name"], prop))
|
||||||
if prop == "avatar" and value:
|
if prop == "avatar" and value:
|
||||||
response = make_default_embed("Updated {}'s avatar.".format(member["name"])).set_image(url=value)
|
response.set_image(url=value)
|
||||||
else:
|
if prop == "color" and value:
|
||||||
response = "{} {}'s {}.".format("Updated" if value else "Cleared", member["name"], prop)
|
response.colour = int(value, 16)
|
||||||
return True, response
|
return True, response
|
||||||
|
|
||||||
@member_command(cmd="member proxy", usage="[example]", description="Updates a member's proxy settings. Needs an \"example\" proxied message containing the string \"text\" (eg. [text], |text|, etc).", category="Member commands")
|
@member_command(cmd="member proxy", usage="[example]", description="Updates a member's proxy settings. Needs an \"example\" proxied message containing the string \"text\" (eg. [text], |text|, etc).", category="Member commands")
|
||||||
|
Loading…
Reference in New Issue
Block a user