Git Product home page Git Product logo

acm-bot's People

Contributors

ez314 avatar jafrilli avatar khreate avatar nickburnett avatar reshmicode avatar rubenolano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

acm-bot's Issues

Implement modal functionalities

modals were added to prod discord.js a week ago https://discordjs.guide/interactions/modals.html

  • Verification (might as well resolve #65 at the same time)
  • Circle info, like prompting users for the diff btwn #internship-hunting and #internship-prep. This one might be difficult tho unless we can figure out how to use the required component row.
  • Custom report option (low prio, nobody has used this yet)
  • Maybe circle creation? has 6 fields tho and modals only support 5. we can include trivial args in the command itself as a workaround

@NickBurnett pinging you in to keep you in loop on this

Dockerize the bot

Since Compute Engine isn't the ideal solution here, I'm going to Dockerize the bot and deploy it to Google K8s so that we can transition to more of a CI/CD pipeline.

Unfindable circle leader handling

Fails silently from the user's perspective (and doesn't log the error in error channel)
Circle just gets skipped when running /circle repost. Hard to detect since there are so many circles now.

0|acmbot  | DiscordAPIError[10007]: Unknown Member
0|acmbot  |     at SequentialHandler.runRequest (/home/acmbot/acmbot/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:497:11)
0|acmbot  |     at processTicksAndRejections (node:internal/process/task_queues:96:5)
0|acmbot  |     at SequentialHandler.queueRequest (/home/acmbot/acmbot/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:198:11)
0|acmbot  |     at REST.request (/home/acmbot/acmbot/node_modules/@discordjs/rest/src/lib/REST.ts:343:20)
0|acmbot  |     at GuildMemberManager._fetchSingle (/home/acmbot/acmbot/node_modules/discord.js/src/managers/GuildMemberManager.js:489:18) {
0|acmbot  |   requestBody: { files: undefined, json: undefined },
0|acmbot  |   rawError: { message: 'Unknown Member', code: 10007 },
0|acmbot  |   code: 10007,
0|acmbot  |   status: 404,
0|acmbot  |   method: 'GET',
0|acmbot  |   url: 'https://discord.com/api/v10/guilds/692266201644007424/members/<redactedUserIdOfSomeoneWhoLeftServer>'
0|acmbot  | }

imo, it should either ...

  1. Fail completely, with an exception only caught by the base exception handler
  2. Report that "something went wrong, please inform a bot dev" to the user
  3. Report that this happened to the user
  4. Report exactly what has happened and suggest how to fix

in ascending difficulty. I think 2 is enough for now.

Migrate from MongoDB to Cloud Firestore

There's no incentive to keep data storage for Circles and other information on the Compute Engine. Instead, we'll store everything in the cloud to dockerize the bot and make it less dependent on local filesystem resources.

Interactions

Slash commands are still a bit of a pain to use, and they're too discoverable for admin commands...

We can start with using buttons though, such as join button for circles (easier to understand for new discord users) or approve buttons for mentor points system (more obvious and v small user base, but still could be nice)

Also, potentially put a button in the rules channel that users can click to approve, and then have a modal pop up. This takes away hassle of finding the approval channel. Issue with this is modals are extremely new rn, so maybe we should wait for that feature to mature a bit.

Move .shoutout to slash command

.shoutout behavior is weird rn because of its long string argument. Because of the way args are parsed from command strings, all quotes are special characters. This means you can't use contractions in shoutouts, which is kinda a problem

Making it a slash command will remove parsing ambiguity.

Better logging

Need to print some sort of trace so we know where errors are coming from

Clean up the .points command suite

The code for this is kind of a mess right now. The vcsnapshot and vcevent options repeat a lot of code used for the global commands, and the rest of it doesn't look too pretty either.

We should probably move stuff into services and utils

Circle inactivity report slash command

Send inactivity report on demand, as an ephemeral response.
Should also have an optional parameter to override the threshold for inactivity.

Not sure about permissions scoping, maybe omega or circle-leaders or Community.

ACM Officer Command Suite

Create a command suite for officers, which includes the following:

  • #66
  • Bulk role adder/remover for projects/research

ACM CLI v1 :)
Also, we can jumpstart the slack to discord migration ?

@NickBurnett

Remove lines between rows in table for vcevent

This needs to be done for the pure .vcevent end command, as well as the vcevent option in the points suite.

Another option is to convert to an embed format that is similar to the .points lb command, except with only one person per row.

Auto Verify

We should auto-verify anyone thats in the firebase, bc that means they already verified with us.

Also stops ppl from overwriting their names upon leave/join

Remove unused config values

We have a good number of config values that are remnants of old features. We should remove these when possible, and send out the new config to be replaced everywhere (including botconfig.example.js in this repo)

Strict compliance

In an attempt to follow convention a bit tighter, we'll switch back to strict-mode in TypeScript. There are a few bugs that are non-strict-compliant so we'll need to refactor those. I'm unsure how much refactoring will have to take place but it will certainly not be to the extent of the original refactor. Maybe a slight system change at most.

Add README

Overview

In an effort to make the entirety of ACM's codebase well-documented and approachable to new contributors, this repository will need more thorough documentation on how to use and modify this project.

For the target amount of information we need, see the portal-backend repository.

Proposal

Create a README with the following:

  • An overview of the bot and its functionality
  • Information on how to initialize the project
  • Instructions on how to properly deploy the project to some cloud host

Shoutout slash command doesn't ping recipients

Old shoutout command pinged recipients underneath the embed. This was accomplished by sending 2 messages, 1 with the embed (where mentions don't ping) and 1 normal message (where mentions do ping)

We can keep it the same way, or we can add the pings as normal message content, outside of the embed but in the same message.

@khreate @NickBurnett feel free to take if you have time

Circle leader functionality

Start building out functionality for circle leaders, such as

staff can modify circle leaders
circle leaders get ManageMessage perms in their channels
circle leaders can "book" circle vcs with event name

Move some configurations to Firestore

Configurations such as the current points system semester should be easily customizable and stored in DB, rather than static config.

Would be nice to finish #29 first.

Anonymous message to staff

Could just replace the existing /report command for this
Allows people to anonymously post generic concerns to staff channel, not necessarily related to a specific message

Low priority for now, since i'm not sure ppl trust the bot enough ? to use this feature

Post Hacktoberfest Todos

  • Figure out what to keep
  • For the registration system, we should not initialize points. Instead, the bot will handle that (initialize if doesn't exist, increment if it does). This will prevent us from overwriting points, etc on reregistration and doesn't cost any more r/w than we are already doing.

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.