mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
fix: getFriend
This commit is contained in:
parent
b34c7f045c
commit
240cdade07
@ -28,7 +28,7 @@ export const llonebotError: LLOneBotError = {
|
|||||||
|
|
||||||
|
|
||||||
export async function getFriend(uinOrUid: string): Promise<Friend | undefined> {
|
export async function getFriend(uinOrUid: string): Promise<Friend | undefined> {
|
||||||
let filterKey = isNumeric(uinOrUid) ? "uin" : "uid"
|
let filterKey = isNumeric(uinOrUid.toString()) ? "uin" : "uid"
|
||||||
let filterValue = uinOrUid
|
let filterValue = uinOrUid
|
||||||
let friend = friends.find(friend => friend[filterKey] === filterValue.toString())
|
let friend = friends.find(friend => friend[filterKey] === filterValue.toString())
|
||||||
// if (!friend) {
|
// if (!friend) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user