CyberDiscovery / meta

This repository is for meta discussion of the Cyber Discovery Discord server.
https://discord.cyberdiscoverycommunity.uk
MIT License
8 stars 10 forks source link

Weekly purge of all game channels #366

Closed Bottersnike closed 3 years ago

Bottersnike commented 4 years ago

In the vein of #341, as per Jammy's Rowan's suggestion, this would entail clearing the game channels on a weekly schedule. Pulling this one out into its own issue because the other one died from inactivity, this is more specific, and also the person who wanted to make this is banned from the GH :P.

Edit: He who shall not be named unbanned let me know it was rowan not jammy

rak1507v2 commented 4 years ago

mmm myes sensible suggestion getting suggested 18 days ago and nothing happening peak meta

n3bb commented 4 years ago

would assess channel be included in this too? #assess is probably most in need of weekly purges due to the mass influx of new users who may unknowingly post spoilers.

R0w4nS commented 4 years ago

hello there

thebeanogamer commented 4 years ago

To mirror what I wrote in #general, I'm not the biggest fan of this idea, but I suppose if enough people want it we can look at voting on doing it.

github-actions[bot] commented 3 years ago

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

RealJammy commented 3 years ago

damn rip 😔

ThisIs0xBC commented 3 years ago

just stick this in the CD bot, it's uptime is like 99.99999% unless Jack has broken it again, and it isn't too hard to implement it deleting and recreating the channel every week (implementation would just be, get day, if it is monday, delete and recreate channel and reset all role perms on it (maybe there is a duplicate channel api endpoint and then we could dupe it and its permissions but not msg history, then delete old one))

JoshHeng commented 3 years ago

just stick this in the CD bot, it's uptime is like 99.99999% unless Jack has broken it again, and it isn't too hard to implement it deleting and recreating the channel every week (implementation would just be, get day, if it is monday, delete and recreate channel and reset all role perms on it (maybe there is a duplicate channel api endpoint and then we could dupe it and its permissions but not msg history, then delete old one))

I would suggest bulk deleting all the messages every week instead, so permissions/channel positions don't have to be changed and channel references remain intact. This is a method on Discord.Js so I assume it's also implemented in the Python library? Also, this would probably mean that Jump to Message on quotes wouldn't work anymore on purged channels, but that shouldn't really matter

ghost commented 3 years ago

Yeah if we want this make an issue on the bot github and I'll write it. Should be easy enough to implement.

JoshHeng commented 3 years ago

By the looks of it we can just bulk delete messages older than two weeks, instead of purging everything every week. This could be a better solution because it would mean the channels wouldn't be completely empty on Monday morning?

ghost commented 3 years ago

By the looks of it we can just bulk delete messages older than two weeks, instead of purging everything every week. This could be a better solution because it would mean the channels wouldn't be completely empty on Monday morning?

Can we easily do that with discord.py without it being inefficient?

JoshHeng commented 3 years ago

By the looks of it we can just bulk delete messages older than two weeks, instead of purging everything every week. This could be a better solution because it would mean the channels wouldn't be completely empty on Monday morning?

Can we easily do that with discord.py without it being inefficient?

Sorry, misread the documentation.

Discord's API doesn't allow bulk message deletion after 2 weeks through the API, however we could delete messages older than 1 week instead on a nightly or weekly basis. We can use Get Channel Messages to bulk fetch messages older than one week then put it directly into Bulk Delete Messages to delete them (would do 100 at a time so would have to iterate).

Alternatively yeah we can just clone the channel then delete the older one, but then again we have the issue of dead channel references

ghost commented 3 years ago

Yeah that looks like it would work, how often would you delete the messages like that in bulk?

seagull-pat commented 3 years ago

How would this work with pinned messages? There are a lot of pinned either funny or informative messages in all of the channels. Also can someone reopen the issue since it's still, ya know, open closed.

RealJammy commented 3 years ago

yay!