-
Notifications
You must be signed in to change notification settings - Fork 5
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
Channel Archiver #304
Channel Archiver #304
Conversation
### Notes This WIP PR focuses on building a channel archiver function into Valkyrie. So that you can easily dump channel logs from a specific channel at point of archive. Due to Discord APIs message rate limit of 100 messages, we run a loop depending on the total number of messages in the channel, then combine into a file which is sent back to the channel. ### WIP This is just the initial test setup of this, some things we need to add still are: - Better storage for the archival message file (dotenv is temp) - Message headers specifying date of archive, channel name, etc - Permission flags, access to archive - Introduction of a command, valkyrie interface, etc
Adds the feature so that when the archival command is run (!archive placeholder for now), move and lock the channel into a `archived-channels` category. Still WIP. Note: Needs extended permission flags for bot to be enabled `Administrator, Manage Channels, Manage Guild`
@Shadowfiend This has got now the ability to move channel into an |
Just for viewing the audit logs and what's going on for channelUpdate events in the discord audit logs.
This commit removes the file transcript on the archiver script and also setups up the proper /unarchive /archive commands.
@Shadowfiend Resurfacing this one since it seems like there is a need atm for saving a transcript easily of channels to be archived. We could alternatively also branch this transcript out into it's own command, something like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two small blockers.
This resolves the issue with running archiver on specific channel category. Now it can only be run within the channels defined in `defenseArchiveCategoryName` and `defenseCategoryName`
@Shadowfiend We should be good now! I added two new definitions for defense channel categories |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, let's see how it does in practice!
Notes
This adds two new commands:
/archive-channel
and/unarchive-channel
to be used for starting only in defense channels. This will move the channel into a new category "archived channels" and lock it intoViewMessages: true
mode for the groups that have access to it already. The channel can be unarchived by running/unarchive-channel
and that will then move the channel back to the defense categorySaving a transcript
In addition to moving/locking the channel to
archived-channels
, we also save a transcript of all the messages in the channel, outputted as a temp .txt file. File is deleted after being added to discord file-attachments.Future ideas
project-channelname
style routing. Something to discuss