Skip to content

feat: add qotw reminder - #15

Closed
stifskere wants to merge 3 commits into
Javascripters-Development:mainfrom
stifskere:main
Closed

feat: add qotw reminder#15
stifskere wants to merge 3 commits into
Javascripters-Development:mainfrom
stifskere:main

Conversation

@stifskere

@stifskere stifskere commented Aug 26, 2023

Copy link
Copy Markdown

closes #7;

Added the commands

  • qotw-date: lets you change the time of the reminder with the following format 1-7:1-24:0-59 as of day-of-week:hour:minute

Added the listeners

  • qotwReminder: it adds a ready event that runs a function in the qotwManager

Added the schemas

  • keyvaluepair: it's a global key value pair table to store values with keys

Added the types

  • IntRange<F, T>: it lets you define a type for a range of numbers from F to T including F and T
  • QotwReminderManager: used statically contains all the methods for the reminder command and bot managing
  • QotwDate: interface for the date QOTW date format.

Notes

exported the client in an exports file for the sake of access in other files.


Requires revision

@stifskere
stifskere requested a review from AsyncBanana August 26, 2023 19:41
@stifskere stifskere self-assigned this Aug 26, 2023
AsyncBanana and others added 3 commits August 26, 2023 21:45
added some types, provisional database global keyvaluepair, the qotw reminder and manager

Signed-off-by: stifskere <stifskere@gmail.com>
fix

Signed-off-by: stifskere <stifskere@gmail.com>
@stifskere stifskere added this to the v1.0.0 milestone Aug 26, 2023
@stifskere stifskere linked an issue Aug 26, 2023 that may be closed by this pull request
@stifskere stifskere changed the title Qotw reminder, closes #7 feat: add qotw reminder, closes #7 Aug 26, 2023
@stifskere stifskere changed the title feat: add qotw reminder, closes #7 feat: add qotw reminder Aug 26, 2023

@AsyncBanana AsyncBanana left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better if this were more modular and could support multiple scheduled events using an API similar to the command and event listener loader, with files exporting objects containing a cron formatted time property and a handler function. It shouldn't be too hard to combine the listener code and the current scheduling code to do this. Additionally, you can use something like cron-scheduler to help with parsing and scheduling the scheduled events.

There are two other, smaller things: first of all, while djs-fsrouter uses oop, we are trying to avoid it here. Luckily, I don't think it will be necessary with the new API. The other thing is that it might be better to just recreate this branch and create a new pull request so you can clean up the git tree.

Once these things are finished, I will review more of the minutiae.

@stifskere stifskere closed this Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

QOTW reminder for the manager

2 participants