-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Log tag changes #281
Comments
I'll start working on that |
Awesome, enjoy! If you have any questions, feel free to ask either here or in the Discord server 😃 |
Design-wise, I would maybe create a separate class that offers a method to write arbitrary messages into the log channel. And then let the tag manage command class take an instance of that class and use the method there, whenever the tags are changed. Not sure whether the existing mod routine class would be much of a help here honestly, it has a completely different purpose and flow. But I still feel like all mod-log actions should be near to it, at least in the same package. Hence why I would just create some |
Should the bot log the action instantly, or wait for the routine? |
do we need to log it when someone uses |
also, does it need to show the content of the tag when using |
Yeah, just dont connect this code to the routine at all. Imo they dont have anything to do with each other.
No. Just the once that actually change something: create, edit, delete, ...
Yeah, this is actually crucial to be able to "revert" accidental changes. It has to log the state before and after the change. I would suggest to just attach them as "file" to the embed, like a |
The thing is, when I attach the file to the embed it puts the file before the embed. I think that sending the files in different messages is the way to go. |
If you say so - your feature, your design 👍 If you need feedback, show some screenshots 👌 |
#281 (comment) |
Good to know, but I can't see how is that better than sending different messages. |
As long as it clears that it belongs together, I do not care that much. Be aware though that ideally you create a solution that cant be "interrupted" by other concurrent logs. So if you write independent messages, another log could be written in between, concurrently. Which would be super confusing, I guess. So if there is a solution that has the stuff grouped together ("status message", content before, content after) and does not look shit, I would prefer that. |
So I've researched a bit more about putting the attachments after the embed and there's no proper way to do it. the only way I can think of to make sure nothing interrupts it between the messages is to use some kind of lock, but then (obviously) we have to instruct developers to always use it when sending messages in the |
Would ask @Tais993, our JDA expert, for opinion and ideas on this. ^^ |
I saw him asking for help in the JDA Discord :p, and he's unfortunatelly correct. There's no way of putting the attachment before the embed, so an unfortunate situation. I'd honestly make a second channel for logging tag changes, easiest solution? Otherwise you'll have to lock or accept that a message comes in between, unfortunately. |
@Zabuzard, @marko-radosavljevic, what's your opinion? |
Could you show how it looks like if you put the attachments together with the message? I am not sure I understand why you think it looks "bad". However, I definitely want to avoid introducing locks or similar, such a setup would be far too fragile in my opinion. In such a case I would probably rather accept the risk of the message being interrupted, but change the title of the attachments so that its clear to which event they belong to. That said, you can introduce synchronization on that particular class if you want. But dont lock the channel itself and also dont have the lock on the audit routine schedule. But only on this new feature that you are adding here, by simply |
In my opinion that is okay, really. It is just a log after all and also doesnt happen often. The channel is also restricted to a small audience. Discord also cuts down the size of those files if they are really large, right? Is it possible to disable the text preview maybe? (also make sure u name those "files" with So I am voting for having a single embed with the 3 things together. |
@marko-radosavljevic your opinion on this? (as we will be the primary user of this mod-only feature) I think the spoilers are actually worse. I am voting for same message, no spoilers - I do not care if its above or below or whatever, as long as its clear that its one message containing of 3 things that belong together. |
Yup, same with me, it's not something we would use extensively, doesn't need to have a perfect UX. Like Zabu said, above or below, doesn't matter. It's important that it is consistent, so we can always read it the same way, without getting confused and having to track down before and after. And it should be accurate, so we can depend on it. Everything else is just cosmetics. So yeah, I'm also voting for same message, no spoilers. Thanks ❤️ |
no problem, as you wish :) |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Development on this is still ongoing and we want it (@MaiTheLord ) |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Is your feature request related to a problem? Please describe.
Managing tags (creating, editing, deleting) is done on the discord. It's not under version control, and we do not know who issued tag managing command.
And since a lot of people have permission to manage tags, it would be nice to be able to audit the changes, and revert in case tag gets accidentally deleted or similar.
Describe the solution you'd like
Every
/tag-manage
to be logged in#mod_audit_log
, so we can know who edited the tag, when, and what are the changes being made.The text was updated successfully, but these errors were encountered: