-
-
Notifications
You must be signed in to change notification settings - Fork 70
A way to be able to log various actions like message edits #274
Comments
That would be beneficial indeed. However, it also becomes a question about logging messages and for how long? |
Or do you mean updates of any objects? |
Something that I've seen implemented in some other libraries is a value which can be set to indicate exactly how many messages to log. Either disgord could implement this as a size value (bytes) or message count. I personally prefer the size method, but that may be more difficult to implement. |
I've been thinking about using a lib for caching. It adds so many benefits
like customization, community updates, etc.
And just put it behind a simple interface, so people can inject a redis
setup or anything else =)
…On Thu, 19 Mar 2020, 08:25 Jacques Amsel, ***@***.***> wrote:
That would be beneficial indeed. However, it also becomes a question about
logging messages and for how long?
Something that I've seen implemented in some other libraries is a value
which can be set to indicate exactly how many messages to log. Either
disgord could implement this as a size value (bytes) or message count. I
personally prefer the size method, but that may be more difficult to
implement.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#274 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB346VBVR6DPYFHSDDYGXRLRIHCFFANCNFSM4LOZE3TA>
.
|
@andersfylling, I'm working on the same project as Jake, so I can expound upon the needs here. We don't need the lib to help us log messages or anything, we're looking for a way to detect what changed in an update event. The best way to do this is to have a snapshot of what the member, channel, guild, or message looked like before the cache update along with the new update event payload. |
I'm thinking that maybe adding a new function signature for this would allow disgord to figure out whether or not this is needed. As I don't see a way to introduce more overhead and memory use, and eventually slow down the through put. E.g. the new func signature is not required and won't cause existing projects to break: I might just create "Snapshot" structs to make it more obvious. Who knows. Currently I'm somewhat busy as I have 2-3 months left of my masters degree. |
This should be easy to implement with the new cache. |
Is your feature request related to a problem? Please describe.
We want to be able to log things such as message edits, nickname changes, etc. To do that, we will need a way to be able to track changes.
Describe the solution you'd like
Ideally, the inclusion of a Before attribute in payloads would allow for this to be done easier.
Describe alternatives you've considered - optional
The text was updated successfully, but these errors were encountered: