Minor style changes

This commit is contained in:
Andrew Ferrazzutti 2022-05-10 21:39:18 -04:00
parent d7d8cbbbb6
commit 79fe8748b1
2 changed files with 3 additions and 3 deletions

View File

@ -157,13 +157,13 @@ async def _set_id_searchable(evt: CommandEvent, searchable: bool) -> None:
else: else:
await evt.reply(f"Successfully made KakaoTalk ID {'searchable' if searchable else 'hidden'}") await evt.reply(f"Successfully made KakaoTalk ID {'searchable' if searchable else 'hidden'}")
async def _get_search_result_puppet(source: u.User, friend_struct: FriendStruct) -> pu.Puppet: async def _get_search_result_puppet(source: u.User, friend_struct: FriendStruct) -> pu.Puppet:
puppet = await pu.Puppet.get_by_ktid(friend_struct.userId) puppet = await pu.Puppet.get_by_ktid(friend_struct.userId)
if not puppet.name_set: if not puppet.name_set:
await puppet.update_info_from_friend(source, friend_struct) await puppet.update_info_from_friend(source, friend_struct)
return puppet return puppet
@command_handler( @command_handler(
needs_auth=True, needs_auth=True,
management_only=False, management_only=False,

View File

@ -307,7 +307,7 @@ class UserClient {
} }
}) })
this.#talkClient.on("disconnected", (reason) => { this.#talkClient.on("disconnected", reason => {
this.log(`Disconnected (reason=${reason})`) this.log(`Disconnected (reason=${reason})`)
this.disconnect() this.disconnect()
this.write("disconnected", { this.write("disconnected", {
@ -322,7 +322,7 @@ class UserClient {
}) })
}) })
this.#talkClient.on("error", (err) => { this.#talkClient.on("error", err => {
this.log(`Client error: ${err}`) this.log(`Client error: ${err}`)
this.write("error", { this.write("error", {
error: err, error: err,