Giter VIP home page Giter VIP logo

vibot's Introduction

ViBot

Requirements

Optional

Installing

Copy settings_template.json, rename to settings.json and fill in missing info

Change the prefix inside of settings.json

Run npm install to install all node dependencies

Start the bot by either node . or via nodemon: npm i -g nodemon and nodemon . (nodemon will hot reload on file changes)

vibot's People

Contributors

thomasc33 avatar skepeoriginal avatar ragviswa avatar huntifer-rotmg avatar kerr-andrew avatar tro2 avatar mightypancakes avatar azndude1324 avatar modunpc avatar jimgurka avatar jiajieh01 avatar jonpser avatar iyawar avatar quizzlesticks avatar davidzhang22 avatar dependabot[bot] avatar danlang1 avatar dustinbeecher avatar charlie-training avatar ali25311 avatar mrkeeganx avatar tubs02 avatar griz50 avatar trmoosee avatar

Stargazers

 avatar  avatar

vibot's Issues

Commands like `;headcount` with the time arguments and `;afk` Raid Status Embeds cause rate-limiting to sending Messages

Current Behaviour

Problems, Frustrations, General Description

Certain commands in channels can cause rate-limiting issues which affect all other commands within that channel. ;hc when adding the time arguments or ;afks with their raid status embeds can hit this limit and block the bot from sending additional messages with other commands. This can block the channel from being used until a ;restart occurs to reset the commands.

How to Reproduce

Run ;hc with the time arguments and wait for about an hour for rate-limiting to occur. Then all commands which send messages will not execute or will execute after a long delay. The method to do with ;afks is unknown exactly how to reproduce.

Wanted/Expected Behaviour

Improvements, Additions, Changes

Rewrite or refactor the relevant commands to ensure rate-limiting does not occur and the bot does not need a ;restart. Could add logging for rate-limiting in general to ensure future issues are caught more easily.

Reasoning

It is annoying for all staff for a ;restart to be required in seemingly random instances due to rate-limiting. This is the only issue limiting bot uptime from being longer.

Tasks

Things to Do

  • Debugging the exact causes for rate-limiting
  • Fixing the identified bugs within the relevant commands

Paths to Files

Changing the testing command

Current Behaviour

Doesn't work or something lol

Problems, Frustrations, General Description (REQUIRED)

How to Reproduce (IF APPLICABLE)

Wanted/Expected Behaviour

Improvements, Additions, Changes (REQUIRED)

We need to change the text so it's better

Alternatives (IF APPLICABLE)

Reasoning (IF APPLICABLE)

Tasks

Things to Do (REQUIRED)

Paths to Files (IF APPLICABLE)

Examples/Screenshots

Screenshots of Bug, Examples for Features (IF APPLICABLE)

Typo in message when modmail is closed.

Current Behaviour

Problems, Frustrations, General Description

Typo in embed when a modmail is closed.

How to Reproduce

Close a modmail.

Wanted/Expected Behaviour

permenantly -> permanently

Improvements, Additions, Changes

Spelling.

Tasks

Things to Do

  • Change the spelling within the required file.

Examples/Screenshots

Screenshots of Bug, Examples for Features

image

Configure `Join X/X` buttons on VC-less templates to Primary color

Current Behaviour

Problems, Frustrations, General Description

Join button on VC-less runs is not very visible. It is the same size & color as its surrounding buttons.

Wanted/Expected Behaviour

Improvements, Additions, Changes

Change the join button for VC-less afks to Primary.

Tasks

Things to Do

  • May need to wait until #572 is complete, however I'm not entirely certain that the join button for VC-less is a conventional website-configurable button.
  • Update all VC-less templates to use Primary as the color for join buttons.

Add a proper error message when config site is down

Current Behaviour

Problems, Frustrations, General Description

When a command that uses the config site fails to retrieve a page (usually due to the website dropping or being restarted) the bot does not have a user-friendly message stating as such, it simply tells them Issue executing the command.

How to Reproduce

While the config website is down, attempt to do a headcount, afk, or templates command.

Wanted/Expected Behaviour

Improvements, Additions, Changes

If fetching from the website fails, catch the error and reply to the user that the service is down momentarily and that they should try again in a minutes time.

Tasks

Things to Do

  • fix afkTemplate.js - resolveTemplateAlias:
    • Return null when unable to fetch from the website.
    • All uses of resolveTemplateAlias should check if the result is null; if so, reply with the below message.
  • fix afkTemplate.js - AfkTemplate.tryCreate:
    • Add a new TemplateState.CONNECTION_ERROR in afkTemplate.js.
    • In AfkTemplate.tryCreate if it fails to fetch, throw a new AfkTemplateValidationError with TemplateState.CONNECTION_ERROR and the below message.
  • In templates.js, reply with the below message when failing to fetch from the website.
  • Double check if there are any other connections to the website that these checks do not resolve; if any, reply with the below message.
Failed to connect to the template service; however, it should be back momentarily. Please wait a minute and try again. 

If after 2-3 minutes you are still receiving this message, please contact a developer.

Paths to Files

  • commands/afkTemplate.js
  • commands/afkCheck.js
  • commands/headcount.js
  • commands/templates.js

Give Location on Run Start to Early VC & Hearing Impaired

Current Behaviour

Problems, Frustrations, General Description

Members who are hearing impaired and English as a second language often have difficulty joining raids because they cannot understand the location callouts from staff.

Wanted/Expected Behaviour

Improvements, Additions, Changes

  • For anyone who is early VC but not early location (ie key, vial, runes, etc.), DM them a message with the location when run starts only if they're in VC when it closes.
  • Add a list of hearing impaired members who will receive the same benefit, receiving location when the run starts. They are also required to be in VC when the run closes to get location.

Tasks

Things to Do

