Skip to content

Commit

Permalink
Adding link to misskey-rs issue
Browse files Browse the repository at this point in the history
  • Loading branch information
spirillen committed Oct 20, 2024
1 parent 5bbab5f commit bd5babd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
[![My Privacy DNS](https://www.mypdns.org/images/logo.png)](https://www.mypdns.org/)

## Sponsor

[![ko-fi](https://www.mypdns.org/fileproxy/?name=sp_kofi_mypdns)]([DONATION.md](https://kb.mypdns.org/articles/MTX-A-3/DONATION))
[![liberapay](https://www.mypdns.org/fileproxy/?name=sp_receives_mypdns)](https://liberapay.com/MyPDNS/donate)
[![goal](https://www.mypdns.org/fileproxy/?name=sp_goal_mypdns)](https://liberapay.com/MyPDNS/donate)

# MK Cleaner

<!-- TOC -->
* [MK Cleaner](#mk-cleaner)
* [The error](#the-error)
* [Other docs](#other-docs)
* [History](#history)
<!-- TOC -->

Mk Cleaner is a little program that can operate with the API of a [Misskey][MK]
server. It should be able to do 3 things:

Expand Down Expand Up @@ -41,6 +46,8 @@ users suspended: 1, not suspended: 0
notes deleted: 0, not deleted: 1
```

I've opened this issue https://github.com/coord-e/misskey-rs/issues/73

## Other docs

* Contributing: <a href="../master/Contributing.md">Contributing.md</a>
Expand Down
10 changes: 3 additions & 7 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ use misskey::ClientExt;

#[tokio::main(flavor = "current_thread")]
async fn main() {

let endpoint = std::env::var("MISSKEY_API_URL")
.expect("environment variable MISSKEY_API_URL");
let token = std::env::var("MISSKEY_TOKEN")
.expect("environment variable MISSKEY_TOKEN");
let endpoint = std::env::var("MISSKEY_API_URL").expect("environment variable MISSKEY_API_URL");
let token = std::env::var("MISSKEY_TOKEN").expect("environment variable MISSKEY_TOKEN");
let client = misskey::HttpClient::builder(endpoint.as_str())
.token(token)
.build()
Expand All @@ -21,8 +18,7 @@ async fn main() {
for user_id in std::env::args().skip(1) {
eprintln!("Doing {user_id}");

let user: misskey::model::id::Id<_> =
user_id.parse().expect("valid user_id");
let user: misskey::model::id::Id<_> = user_id.parse().expect("valid user_id");
match client.suspend(user).await {
Ok(()) => suspend_count_success += 1,
Err(e) => {
Expand Down

0 comments on commit bd5babd

Please sign in to comment.