From 1259669c9db95c98282f6cecbb6487e0248c61e3 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sun, 9 Jun 2019 20:04:40 +0300 Subject: [PATCH] Add support for timed blocks. Add !is_blocked. --- README.md | 7 +- ...9193213_add_expires_at_to_blocked_users.js | 11 ++ src/data/blocked.js | 57 +++++++-- src/modules/block.js | 111 ++++++++++++++---- src/utils.js | 2 +- 5 files changed, 151 insertions(+), 37 deletions(-) create mode 100644 db/migrations/20190609193213_add_expires_at_to_blocked_users.js diff --git a/README.md b/README.md index 41b9f8f..4d44abe 100644 --- a/README.md +++ b/README.md @@ -35,10 +35,11 @@ See [CHANGELOG.md](CHANGELOG.md) `!logs ` Lists previous modmail logs with the specified user `!block ` Blocks the specified user from using modmail `!unblock ` Unblocks the specified user from using modmail +`!is_blocked ` Checks whether the user is blocked and for how long `!s ` Adds a snippet (a canned response). See below for how to use it. `!edit_snippet ` Edits an existing snippet (alias `!es`) `!delete_snippet ` Deletes the specified snippet (alias `!ds`) -`!snippets` Lists all available snippets +`!snippets` Lists all available snippets `!version` Print the version of the bot you're running `!newthread ` Opens a new thread with the specified user @@ -47,8 +48,8 @@ See [CHANGELOG.md](CHANGELOG.md) `!anonreply ` Sends an anonymous reply to the user in the format "Role: text" (alias `!ar`) `!close