Reformat output of "whoami" command

Also print user pill for easily creating a MemoChat
This commit is contained in:
Andrew Ferrazzutti 2022-05-10 21:35:34 -04:00
parent 53d3170c04
commit fbd3d514e3

View File

@ -65,9 +65,13 @@ async def whoami(evt: CommandEvent) -> None:
await evt.reply(f"Error from KakaoTalk: {e}")
return
if own_info:
puppet = await pu.Puppet.get_by_ktid(evt.sender.ktid)
uuid = f"`{own_info.more.uuid}` ({'searchable' if own_info.more.uuidSearchable else 'hidden'})" if own_info.more.uuid else "_none_"
await evt.reply(
f"You're logged in as **{own_info.more.nickName}** (KakaoTalk ID: {uuid}, internal ID: `{evt.sender.ktid}`)"
f"You're logged in as **{own_info.more.nickName}**"
f"\n* KakaoTalk ID: {uuid}"
f"\n* Internal ID: `{evt.sender.ktid}`"
f"\n* Matrix user: [{puppet.name}](https://matrix.to/#/{puppet.default_mxid})"
)
else:
await evt.reply(