mikeshardmind / SinbadCogs

A set of community resources
Apache License 2.0
50 stars 47 forks source link

Automatic ban sync please #219

Closed JetCrooked closed 4 years ago

JetCrooked commented 4 years ago

I added your ban sync cog because I wanted bans to automatically carry over between two servers I run, however, I found out the cog only syncs bans when I run the ban sync command, which is a bit inconvenient.

DiscordLiz commented 4 years ago

@mikeshardmind as long as you didn't have a reason not to add this feature, I can work on this while you are doing some of the other work I'm still waiting on.

mikeshardmind commented 4 years ago

I'm not strongly for or against this feature existing, but there are some major drawbacks to it which led me not to prioritize it.

  1. The bot, even if it had 100% uptime, is not guaranteed by discord to receive all events from the gateway. Unlike things triggered by reactions, channel joins, etc, there would also be no obvious indication if this failed in most cases.
  2. As fetching the bans is a single API call, scheduling this is reasonable.
  3. There's an included command to ban users in multiple servers at once.

If you or anyone else feels like PRing this, I'll look it over.

JetCrooked commented 4 years ago
  1. As fetching the bans is a single API call, scheduling this is reasonable.

Scheduling, so syncing bans at every x interval or something? I would be fine with that, it isn't too important to me for the crossban to be immediate after a user is banned from one server, I'd just like it to be automatic and a scheduled sync would accomplish that.

mikeshardmind commented 4 years ago

There's been little interest in actually implementing this for reasons that are not related to the quality of the idea, and more about time and if this could potentially fall afoul of the change to discord's terms for public bots.

Many of the cogs here are designed to be safe for public bot use, and including any sort of scheduled sync not explicitly defined by a user will likely make this cog problematic for those bots. And at the point of using an explicitly scheduled sync, it begins to make more sense to not add a command and point people to the scheduler cog.

Hopefully, if you've needed this, the idea of scheduling it prompted using the scheduler cog which is also in this repo to accomplish this for now, which is something I just realized I had not been explicit about before as it may end up being the only option for this which I'm confortable with having enabled.