mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 04:25:01 +00:00
Start move to configAccessibleObjects, exclude perm overrides from logs
configAccessibleObjects are used to guarantee backwards compatibility and consistency. Perm overrides from our own plugins are ignored as to not spam logs through bot managed slowmode or companion channels
This commit is contained in:
parent
dda19de6e6
commit
d2dd103175
28 changed files with 259 additions and 75 deletions
|
@ -53,6 +53,7 @@ export async function handleCompanionPermissions(
|
|||
for (const channelId of permsToDelete) {
|
||||
const channel = pluginData.guild.channels.cache.get(channelId as Snowflake);
|
||||
if (!channel || !(channel instanceof TextChannel)) continue;
|
||||
pluginData.state.serverLogs.ignoreLog(LogType.CHANNEL_UPDATE, channelId, 3 * 1000);
|
||||
await channel.permissionOverwrites
|
||||
.resolve(userId as Snowflake)
|
||||
?.delete(`Companion Channel for ${oldChannel!.id} | User Left`);
|
||||
|
@ -61,6 +62,7 @@ export async function handleCompanionPermissions(
|
|||
for (const [channelId, permissions] of permsToSet) {
|
||||
const channel = pluginData.guild.channels.cache.get(channelId as Snowflake);
|
||||
if (!channel || !(channel instanceof TextChannel)) continue;
|
||||
pluginData.state.serverLogs.ignoreLog(LogType.CHANNEL_UPDATE, channelId, 3 * 1000);
|
||||
await channel.permissionOverwrites.create(userId as Snowflake, new Permissions(BigInt(permissions)).serialize(), {
|
||||
reason: `Companion Channel for ${voiceChannel!.id} | User Joined`,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue