Coder Social home page Coder Social logo

abyssal-discord-bot's People

Contributors

dependabot[bot] avatar peterbuoy avatar

Watchers

 avatar

abyssal-discord-bot's Issues

**LOW/ZERO priority Deleting row deletes nonessential formulas**

When a guild member is removed, try to only remove the values in column A to column W instead of deleting the entire row.
This is EXTREMELY low priority or potentially a nonissue.

Currently, there are formulas after row W that get deleted since we delete the entire row. These are nonessential columns that calculate ap/aap/dp/lvl gained since their first recorded gear update. These formulas can be manually inputted after.

These columns with formulas are only used with the unimplemented %info command, which may be implemented at a later date

To reiterate: not a big deal

node war signup doesn't work when user is duplicated in sheet

Tagging a user as ab/az while already having them in the sheet causes them to be added twice.
This causes sheet operations to break.

This is extremely rare as detagging will remove them from the sheet. It's possible that someone can be detagged while the bot was down, but then retagged when the bot went up. This would result in user duplication.

Potential solution is to purge the sheet by id before adding them.

%join process is too annoying for new members

When users use the %join command the bot should explicitly tell them that they just need their family between angle brackets, <family_name>.
If the name is incorrect, only apply a 5 second cooldown.

This likely requires significant logic changes in %join since it will likely have to bypass the 60 second per user cooldown. %join works on the assumption that the command can only be called every 60 seconds.

Likely need to just remove the global cooldown and implement your own.

Pending AZ members should have their pending role removed after 72 hours

Use supabase for persistence layer.
It should contain the user ID and the timestamp at which they received the tag.

Use application layer to periodically poll Supabase.
It should do a SQL delete query based on the timestamp, which will return the rows that have timestamps older than 72 hours (or whatever the number deletion date is declared as in the code (use a variable). These rows will contain the userID which can then be used to find the user and remove the pending AZ tag.

Gear requests do not persist on bot restart

This is intentional by design.

The bot should not need to be restarted that often and one can always check if there is an active gear request.

Adding a listener will lead to some indirection so that's a tradeoff for persistence.

Need command to create report from war data

Command should list all AB members ordered by the date of their most recent attended war and state how many wars they have attended in the past 30 days.

Refer to the SQL editor in supabase for implementation details. Once that is done we can use that query to get the data and send it as a discord message via the bot. This will likely take two queries due to the nature of the requirement.

List command bugs out if there is an empty string as a Discord UserID

Having an empty string in the Discord UserID column causes the bot to try to parse the empty string, which creates an undefined variable during code execution. Empty strings are created by deleting the cell values but not the rows themselves.

A temporary fix is deleting these rows. A better fix would be to fix the detection of a populated row, which would mean that a populated row must be defined as a row where the Discord UserID column has some kind of string in it (and not an empty string).

Potential solution: knowing that Discord UserID has a specific format (it's a snowflake), you can just check for a length of string and perhaps regex to only grab digits instead of just checking for an empty string.

node war channel only displays at most 27 members despite the db having more

lol, going to have to paginate this and maybe add more list_msg_id columns to the database.

We're going to have 4 msgs for the war signup list, which can support around 108 signups. There can only be at most 100 signups so this is ok.

Likely can do something like, for the first 25 members, put them in the first message, for the next 25 members. put them in the 2nd message, etc. Have to keep track of how many members have been put into the list. This will determine when the pagination happens.

Editing will be the same.

Request for new command that lists people who have NOT attended war in last 30 days

"Is it possible to add an admin-only command that doesn't appear in %help that simple lists out who has NOT attended a war in 30 days?"

Note:

  • This command should NOT show up in %help
  • This command will only list people that currently have the Abyssal role in Discord -- aka actual members.
    • The current implementation of war-stats simply checks for ID's in the jsonb file. This has been addressed in another issue.

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.