Giter VIP home page Giter VIP logo

reactibot's People

Contributors

aldrinmathew avatar aprillion avatar averythedev avatar awareness481 avatar barrybtw avatar bpas247 avatar btmpl avatar danielfgray avatar definoob avatar dependabot[bot] avatar dylangarcia avatar evertbouw avatar gristoi avatar huuums avatar intrvertmichael avatar kristersd avatar louis-young avatar manonlef avatar markerikson avatar mattmattvanvoorst avatar maxrosenb avatar mike-lawson avatar mszabo-wikia avatar nickmccurdy avatar rahsheen avatar retsam avatar rosofo avatar taranvohra avatar trevorsayre avatar vcarl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reactibot's Issues

Separate bot log channel

#mod-log gets tons of messages where spam bots post in multiple channels. It would be helpful to have automated messages in a separate channel like #bot-log or #mod-bot-log.

member log channel

for using !ban command (#175) on someone who is not in server we need id of them and that is something like this 772490517761884170. so i think mods should have a private channel that will have log (by bot) of who left, who joined and when and log will also include id of person who banned

Automate job-board enforcement

I've been manually enforcing our rules, which has been a good bit of time investment. The biggest rule we have is posting once a week.

A naive implementation could scan posts to #job-board and remove/warn members who post too frequently, but that's pretty trivial to circumvent by deleting your own posts.

To fix that loophole, Reactibot could log when a member deletes their post with a date stamp of when it was originally posted.

"Not working" command

Provide a canned response to "it's not working" messages that asks for reproductions, expected results, more information, etc.

Don't fire commands in quoted messages

Users will often use discord's built in quote function to respond to a message with a command in it, causing the command to be sent twice.
Ex:

User: help help can anyone help?

Jernik: !ask

Reactibot:

User: >@ User !ask
@ Jernik Thanks! I'm new here

Reactibot:

It would be a small improvement for the bot to not respond to both

Add command to notify mods if a marked user reappears

One issue we've run into when moderating is problem users who leave on their own. It's great when they do, but there have been occasions where we want to keep an eye out if they come back.

It would be great to have a command like !watch that would notify us if somebody resurfaces. e.g. !watch @user#1234 they were being super shady and might be scamming. The next message @user#1234 sent would notify mods, then stop watching them.

I'm not sure how we'd persist this across bot reloads. Often we have people show back up after weeks/months away, so it's important it's persistent.

DM members who receive a ⚠️ warning from moderators

The ⚠️ reaction can only be triggered by moderators. Currently it updates #mod-log with a copy of the message, but it should also DM the member who sent the message. I'm imagining something like

You've received a warning from the moderators on your message in #channel:

message content

link: https://discord.com/channels/xxx/yyy/zzz

In the future, maybe we could expand this to have a "discussion channel" for the user to privately discuss the situation with all mods.

!mdn sometimes misses the mark

Querying !mdn array filter returns the top-level Array documentation as the first result, to get the filter docs it needs to be !mdn array.filter. We might be able to improve this by using a string similarity tool to rank page titles, instead of naively grabbing [0]

Add test vs production environment configuration

The bot has a lot of hardcoded values right now (channel IDs, role names, etc), which makes testing features locally more difficult. Most discord bots require this to be configured upon adding to a new server, but since we're only used in 1 server, that would all be extra effort with minimal benefit to us.

The simplest solution might be to refactor our hard-coded values into configuration files, swapping them out to be used with a known test server.

Better anti-spam measures

  • Extract URLs from messages so they can be analyzed

We currently have a "banlist" of URLs, but we only do naive string .contains() on the entire message to look for them. We've had waves of bots that post variations on visually-similar URLs that imitate Discord, Steam, etc hosts, which bypass these checks because of how simple they are. If we extract URLs from sent messages, we could do more complex processing to see if they're nefarious, like a levenshtein distance check.

Improve error handling

We seem to have synchronous functions and Promise chains that don't have proper error handling, making it harder for us to troubleshoot issues and maintain uptime

Link to TypeScript Playground

The TypeScript Playground is a useful tool for using TypeScript types in TypeScript or JavaScript code, and is especially helpful when troubleshooting types. It could be a useful resource to link in !code, a similar command specifically for TypeScript, or a separate command specifically for the playground.

Change in behaviour of @everyone and @here

I think we need to change behaviour of @everyone and @here warning message. We have a feature of private bot message in discord 13. So, instead of deleting tsk tsk message we would just make it private

Dedupe cross-posts

We recommend against cross-posting, it would be great to have it enforced by a bot. If somebody posts exactly the same message in more than 1 channel within a narrow time frame, Reactibot should remove one of the messages.

Fix !move command

The !move is supposed to post a message in the given channel mentioning the given users, but it does not trigger any messages now

Metrics emit with thread id, not parent channel id

For metrics purposes, it's not helpful to know what thread a message was sent in, but what channel the thread was in. #help-js is showing ~ 0 activity, when it's really one of the most active channels

!ban

I think we need a ban command so staff can also ban people that are not in server

Auto restart

It's possible to have Docker automatically restart the server when it crashes using --restart=on-failure:10, which would help our uptime when errors aren't handled

Automatically create threads for specified channels

For specified channels:

  • every message has a thread created for it, named something readable (name + date stamp?)
  • replies are removed and the sender Dm'd instructions
  • a !close command only the author can use (or maybe mvps and maybe a "helper" type role with this ability as well)
    • this is maybe not helpful, cuz afaik members can always close their own threads
  • reactibot closes after 6 hours, and sends a message with instructions on following up
  • instructions link to parent message and suggest replying to it if it's relevant

Thread channels are double-sending "this has an answer" messages

The code to trigger a "this has an answer" bot response will fire every time someone else reacts, unintentionally sending multiple messages. We should be able to check who the current reaction is from, instead of whether the author has reacted, or we could read thread messages to see if the bot has already responded, or we could track a list of threads that have been "resolved".

job-board moderation improvements

  • Privately log when messages are deleted, and why
  • Send instructions/feedback along with removed message, not just ephemeral post to job-board
  • Lengthen ephemeral reply lifetime
  • Remove posts that don't have any tags. We already DM with instructions

Detect and ban waves of bots

We could really use a command to detect and auto-ban (with moderator approval) when a huge number of accounts joins the server.

Detection

We've had numerous waves of bots that join in < 3m. Simple detection like "> 5 accounts joined in less than 1 minute", flagging all accounts until 2 minutes have gone by without more joins, seems like it would catch the scenarios we've seen.

Reporting

We have a private mod-log channel. After the join wave finishes, Reactibot should ping that channel and mention @Moderator, with a message like:

new accounts joined in , with usernames:
<list of comma separated display names>
Ban all accounts? React with 👍 to approve or 👎 to ignore

This feature should continue tracking those users until explicitly ignored.

Prior art for reactions (esp staff-only reaction handlers) can be found in features/emojiMod

!lock command

Something like, !lock to remove "send message" permissions for non-mods, useful in situations where there's a blowup and we need to figure it out quickly. A faster option than going into settings and toggling manually

Move mod contact form to the bot

We currently have a Contact page but it seems like more spammers are discovering it than legitimate users. Since Discord seems to have better spam protection than Netlify, moving anonymous contacting to Discord should give us less noise. This would be distinct from modmail, which creates non-anonymous private channels, rather than submitting anonymous one-off messages. Additionally most users seem to stick to contact methods within Discord without going to the site, so it should make the contact method easier to discover.

We appear to have at least one user who is intentionally abusing the contact form. As a result we may need a way to ban certain IDs, either by not actually making the form anonymous or using some sort of hash or uid so we can ban repeat offenders without having their Discord handle stored.

Using bot for managing threads

As everyone knows, we are using threads in help-js. So, i think we should relay on bots instead of humans like bot will automatically start a thread when someone sends a message, bot will close a thread on inactivity or on !close command and pin active threads or questions and unpin after closed (but bot will only work after @vcarl and @nickmccurdy shift bot on discord 13)

Prevent users from sending messages until they acknowledge CoC

Would require a bit of work to set up (e.g. to take into account that some people will have DMs disabled, so can't rely on bot DM alone), but this could be a good way to increase visibility of the CoC and guidelines, without causing a ton of ongoing extra work.

!massban

I think we need a mass ban command. Staff will pass it's username then it will ban all people with that username like recent activity, !massban Moderator Academy

!close

I think we need a close command for threads, use case - if we solved problem by our own, if no one is answering or it hase been answering, etc

Spam keyword detection doesn't check message embeds

We've had some spam slip past because the only message is "who is first", with the discord nitro copy in the link preview. We should attempt to read what the link preview is, and include it In spam detection

More thread channels

We want to make most of our promotional channels into thread-only channels to better encapsulate conversation, but we need slightly different rules than the "need help" thread channels. We want to make these channels into thread-only channels:

  • job-board, maybe
  • i-wrote-this
  • i-built-this
  • tech-reads-and-news
  • events

Behavioral changes:

  • Lock thread after much longer period of time (36 hours?)
  • Don't use a "resolved" reaction
  • Don't post ephemeral instructions
  • Generate thread title from link, not poster/time

qna feature broken?

Looks like the Q&A bot feature broke, it's not reacting to any commands (emoticons or !qa:count etc.) and the channel id for the #q-and-a channel is incorrect (tested it on #reactiflux-moderation, which is misslabeled but valid id)

Prevent channels being misused for bot testing

At the moment, people commonly mistake the #random channel for a bot testing channel (or simply choose to test bot commands there).

I think we could solve this by sending a friendly reminder to the user when bot commands are used in this channel.

Spam autodetects pings too aggressively

We want to catch actual pings, but currently it's also triggering on the string "`@everyone`" (@everyone in chat, shown as inline code), which we shouldn't report as it's a recommended way to avoid triggering notifications

Deployments aren't very resilient

Merging 2 PRs in quick succession will cause 2 instance of the bot to be left running. If the bot fails, it won't start running again.

I tried fixing this by cancelling existing runs #149, but it's broken:

Error while canceling workflow_id 1668622: Cannot read property 'id' of null

Add configurable periodic messages

It would be great to be able to have Reactibot post messages to several channels every so often. A daily post in #jobs reminding people of the rules would be great, and a welcome post to #introductions pointing people to the guidelines and tips.

We can iron out exact messages later, being able to set up what channel, how often, and the message would be great.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.