Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging systems and notifications #136

Open
geoversed opened this issue Jul 3, 2024 · 4 comments
Open

Logging systems and notifications #136

geoversed opened this issue Jul 3, 2024 · 4 comments
Assignees
Labels
economy Relevant to the economy system. feature This is a feature request.

Comments

@geoversed
Copy link
Owner

geoversed commented Jul 3, 2024

The gist of what will be logged

  • Currency logs
  • Notifications for when something has affected you
  • Alerts (to announce major outages/changes)
  • Update logs (new concept as a way of showing the key details of whats changed in the bot, think of this as the pixel progression version of dank memer's website blogs)

At the moment, we have no plans to limit the amount of logs shown, but it is something we will keep in mind in the future if it becomes a problem. For reference, Dank Memer's notification lists are limited to a maximum of 200 stored per user. This number was much higher just a few years ago when the bot had less traction.

For logging mechanisms and notifications, there will be a paginator and it will have an index tracker (using the Pagination class).

For notifications, you will be able to access a specific notification via it's an ID which opens up the notification and a paginated list of the notification directly. This means when using the command to view a specific notification (/notification view id:55), it is equivalent to (/notification list) but with the paginator length set to 1, and the page index being 55 (or 56?). We would also need to implement a search subcommand, to search for a notification by keyword (checking if it is present in both the notification title)

For the currency log, there should also be a way of sorting by the methods of how the currency entered/left in the form of a dropdown.

What it could contain

A notification typically has the following attributes:

  • Title: briefly summarises what this notification is about
  • Description: expands on what actually happened
  • Created at: floating point epoch timestamp indicating when this was created

A currency log typically has the following attributes:

  • Quantity: value deducted/added from the user's currency
  • Source: how it happened
  • Type: database representable format of how this occured so that it can be used in the sorting dropdown
  • Who: if possible, who caused this to happen
@geoversed geoversed added feature This is a feature request. economy Relevant to the economy system. labels Jul 3, 2024
@geoversed geoversed self-assigned this Jul 3, 2024
@geoversed geoversed moved this to Backlog in c2c Development Jul 9, 2024
@geoversed
Copy link
Owner Author

geoversed commented Jul 12, 2024

Implementing loggers will only get harder as development continues, the sooner this is done the better. There should ideally be a single method that would always be used to log this info so that for instance, function renames aren't needed on a large scale.

@geoversed
Copy link
Owner Author

On second thought, I am considering implementing a maximum row limit per user ID. Currency logs will be exceptionally big. I'll need to figure out how to do this first. But, this is not a huge priority, as outlined in the project.

@geoversed
Copy link
Owner Author

Starting soon, trade requests will appear in notifications.

A single notification can contain the following:

  • Notification ID: ID of the notification for later retrieval
  • Notification title: Brief title to describe what happened
  • Notification content: The content of the notification
  • Timestamp: Epoch timestamp of when the notification was sent being set in the embed

Few commands to manage your notifications will be held in the notfications group.

  • /notifications view (id)
  • /notifications list
    • You will be able to filter out the notifications you want to see inside the menu.
    • Looping over each notification will display both the title and a trimmed preview of the content

The target is to have all of the following be stored in notifications:

  • Share receipts
  • Trade receipts
  • Robberies (both from and to you)

Trade requests eventually expire so a background task will need to be created to delete expired requests after the expiry timestamp.

New commands will be created to accept and reject trade requests.

@geoversed
Copy link
Owner Author

Soon, trade requests will appear in notifications.

A single notification can contain the following:

  • Notification ID: ID of the notification for later retrieval
  • Notification title: Brief title to describe what happened
  • Notification content: The content of the notification
  • Timestamp: Epoch timestamp of when the notification was sent being set in the embed

Few commands to manage your notifications will be held in the notfications group.

  • /notifications view (id)
  • /notifications list
    • You will be able to filter out the notifications you want to see inside the menu.
    • Looping over each notification will display both the title and a trimmed preview of the content

The target is to have all of the following be stored in notifications:

  • Share receipts
  • Trade receipts
  • Robberies (both from and to you)

Trade requests eventually expire so a background task will need to be created to delete expired requests after the expiry timestamp.

New commands will be created to accept and reject trade requests.

@geoversed geoversed mentioned this issue Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
economy Relevant to the economy system. feature This is a feature request.
Projects
Status: Backlog
Development

No branches or pull requests

1 participant