Minor style changes
This commit is contained in:
parent
d7d8cbbbb6
commit
79fe8748b1
@ -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,
|
||||||
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user