When "Start Run" is clicked and if settings.backend.giveLocationToEarlyVConStart is true:

  • filter this.earlySlotMembers for anyone that is not in this.earlyLocationMembers.
  • For anyone not filtered out or anyone whose id is in settings.lists.hearingImpairedMembers, if they are in the run VC, DM them an embed with the following information:
    • time
    • RL name and mention
    • Run name
    • Run location
    • A link to the RSA message, if applicable
    • Mention if they get removed from VC or DC, to click Reconnect on the status message ASAP.

web config changes required

  • This required changes on the website config. You can assume giveLocationToEarlyVConStart is false/null and hearingImpairedMembers is an empty array by default, but make sure if the list were to be populated then those people do get location. If you need a hand making sure with a non-staff account & do not have one in testing server, use an alt or ask Husky/another dev that might have an alt.

Paths to Files

  • commands/afkCheck.js

Important

Do not merge the PR for this issue until this PR has been successfully merged for the config website.

TypeError: Cannot read properties of undefined (reading 'charAt')

image

TypeError: Cannot read properties of undefined (reading 'charAt')
at Object.createEmbed (/home/carrt313/vibot/commands/templates.js:59:249)
at Object.execute (/home/carrt313/vibot/commands/templates.js:36:42)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at MessageManager.handleCommand (/home/carrt313/vibot/messageManager.js:181:17)

Fix ;poll command error description

Current Behaviour

Problems, Frustrations, General Description

Error message when using ;poll command incorrectly is formatted wrong

How to Reproduce

Fail to add proper args to poll command

Wanted/Expected Behaviour

Proper error message syntax

Improvements, Additions, Changes

Fix formatting on ;poll command error message
Add Moonlight Village to exalt options
Fix capitalization on embeds

Examples/Screenshots

image

Make `;list/;roleinfo` paginated

Current Behaviour

Problems, Frustrations, General Description

When there are a large number of members with a role, the current iteration of ;list will cut off the number of members to fit a single embed, without the ability to see who was cut off. This is bad because for Pub Halls we now have staff roles reaching over 100 members which makes it difficult to see everyone of a role with vibot.

While unrelated to the request, this would be a convenient time to add exporting as it's been a question we've received a few times.

How to Reproduce

;list exalt leader

Wanted/Expected Behaviour

Improvements, Additions, Changes

Make the embed paginated.

Tasks

Things to Do

  • Take a snapshot of the role, pagination should not change when members are added/removed the role. Indicate in the footer Members of RoleName as of - timestamp. Footer should not change date on update.
    The pagination should have 4-5 components:
  • If there are both people with and without role as highest, split it into 2 sets and add a toggle button to switch between which to display.
    • When clicked it should start back at page 1 for whichever set of members to look at.
  • a previous button, disabled if on first page
    • clicking this button should go back 1 page
  • a dropdown centered on the current page #, with up to 10 pages on either side
    • if viewing page 2, it should show page 1, 2, 3-12
    • if viewing page 12 out of 15 pages, show pages 2-11, 12, 13-15
    • selecting a page here should go to the exact page selected
  • a next button, disabled if on last page
    • clicking this button should go forward 1 page
  • if there is only 1 page, do not have pagination buttons
  • No longer block roles from being listed (for example, verified raider), pagination stops channel spam
  • Timeout the embed after 5 minutes, refreshing whenever interacted with.
  • Add an export argument - when used, sends a comma delimited list of member ids as a file.
    • If there are both members with role as highest and with a higher role, attach 2 files, 1 per list.

Paths to Files

  • /commands/list.js

Adding O3 Parse Type to `;parsemembers`

Current Behaviour

Problems, Frustrations, General Description

As it stands, all parses done through ;parsemembers log as a normal parse and give a standard pre-defined amount of quota. This is not scalable as different dungeons have different requirements for parsing and can be harder or easier and the quota reward should reflect this.

Wanted/Expected Behaviour

Improvements, Additions, Changes

Add a system that is configurable per-server which allows parses to give different amounts of quota depending on which raid it is executed on. This would require ;parsemembers to read the type of the current raid and log it on a per-server basis based on pre-defined links. This particular change requires adding o3 parses and o3 current week parses to Lost Halls. The quota for each parse is worth 1.5 points.

Alternatives

This could be done by having a new argument attached to ;parse. Another alternative is to have a set of pre-defined links between types of ;afks through templateIDs and give the corresponding parse type.

Reasoning

This will allow parsing to be scalable and configurable where different types of parses can award more or less points. There can also be more logging done to see what dungeons are being parsed more than others.

Tasks

Things to Do

  • Add the relevant new configurable system or file for defining links between parses and templates
  • Make the corresponding changes to ;parsemembers to support different types of parsing
  • Make the corresponding changes to ;quota to award 1.5 points for the O3 Parse Type
  • Connect the parsing Google API on the testing bot instance for testing
  • Add relevant fields into the Database to support the O3 Parse Type
  • Test to ensure the change works as intended

Paths to Files

`;mutualmembers` fails with large numbers of raids

Current Behaviour

Problems, Frustrations, General Description

;mutualmembers with large numbers of raids fails due to the input strings to the embed being too long. The maximum number of characters for the value of a field is 1024. Another thing to keep in mind is that the number of fields must also be less than or equal to 25. The complete list of limitations is printed below.

How to Reproduce

Attempt to run ;mm with many message IDs.

Wanted/Expected Behaviour

Per the Discord.js documentation on embeds, you must adhere to the following constraints:

  • Embed titles are limited to 256 characters
  • Embed descriptions are limited to 4096 characters
  • There can be up to 25 fields
  • A field's name is limited to 256 characters and its value to 1024 characters
  • The footer text is limited to 2048 characters
  • The author name is limited to 256 characters
  • The sum of all characters from all embed structures in a message must not exceed 6000 characters
  • 10 embeds can be sent per message

The constraints highlighted by bold text are most relevant.

See https://discordjs.guide/popular-topics/embeds.html#notes for more information.

Improvements, Additions, Changes

Allow indefinitely many message IDs as input to ;mm. Instead of having a single embed string with all the raids/suspicious raiders, have multiple fields.

Tasks

Things to Do

  • Rewrite the command to separate the field value strings into chunks.

