I moderate !open_christian@lemmy.ca, a safe space for queer Christians.
There are a lot of serial downvoters who don’t post or comment, but just downvote every post. I’d like to ban them, but my frontend only lets me ban if I have a comment or post to select.
Are there any Lemmy frontends or apps that allow me to ban users by username, without a comment or post to select?


I have no knowledge of being able to ban users that haven’t interacted. Two questions though.
Have you considered moving your community to an instance that doesn’t allow downvotes?
What do you feel the negative impact is of serial downvoting in the community? Anything more than hurt feelings? Since there’s no algorithm at work on the fediverse, I’m not sure what you feel the repercussion of the behavior is.
I too find drive-by downvoting to be unhelpful for my communities. I want to use the voting system to identify which kinds of posts subscribers are interested in. When I get non-subscribers downvoting regularly to indicate they don’t want my community to exist in the fediverse at all, it’s hard to identify which posts I should actually avoid posting to the community in the future. It makes it so I can’t use downvotes as a way to guide what I do and don’t post (since, in small communities, they can easily outweigh the votes from subscribers).
I definitely understand why it’s a negative in a community but the mechanics just aren’t in place with the two platforms to handle serial downvoting. I will say that it’s discussed a ton and there’s active work on the Piefed side of things to handle the issue in the code. Currently, a ton of instance admins have to dig through and share db data to find where it’s occurring and that only works after a user makes a report so that there’s a starting point to work from.
Of the two platforms, I can tell you that Piefed is working harder to handle these types of malicious use-cases so if you’re pondering a community creation or move, consider planting it on an instance running that platform.
The goal isn’t to disallow downvotes. People are totally welcome to downvote and upvote posts according to their whims. But if they only downvote without contributing at all, I want to ban them.
Some post sorting filters such as “top week” take into account upvote count versus downvote count. Serial downvoters reduce the community discoverability enough for me to consider it worth moderating. I care quite a bit about providing the safe space I provide with that community, and people deliberately reducing its discoverability are a problem for me.
To be clear, people generally ask questions on how to do something to be told how to do that thing. I have never met anyone who asks questions on how to do something so that they can be told not to try.
As an admin on both a lemmy and piefed instance and getting to see the bells and whistles running the backend of each, I can promise you that the way both determine active communities are comically rudimentary and that you are not losing traffic due to the way they handle that metric.
I understand you don’t want to disallow the capability, it was merely offered as an option since you consider the issue severe enough to warrant banning users that don’t actually use your community.
Either way, I will ask the crew in the developers matrix if there’s a way for you to ban them, if someone has a method to do it, I’ll respond here and let you know.
Thanks!
Hi there again,
The only way to do it currently without using the terminal is through the tesseract frontend. If your instance doesn’t offer it, create an account on an instance that does and pass it moderator status.
Unruffled stated the following: if they use the tesseract front end then it has the functionality to ban users from community settings > moderation tools.
What is the terminal-based method? I don’t host my own instance, if that’s relevant.
Lemmy: Ban a User Who Has Not Posted or Commented
These instructions use Lemmy API v3, documented for Lemmy 0.19.x. No post or comment from the target user is required.
Requirements: Bash, curl, and jq. Run the commands locally. Never share the moderator password or login token.
VERSION NOTE These commands use the v3 API’s remove_data field. Newer API documentation uses remove_or_restore_data; do not mix the two schemas.
In a Bash terminal, run the following. At the first prompt, enter the full HTTPS address of the instance where the moderator’s account lives, without a trailing slash.
read -r -p “Your account’s instance address (including https://): " INSTANCE INSTANCE=”${INSTANCE%/}"
read -r -p "Moderator username: " MOD_USER read -r -s -p "Moderator password: " MOD_PASSWORD printf ‘\n’ read -r -p "Current 2FA code, or Enter if not enabled: " TWO_FA
LOGIN_RESPONSE=$( jq -n
–arg username “$MOD_USER”
–arg password “$MOD_PASSWORD”
–arg otp “$TWO_FA”
‘{username_or_email: $username, password: $password} + (if $otp == “” then {} else {totp_2fa_token: $otp} end)’ | curl -sS --fail-with-body
-H ‘Content-Type: application/json’
–data-binary @-
“$INSTANCE/api/v3/user/login” )
unset MOD_PASSWORD TWO_FA TOKEN=$(printf ‘%s’ “$LOGIN_RESPONSE” | jq -er ‘.jwt // empty’) unset LOGIN_RESPONSE
If this produces an error or no token, STOP rather than continuing.
Login documentation: https://lemmy.readme.io/reference/post_user-login.md
Enter their fully qualified account name, in the form @username@instance-domain.
read -r -p "Account to ban (@username@instance-domain): " TARGET_USER
curl -sS --fail-with-body --get
“$INSTANCE/api/v3/resolve_object”
-H “Authorization: Bearer $TOKEN”
–data-urlencode “q=$TARGET_USER” | jq ‘.person.person | {id, name, actor_id}’
Check that actor_id identifies the intended account, then note the numeric id.
Enter its fully qualified name, in the form !community@instance-domain.
read -r -p "Community (!community@instance-domain): " TARGET_COMMUNITY
curl -sS --fail-with-body --get
“$INSTANCE/api/v3/resolve_object”
-H “Authorization: Bearer $TOKEN”
–data-urlencode “q=$TARGET_COMMUNITY” | jq ‘.community.community | {id, name, actor_id}’
Check the community’s identity and note its numeric id.
Both IDs must come from the same instance receiving the ban request. Do not copy a user ID from their home server and combine it with a community ID from another server. The lookup above avoids that problem.
Object-resolution documentation: https://lemmy.readme.io/reference/get_resolve-object.md
This is the step that actually bans the account. Enter the IDs obtained above.
read -r -p "Target person’s numeric ID: " PERSON_ID read -r -p "Community’s numeric ID: " COMMUNITY_ID read -r -p "Ban reason: " BAN_REASON
jq -n
–argjson person_id “$PERSON_ID”
–argjson community_id “$COMMUNITY_ID”
–arg reason “$BAN_REASON”
‘{ community_id: $community_id, person_id: $person_id, ban: true, remove_data: false, reason: $reason }’ | curl -sS --fail-with-body
“$INSTANCE/api/v3/community/ban_user”
-H “Authorization: Bearer $TOKEN”
-H ‘Content-Type: application/json’
–data-binary @- | jq .
This requests a ban with no expiry and leaves existing content untouched. Check the response for errors and confirm the ban in the community’s moderation log.
Community-ban documentation: https://lemmy.readme.io/reference/post_community-ban-user
REMOVING EXISTING DOWNVOTES
The example deliberately uses remove_data: false.
PR #5810: https://github.com/LemmyNet/lemmy/pull/5810
unset TOKEN
Thanks!