Skip to content
This repository has been archived by the owner on Oct 21, 2023. It is now read-only.

Commit

Permalink
feat: delete friend
Browse files Browse the repository at this point in the history
See #17
  • Loading branch information
BlueGlassBlock committed Mar 14, 2023
1 parent 9c9481a commit 85d287a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/ichika/core/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ class PlumbingClient:
async def get_friends(self) -> VTuple[Friend]: ...
async def find_friend(self, uin: int) -> Friend | None: ...
async def nudge_friend(self, uin: int) -> None: ...
async def delete_friend(self, uin: int) -> None: ...
# [impl 3]
async def get_group(self, uin: int) -> Group: ...
async def get_group_raw(self, uin: int) -> Group: ...
Expand Down
8 changes: 8 additions & 0 deletions src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,14 @@ impl PlumbingClient {
Ok(())
})
}

pub fn delete_friend<'py>(&self, py: Python<'py>, uin: i64) -> PyResult<&'py PyAny> {
let client = self.client.clone();
py_future(py, async move {
client.delete_friend(uin).await?;
Ok(())
})
}
}

#[pymethods]
Expand Down

0 comments on commit 85d287a

Please sign in to comment.