TypeError: Cannot read properties of undefined (reading 'name')

image

TypeError: Cannot read properties of undefined (reading 'name')
at Object.execute (/home/carrt313/vibot/commands/location.js:28:84)
at MessageManager.handleCommand (/home/carrt313/vibot/messageManager.js:181:31)
at MessageManager.handleMessage (/home/carrt313/vibot/messageManager.js:52:26)
at /home/carrt313/vibot/index.js:38:37
at Client. (/home/carrt313/vibot/metrics.js:58:31)
at Client.emit (node:events:523:35)
at MessageCreateAction.handle (/home/carrt313/vibot/node_modules/discord.js/src/client/actions/MessageCreate.js:28:14)
at Object.module.exports (/home/carrt313/vibot/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (/home/carrt313/vibot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:355:31)
at WebSocketManager. (/home/carrt313/vibot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:239:12)
at WebSocketManager.emit (/home/carrt313/vibot/node_modules/@vladfrangu/async_event_emitter/src/index.ts:356:28)
at WebSocketShard. (/home/carrt313/vibot/node_modules/@discordjs/ws/src/strategies/sharding/SimpleShardingStrategy.ts:32:47)
at WebSocketShard.emit (/home/carrt313/vibot/node_modules/@vladfrangu/async_event_emitter/src/index.ts:356:28)
at WebSocketShard.onMessage (/home/carrt313/vibot/node_modules/@discordjs/ws/src/ws/WebSocketShard.ts:630:10)
at processTicksAndRejections (node:internal/process/task_queues:95:5)

`;changelog` missing crucial args in `;help`

Current Behaviour

;changelog is missing crucial arguments in the "Available Logs" embed of ;help/;commands. Anybody executing the commands is not able to change shatters and nest runs for example.

How to Reproduce

Type ;commands changelog and look at the "Available Logs".

Wanted/Expected Behaviour

Improvements, Additions, Changes

Add args for shattersRuns, nestRuns and a bunch of other unavailable templates

Tasks

Things to Do

  • Work out what's missing
  • Add what's missing to changeLog.json

Paths to Files

/commands/changelog.js
/data/changelog.json

Examples/Screenshots

image

Add `;puzzle` Helper Text

Current Behaviour

Problems, Frustrations, General Description

The ;puzzle command is not clear about how the command works. When running ;help or ;commands on the ;puzzle command, there is no helper text for what the command does and how it works. When running ;puzzle directly, it isn't clear what the UI is showing in terms of what the different color tiles represent.

Wanted/Expected Behaviour

Improvements, Additions, Changes

Add helper text that describes the command and how to use it when running ;help or ;commands. In addition, try to make the ;puzzle command itself more intuitive or add a relevant dictionary/text that explains how the command works.

Tasks

Things to Do

  • Add the relevant helper text into ;puzzle when running ;help or ;commands.
  • Add other UI or helper text when executing the ;puzzle command.
  • Test to ensure the change works as intended

Paths to Files

Examples/Screenshots

Screenshots of Bug, Examples for Features

Image

TypeError: templates is not iterable

image

TypeError: templates is not iterable
at Object.execute (/home/carrt313/vibot/commands/templates.js:19:32)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at MessageManager.handleCommand (/home/carrt313/vibot/messageManager.js:181:17)

Some members do not get moved into VC for early VC reacts

Current Behaviour

Problems, Frustrations, General Description

Sometimes people do not get moved in when reacting with the 🎟️ react. My guess is that it's due to them reacting too close to when VC is closed, missing the move-in timer window.

Wanted/Expected Behaviour

Improvements, Additions, Changes

Attempt to move member in immediately if they are already in a VC.

Alternatives

Add a button to ephemeral reply to let the member manually attempt to move themselves.

Reasoning

Raiders who don't join VC might not realize they can click Reconnect when the run starts, and for others they might click it only after location is called.

Tasks

Things to Do

  • Automatically move member in if they're in a VC immediately when confirmed for early VC reacts
  • Add a button to ephemerals after confirmation for the member to manually move themselves in
    • Stop any active collectors for ephemeral connect buttons on abort and on close (when run is finished)
    • Do not attempt to serialize these for restarts, if the bot restarts then they'll have to click the Reconnect button on afk check instead.

Paths to Files

Adding the customisation of button colours on `;afk`

Current Behaviour

Problems, Frustrations, General Description

Currently all buttons under the buttons section of an afk template are one default colour, the "Secondary" type, a grey button. This can make it hard to differentiate between buttons if one react is more important than another, like the Join button for VC-less runs.

Wanted/Expected Behaviour

Improvements, Additions, Changes

The ability to change the colour of a button. By default, if this parameter is not set, it should use the "Secondary" type button, but if it is set, it will be a number that directly corresponds to the styles defined by the Discord API, as defined here:

Type Number Colour
Primary 1 blurple
Secondary 2 grey
Success 3 green
Danger 4 red

Tasks

Things to Do

  • Add the changes into ;afk for changing the colour of the buttons
  • Add the changes into afkTemplates for parsing the colour of the buttons to pass onto ;afk
  • Add the colour parameter to buttons on the config website
  • Set some buttons to their relevant colours like the Join button for VC-less raids
  • Test to ensure the change works as intended

Paths to Files

Event Templates are not found for Shatters/Moonlight

Current Behaviour

Problems, Frustrations, General Description

All Event Templates which are defined on the website are not being found when running multiple raid-related commands like ;headcount, ;templates, ;afk. As all these commands check the roles that you have to determine whether you can see the templates, it likely has to do with the parameter minStaffRoles of the templates.

How to Reproduce

Check the templates for minStaffRoles, give yourself some of them and try the commands with available templates. The bot will respond that they do not exist.

Wanted/Expected Behaviour

Improvements, Additions, Changes

The bug should be fixed such that the event templates for Shatters/Moonlight follow the expected behaviour for the roles defined in minStaffRoles for the templates.

Tasks

Things to Do

  • Identify the exact cause of the bug for templates not being found
  • Write and test a script to fix the templates
  • Execute the script on the mongo db which stores templates
  • Test to ensure the change works as intended

Paths to Files

Create command that identifies mutual raiders between raids

Current Behaviour

Problems, Frustrations, General Description

Serial crashing has always existed in Discord runs and is a relatively big problem in the current climate. Securities and Officers have often struggled to find the identity of the people leaking the location to these crashers. One of the ways in which they do so is by looking at the raider lists for raids known to contain a given crasher, and then using a duplicate word checker to see if there are any raiders that appear multiple times. Unfortunately this is a lengthy process and many securities are unaware of how to pull off this method since there are many trivial issues such as the Discord name appearing or ID <@ID> instead of IGN. Whilst these problems are solvable, knowing exactly how takes unnecessary time and knowledge when the entire process could be automated.

Wanted/Expected Behaviour

Improvements, Additions, Changes

To create a command ;mutualmembers which takes as input a list of message IDs [<Message ID 1>, <Message ID 2>, (Message ID 3), ...] and outputs an embed containing any raiders that appear at least twice along with the time, type, RL, and link to any analysed raids.

Reasoning

Adding this command to the Security toolbox will allow us to pursue more advanced parsing and control over raiders and raids. If the barrier to entry for this analysis is lowered, more security will take part in such discussions and our raids will become generally cleaner as a result of it.

Tasks

Things to Do

  • Extract the raiders from the raids associated with the message IDs.
  • Analyse the data to find suspicious members (>1 appearance).
  • Present the data neatly in an embed.

`;afk` Helper Functions Should Reference `bot.afkModules`

Current Behaviour

Problems, Frustrations, General Description

Information about existing ;afks can be obtained through two means, bot.afkChecks and bot.afkModules. The former stores a stripped down JSON formatted object which contains enough information about an ;afk to reconstruct it. The latter contains the JavaScript Class for ongoing ;afks. At the moment, the former is also being used as a convenient way to peek into ;afk data when it should exclusively be used to reload the ;afks upon a ;restart.

Wanted/Expected Behaviour

Improvements, Additions, Changes

Look into all instances of bot.afkChecks being referenced and where possible, replace it with bot.afkModules, creating relevant helper methods if required to access certain class parameters. Once the replacement is complete, delete bot.afkChecks such that people are not inclined to use it to peek into afk data. In addition, delete any parameters in afkChecks.json that aren't used to reload existing ;afks

Reasoning

This is to improve clarity for how each of these objects should be used throughout code. It will also make it easier to differentiate between the sets of parameters that are required to reload existing ;afks and the general accessible set of parameters.

Tasks

Things to Do

  • Replace instances of bot.afkChecks with bot.afkModules.
  • Delete bot.afkChecks, only storing the saved data into afkChecks.json.
  • Delete unused parameters being saved in afkChecks.json
  • Test to ensure the change works as intended.

Paths to Files

Improve `;afk` Active Channels Embed UI

Current Behaviour

Problems, Frustrations, General Description

The ;afk command only shows the number of consumables that are logged through the buttons for a corresponding raid. For longer chains, this can make it difficult to track for whom the consumables have been logged for and in the case that ;pop is run, this does not track through the active-channels embed as well. Although confirmations appear in raidbot-commands, it can be annoying to switch channels and scroll to re-confirm who was been logged.

Wanted/Expected Behaviour

Improvements, Additions, Changes

Should add User IDs and IGNs for the consumables that have been popped on the active-channels embed. If possible, find a way to link the ;pop command with the embed as well.

Tasks

Things to Do

  • Come up with a design for adding User IDs and IGNs to active-channels embed.
  • Add the relevant systems to display this in active-channels.
  • Test to ensure the change works as intended

Paths to Files

Perms update for Lost Boomer to select how many key reacts there can be

📌 Current Behaviour

Problems, Frustrations, General Description

  • Staff is requesting that Lost Boomers have the permissions to request multiple keys for an afk check just like rls/vrls can. RLs get a popup asking how many keys they'd like for the run, yet boomers and arl, never gets that popup. Boomers have to use the ;request command for more keys. We want to fix this for the Lost boomers explicitly.

How to Reproduce

  • Give yourself the Lost Boomer role and request multiple keys (note response)
  • Give yourself rl role and request multiple keys (note difference from Lost Boomer if any).
  • Give Lost Boomer access to this command if missing.

📌 Wanted/Expected Behaviour

  • HRLs would like Lost Boomers to have this perk just like rls/vrls have.

📌 Tasks

Things to Do

  • Reproduce the issue.
  • Review where permissions for RL/LostBoomer
  • Review the commands attached to Lost Boomer
  • Extend permissions to Lost Boomer for this command.
  • Isolate and console log to confirm the changes are stable.
  • Treat yourself to a snack or nap.

Paths to Files

🧾Ticket Evidence:

Image
Image

Update exalt poll to include new dungeons

Current Behaviour

The current poll for exalts does not include new dungeons that we run, such as O3.

Problems, Frustrations, General Description (REQUIRED)

More reacts needed to give raiders more choice.

Wanted/Expected Behaviour

More react-able icons

Improvements, Additions, Changes (REQUIRED)

Adding O3, kogbold, and advanced options

Things to Do (REQUIRED)

-Capitalise "Exaltations"
-Lengthen the list of options
-Add more reacts
-Update emojis, such as shatters icon

Control Buttons on `;afk` do not work upon a `;restart`

Current Behaviour

Problems, Frustrations, General Description

After a bot ;restart, the listeners on the control buttons for all currently ongoing ;afks should restart, but this is not always the case. When clicking the relevant buttons, they just return an interaction failed message and do not execute their pre-defined functionality.

How to Reproduce

;restart the bot and start interacting with the buttons on existing ;afks. The exact cause for the bug is currently unknown.

Wanted/Expected Behaviour

Improvements, Additions, Changes

When ;restarting the bot, allow ;afks to immediately resume as normal and for the buttons to be interactable and execute their functionality accordingly.

Reasoning

It can be frustrating for staff once buttons don't work and ;afks have to be manually closed. Additionally, this makes ;restarts difficult to execute when there are ongoing ;afks.

Tasks

Things to Do

  • Find the exact cause of the bug
  • Fix the bug and the listeners upon ;restart
  • Test to ensure the patch works as intended

Paths to Files

ManualVetVerify does not check if suspended

Current Behavior

Problems, Frustrations, General Description

The manualvetverify command does not check if someone is suspended and will give them the role anyways.

How to Reproduce

Use ;mvv on someone who is currently suspended. This works on both suspended and suspended but verified.

Wanted/Expected Behavior

Improvements, Additions, Changes

Add veteran raider to the role list in DB for the current suspension. If they are suspended but do not have an active DB row, default to not verifying.

Alternatives

Do not vet verify them a t all.

Tasks

Things to Do

  • Add check for if someone is suspended in manualvetverify.js
  • If they are suspended, either deny entirely or attempt to update the roles they'll receive when unsuspended.

Paths to Files

`;parsemembers` Rework

Current Behaviour

Problems, Frustrations, General Description

;parsemembers is an old command written ~3 years ago. This means that the original intent of the command has been modified over time, it uses older programming practices, and some parts of the code are completely unused. In addition, there are now additional features that need to be added on top of it which is difficult to integrate due to the bloated and messy nature of the command.

Wanted/Expected Behaviour

Improvements, Additions, Changes

;parsemembers will be written from the ground up, keeping whatever features are necessary, adding any new features and improving the quality of life wherever possible. The exact changes are unclear, so will need to be investigated and scoped out with Officer teams.

Phases of the rework

The rework of the parse will happen in a couple of phases, in order to break up the work into manageable sections with realistic time-frames for completion. Currently the plan is as follows:

Phase 1

  • port parsemembers.js to parse.js and add slash command version with subcommands. Options available are members, reacts, and basic
  • improve the name matching behavior, as described by husky's comment below
  • See #707 for a more detailed explanation

Phase 2

  • Realmeye integration for guild leaks (could also be used for gear parse, but that is secondary)
  • Automatic name changes
  • Separate parse logging into a separate command (pending officer discussion on parsing)

Phase 3

  • Leaker tracking through db correlations
  • Switch to tesseract OCR because google is stinky

Phase 4

  • website parse???
  • ascend to godhood, striking down the mere mortals who dare to break the sacred raiding-rules

Tasks

Things to Do

Possible List of Changes:

  • Improving Embed Formatting
  • Ensuring all parse embed fields are necessary
  • pre-processing improvements for OCR
  • Having better matching on names for parsing (l's, i's and whitespace)
  • Reconnecting set parsing using RealmEye
  • Guild leaks via Realmeye
  • Crasher/Leaker correlations from parse logs
  • Automatic name changes via Realmeye

Current List of Changes:

Paths to Files

`;vote` rework

Current Behaviour

image
A small embed, which gathers some information about the user, and their given feedback, and reacts with some emojis.

Problems, Frustrations, General Description (REQUIRED)

The information doesn't display properly, and it's outdated, the roles aren't accustomed to our new banner systems and overall, it looks messy.

Improvements, Additions, Changes

  • Update the embeds to include better color and thumbnail usage based on the banner your vote goes up for
  • Instead of automatically checking which role/banner the user will receive, have that be the first argument for the command
  • Fix being able to pass in multiple users for a vote

Reasoning

It looks better and overall reduces time in thinking which vote is which since they all look the same

Tasks

Things to Do

Overall rework the entire command

Examples/Screenshots

image

Merge `;points` into `;changelog`

Current Behaviour

Problems, Frustrations, General Description

To add or remove points, the current way to do that is through hidden sub-commands only available to upper staff to the ;points command. This can be difficult to follow as the ;points command has two differing purposes. However, both purposes of the ;points command clash with existing commands. The command ;changelog already exists for changing all the other database ;stats values, The command ;stats already displays the number of points a user has amongst other values.

Wanted/Expected Behaviour

Improvements, Additions, Changes

This task would involves transferring the sub-command functionality for adding/removing/setting points to the existing ;changelog command. As ;points can already be displayed through ;stats, there is no change required for this portion of the ;points command.

Reasoning

There is no need for commands to exist when alternatives that are more encompassing exist, it is unnecessary clutter and an additional command to maintain.

Tasks

Things to Do

  • Add removing/adding/setting points into ;changelog
  • Remove ;points
  • Test to ensure the change works as intended

Paths to Files

`Interaction fail` message when using `Send Message` on modmails

Current Behaviour

Problems, Frustrations, General Description

When reacting with Send Message on modmails, after a few seconds it will send an interaction failed message even though it succeeded.

Wanted/Expected Behaviour

Improvements, Additions, Changes

Remove the error message by deferring.

Tasks

Things to Do

  • When Send Message is clicked, use interaction.deferUpdate() to avoid sending failed interaction message.

Paths to Files (IF APPLICABLE)

  • commands/modmail.js

Fix Permanent `;mute`

Current Behaviour

Problems, Frustrations, General Description

Permanent ;mutes were not being tracked in an accurate manner. It produces no logs, doesn't message the member in question and isn't tracked on the database. It doesn't follow the same procedure as a normal ;mute. This is not in line with existing security-related commands.

Wanted/Expected Behaviour

Improvements, Additions, Changes

Permanent ;mute should be similar to ;mute in terms of logging. It should take in an optional reason alongside an optional image and log an embed with the reasoning, date and time of the mute, raider Discord ID and IGN, staff who muted Discord ID and IGN. In addition to this it should also send a relevant embed to the user that was permanently muted.

Tasks

Things to Do

  • Rewrite ;mute to properly supporter permanent ;mute
  • Permanent ;mute needs to produce an embed for mod-logs with the relevant fields
  • Permanent ;mute needs to send a message to the user who was muted
  • Log in the database about the permanent ;mute
  • Test to ensure the change works as intended

Paths to Files

Examples/Screenshots

Screenshots of Bug, Examples for Features

image

`;afk` Supporter Button Doesn't Add Staff to Parent Button List

Current Behaviour

Problems, Frustrations, General Description

Potential issue arising when more than 5 staff join a vc-less run, they don't take up a slot in the members list and so prevents a raider from making into the run, since there are more than 50 people.

Wanted/Expected Behaviour

Improvements/Changes/Additions

Staff are added to members list when hitting supporter button

Tasks

Things to Do

  • Sauron works his magic

Paths to Files

./commands/afkcheck.js

`;location` on `;afk` does not work

Current Behaviour

Problems, Frustrations, General Description

;location on ;afk does not work at all. When putting up a run or joining a run and executing the command, it does not respond. There is likely also an issue with saving an ;afk where ;location won't work at the early stages of an ;afk.

How to Reproduce

Run the ;location command after putting up an ;afk or joining a run.

Wanted/Expected Behaviour

Improvements, Additions, Changes

;location should work as intended on existing runs. Where running the command allows the changing of the location of runs. If multiple runs are applicable then a drop-down will appear to prompt the user.

Tasks

  • Identify the exact cause of ;location not working
  • Fix ;location
  • Test to ensure the change works as intended

Paths to Files

Examples/Screenshots

Screenshots of Bug, Examples for Features

Screenshot 2023-11-10 at 17 07 26

Leaderboard errors when failing to cancel or select a category

Current Behaviour

Problems, Frustrations, General Description

When a user uses the ;leaderboard command and does not cancel and does not select both a category and subcategory, it will give an Issue executing the command error.

How to Reproduce

Run ;leaderboard and do not click any of the buttons.

Wanted/Expected Behaviour

Improvements, Additions, Changes

When ;leaderboard times out instead of selecting or cancelling, it should perform the same as if it was cancelled manually.

Tasks

Things to Do

  • In embedGetCategory and embedGetCategoryTemplate, use a .catch off of confirmListEmojis to return a Cancelled string, so that it processes a timeout as if Cancel was clicked.

Paths to Files

  • commands/leaderboard.js

Add Logs for `;suspendremove`

Current Behaviour

Problems, Frustrations, General Description

;suspendremove is a command that takes in a user as an argument and presents a menu allowing a ;suspend to be removed permanently from the database. It does not send any records into mod-logs and does not accept an optional reasoning for the ;unmute occurring. This is not in line with existing security-related commands like ;warnremove.

Wanted/Expected Behaviour

Improvements, Additions, Changes

;suspendremove should be similar to ;warnremove in terms of logging. It should take in an optional reason and log an embed with the reasoning, date and time of the ;suspendremove, raider Discord ID and IGN, staff who suspended Discord ID and IGN, staff who removed the suspension and contents of the original ;suspend.

Tasks

Things to Do

  • ;suspendremove needs to have the additional optional argument added
  • ;suspendremove needs to produce an embed for mod-logs with the relevant fields
  • ;suspendremove should follow a similar style to ;warnremove in terms of functionality and UI/UX
  • Test to ensure the change works as intended

Paths to Files

Adding VC-less Parsing to `;parsemembers`

Current Behaviour

Problems, Frustrations, General Description

As it stands, all parses done through ;parsemembers only work for parses done on raids with a voice channel. When ;parsemembers is run on a raid without a voice channel, it does not work. This is not flexible as raids can now choose whether they have a voice channel or not and ;parsemembers should work on all the options.

Wanted/Expected Behaviour

Improvements, Additions, Changes

Add parsing to raids that do not have a voice channel. As ;afk already records the members who initially joined or reacted with the raid for raids with or without voice channels, this is simply a matter of connecting the two systems fully. Once completed, ;parsemembers should work for all ;afk types.

Reasoning

Parsing on raids without voice channels should be supported such that crashers can more easily be identified in all types of runs.

Tasks

Things to Do

  • Integrate the ;afk system completely into ;parsemembers
  • Allow switching and add VC-less parsing as an option
  • Connect the parsing Google API on the testing bot instance for testing
  • Test to ensure the change works as intended

Paths to Files

`;changelog` Rework

Current Behaviour

Problems, Frustrations, General Description

;changelog is a slightly bloated command as it effectively describes the same functionality twice over. Once for the slash command variant and once for the prefix command variant. In addition, there are minor consistency issues between the two variants.

Wanted/Expected Behaviour

Improvements, Additions, Changes

Ideally the ;changelog command should be cleaned up a bit. If the same function described both variants it would be easier to maintain, improve and debug. If logging for both variants of the command could be added, it would help with tracking uses as there will be an audit log to follow. The slash command variant executes completely silently whereas the prefix command variant just returns a checkmark react upon successful execution.

Tasks

Things to Do

  • Fixing all ESLint Flagged Errors
  • Unifying Slash Command and Prefix Command Variants
  • Adding Logging for ;changelog uses
  • #556

Paths to Files

Create Command for Adding/Removing Supporter Perk Uses

Current Behaviour

Problems, Frustrations, General Description

There are instances where users will rightfully require a refund of supporter perk uses. While these instances are rare, the only method to remove supporter perk uses is to execute a query against the database to remove prior uses. This can be difficult to conduct, but more importantly a dangerous practice. Now that supporters have full visibility about the context of each of their uses with the ;supporter command, it is likely some invalid uses will be brought to our attention that previously went unnoticed.

Wanted/Expected Behaviour

Improvements, Additions, Changes

To create a new command or sub-command to ;supporter which allows upper staff to both add and remove supporter perk uses. This command should intuitively present all the uses that a current person has conducted and provide an easy way to remove existing uses or add uses in a specified time. It may also be prudent to have a sub-command that can remove all uses from all supporters within a specified timeframe.

Reasoning

There will be a need to remove existing supporter perk uses in the case that there was an incorrect perk use that occurred. Additionally, in the case that the bug may be more widespread, it is prudent to add a safe way to remove all uses from all supporters within that timeframe. While adding a supporter perk use may not be necessary, it may be necessary for reverting refunds that were unjustified.

Tasks

Things to Do

  • Determine whether this should be a sub-command off an existing command or a new command
  • Determine the UI for interacting with supporter perk uses
  • Code the command alongside its sub-commands
  • Test to ensure the change works as intended

Paths to Files

`;pu` does not show overwritten suspensions

Current Behaviour

Problems, Frustrations, General Description

;punishments is an EL+ command which displays all mutes, warnings or suspensions associated with the input ID's IGN. However, if the raider is suspended once and resuspended before the first suspension has finished, the ;pu embed will show the initial suspender and the length of time that the second suspender gave. There is no indication that the suspension has been overwritten and the identity of the second suspender is not deducible from the embed alone.

How to Reproduce

Suspend a player, then suspend them again for a longer period of time whilst they are still suspended.

Wanted/Expected Behaviour

Improvements, Additions, Changes

  • Overwritten suspensions should be separated from previous suspensions but state that it was overwritten.

Reasoning

  • Settled in an Officer vote.
  • The exact scenario depicted in the example below happened twice during December. Due to the experienced nature of the Security team at the time it was dealt with well in each case. The current security wave might not be as fortunate.

Tasks

  • Re-write ;pu so that if a raider is already suspended, make a separate field in the embed for the superseding suspension.

Things to Do

Example

  1. Tubs suspends Iamrlycool for 2 d for crashing. ;suspend iamrlycool 2 d Crashing
  2. Wiggby suspends Iamrlycool for 7 d for crashing whilst suspended. ;suspend iamrlycool 7 d Crashing whilst suspended.
  3. Any time ;pu is executed at this point, the bot will return:
Suspensions for @*Iamrlycool🏅 
Suspensions (1)
  1 By @#Tubs in 7 days at 6 January 2024 23:07
Crashing

Wiggby's suspension is nowhere to be seen. It appears on the system that Tubs has suspended Iamrlycool for 7 day and without using the search bar there would be no easy way to show that Wiggby was the most recent suspender.

  1. Iamrlycool modmails in asking for appeal. He is incorrectly directed by security, who have used ;pu, to Tubs.

Improve `;afk` Phase Change Message

Current Behaviour

Problems, Frustrations, General Description

The ;afk command when switching between phases will send a generic message to the raid-status-announcements channel about the channel in question. When multiple ;afks have their phases changing, it is impossible to distinguish which raids the messages are meant for. This can make it confusing to determine the status of each raid.

Wanted/Expected Behaviour

Improvements, Additions, Changes

The messages for phase change should reply to the original ;afk status message that they are a part of. In addition to this, the status message should have some way to link to the channel or raid name so that it is easier to link the messages to the raids they belong to.

Tasks

Things to Do

  • Add a system to showcase raid names on the status messages.
  • Add a link to the original ;afk message for the status messages.
  • Test to ensure the change works as intended

Paths to Files

Allowing Staff to be Dragged into Run on `;afk`

Current Behaviour

Problems, Frustrations, General Description

When staff react with the supporter button on a raid, the location of the run gets sent to them, however they are not automatically dragged into the VC if the run has one. This can make it annoying for staff without the ability to join the VC and they can see location anyways.

How to Reproduce

Have a relevant staff member, click on the supporter button of a raid and you will only be given early location, not be dragged in.

Wanted/Expected Behaviour

Improvements, Additions, Changes

The supporter button should also try to drag in the staff on a rolling basis similar to other buttons.

Tasks

Things to Do

  • Add the necessary changes into ;afk for allowing staff to be dragged in
  • Test to ensure the change works as intended

Paths to Files

Fame minutes led missing from changelog

Current Behaviour

fame minutes led (and possibly accursed stuff) cannot be changed via ;changelog

Tasks

Things to Do (REQUIRED)

  • update data/changelogs.json to have the correct entries

`;request` on `;afk` does not work

Current Behaviour

Problems, Frustrations, General Description

;request on ;afk is not built ideally for integration and at the moment does not work. The way it adds a button is to copy an existing button and change the name, but this does not make it scalable for more than one ;request on an existing ;afk.

How to Reproduce

Run the ;request command after putting up an ;afk or joining a run.

Wanted/Expected Behaviour

Improvements, Additions, Changes

;request should be restructured such that the command can be run on multiple times on an existing ;afk. It should work smoothly on existing runs.

Tasks

  • Identify the exact cause of ;request not working
  • Restructure ;request to be better for ;afk
  • Test to ensure the change works as intended

Paths to Files

Examples/Screenshots

Screenshots of Bug, Examples for Features

Screenshot 2023-11-10 at 17 02 59

Completes and Log Additional Completes on `;afk` do not work

Current Behaviour

Problems, Frustrations, General Description

Both Completes and Log Additional Completes do not work on ;afk. Completes does not log for any raiders during a raid. On the other hand, log additional completes never resets and always locks staff from using the button. These two bugs are likely to stem from the same cause as they run the same function in ;afk, loggingAfk().

How to Reproduce

After a raid occurs, the runs completed section of ;stats does not increment to reflect the run having happened. When clicking Log Additional Completes, it always locks out and says that a run has been logged recently due to the button never being unlocked in loggingAfk().

Wanted/Expected Behaviour

Improvements, Additions, Changes

Both Completes and Log Additional Completes should work as intended and log runs for all raiders who are in a raid.

Tasks

Things to Do

  • Identify the Cause of the Bug and whether they are linked
  • Investigate loggingAfk() in ;afk
  • Apply fixes for the Bug
  • Test to ensure the change works as intended

Paths to Files

Examples/Screenshots

Screenshots of Bug, Examples for Features

image
image
image

Add Logs for `;unmute`

Current Behaviour

Problems, Frustrations, General Description

;unmute is a command that takes in a user as an argument and unmutes them. It does not send any records into mod-logs and does not accept an optional reasoning for the ;unmute occurring. This is not in line with existing security-related commands.

Wanted/Expected Behaviour

Improvements, Additions, Changes

;unmute should be similar to ;mute in terms of logging. It should take in an optional reason and log an embed with the reasoning, date and time of the unmute, raider Discord ID and IGN, staff who unmuted Discord ID and IGN.

Tasks

Things to Do

  • ;unmute needs to have the additional optional argument added
  • ;unmute needs to produce an embed for mod-logs with the relevant fields
  • Test to ensure the change works as intended

Paths to Files

Examples/Screenshots

Screenshots of Bug, Examples for Features

image

Server Issues not appearing under `;check`

📌 Current Behaviour

  • ;check command does not display problems consistently.

Problems, Frustrations, General Description

  1. A user by the name of @astroabc was issued a suspend and was never automatically unsuspended. Security claims this should have also been detected on the ;check command, but he was never populated.
  2. This command is reporting information such as: " Head Raid Leaders should not have ARL," rather than verifications, modmail, and punishments.

How to Reproduce

  • Use the ;check command to see the current state.
  • Suspend a dummy account for X period of time.
  • Create a modmail.
  • Use the ;check command to see the results.

📌 Wanted/Expected Behaviour

  • ;check should list all problems for the server.
  • E.g. Users that shouldn't have certain roles, pending modmails, verifications and as false suspensions.

Improvements, Additions, Changes

  • Staff would like to see an improve on the time it takes to load the results. There has been a request to have a similar function to the initial ;check re-implemented instead of the current command taking up to 6 seconds to render results.

📌 Tasks

Things to Do

  • Reproduce the issue.
  • Review where ;check is being used in Vi Code.
  • Isolate and console log in between suspected areas to confirm where bugs are.
  • Add/Remove code.
  • Treat yourself to a snack or nap.

Paths to Files

🧾Ticket Evidence:

Image

⭐How it Should Operate (can include more than one listing)

Image

👾 Operating with minor "Bug"

Image

👾 "Bugged"

Image

Ongoing `;afk`s re-open upon a `;restart`

Current Behaviour

Problems, Frustrations, General Description

After a bot ;restart, any ;afk that is inactive or a run that is already ongoing reverts to being active or open again. This allows raiders to join the ongoing run and can cause confusion.

How to Reproduce

;restart the bot and watch existing ;afks being re-opened. The exact cause for the bug is currently unknown, but likely is to do with the phase or active system in ;afks.

Wanted/Expected Behaviour

Improvements, Additions, Change

When ;restarting the bot, allow ;afks to immediately resume as normal, continuing to stay closed and ongoing.

Reasoning

It can be frustrating for staff if a run re-opens and raiders get confused or ask for location. Additionally, this makes ;restarts difficult to execute when there are ongoing ;afks.

Tasks

Things to Do

  • Find the exact cause of the bug
  • Fix the bug upon ;restart
  • Test to ensure the patch works as intended

Paths to Files

Ordering Reacts on `;headcount` for Essential Reacts to be before Normal Reacts

Current Behaviour

Problems, Frustrations, General Description

For templates with reacts in the reacts section that have the onHeadcount parameter set to true, these reacts will all appear before the default reacts that appear from the buttons section. At times this can be intuitive as the most essential reacts to check is the number of raiders and the number of keys/other consumables available. While the number of raiders is a react in the reacts section, there may be other less essential reacts that have onHeadcount set to true, thus appearing before keys and other consumables.

How to Reproduce

While all templates do not display this issue, one such template that has this issue is the standard cult template. To see an instance of a react appearing prior to the essential key react, run ;headcount cult.

Wanted/Expected Behaviour

Improvements, Additions, Changes

Fix the ordering of the reacts such that the essential ones defined appear before the non-essential normal reacts. The manner in which this is done must be flexible and must not be hard-coded to ensure this behaviour can be configured in the future if necessary.

Alternatives

One option is simply to remove non-essential reacts in the reacts section of a template all-together, opting only to use the raider react to ensure ordering is maintained. Another option is to define ordering explicitly for each template. Another option is to have a parameter or mechanism for defining the essential reacts to ensure they always appear before normal reacts.

Reasoning

Regardless of whatever alternative is used, ideally it should be something that is easy to incorporate and has minimal effect on template definitions as this is a massive file that will require a lot of work to change. It should also be something that isn't hardcoded and flexible, keeping in mind the requirements of runs or the ordering of reacts may change in the future.

Tasks

Things to Do

  • Find a suitable solution for fixing ordering
  • Put the fix through, chatting with the website team to ensure the changes have been reflected on templates
  • Test to ensure the change works as intended

Paths to Files

Examples/Screenshots

Screenshots of Bug, Examples for Features

Image

AFK Check API Sanitization

Long term we will remove the API from the bot process, but for now we need to sanitize what results are being sent by the API.

We need to remove the following for each raid id:

  • channel
  • earlyLocationMembers
  • earlySlotMembers
  • reactables
  • buttons
  • pointlogMid

Additionally, the following should be changed:

  • members -> number of members
  • ended_by -> boolean
  • aborted_by -> boolean
  • deleted_by -> boolean

Improve Embed Text Fitting

Current Behaviour

Problems, Frustrations, General Description

Throughout a variety of commands, a function called fitStringIntoEmbed is used to try to work around character limits that are present in various fields of an embed. However, this same function is defined multiple times throughout the codebase. Additionally, it is an old piece of code that both doesn't work for all scenarios and if it does work, doesn't fulfill good UI standards.

Wanted/Expected Behaviour

Improvements, Additions, Changes

Look over the codebase to identify how fitStringIntoEmbed is used and try to improve upon it and turn it into an extension function that can be utilized by any command.

Reasoning

This will make the UI better as it unifies the embed generation. In addition, any bugs or improvements can be applied to all the relevant commands simultaneously.

Tasks

Things to Do

  • Identify the Files that use fitStringIntoEmbed and files that don't use it but could
  • Improve upon the original fitStringIntoEmbed code to try to cover for bugs and make the UI better
  • Add it as an extension to the codebase
  • Test to ensure the change works as intended

Paths to Files

fitStringIntoEmbed Files:

Other Files:

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.