mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 04:25:01 +00:00
Update DJS
This commit is contained in:
parent
ac619ec00f
commit
5e73d380c5
23 changed files with 71 additions and 56 deletions
|
@ -54,14 +54,14 @@ export async function handleCompanionPermissions(
|
|||
const channel = pluginData.guild.channels.cache.get(channelId as Snowflake);
|
||||
if (!channel || !(channel instanceof TextChannel)) continue;
|
||||
await channel.permissionOverwrites
|
||||
.get(userId as Snowflake)
|
||||
.resolve(userId as Snowflake)
|
||||
?.delete(`Companion Channel for ${oldChannel!.id} | User Left`);
|
||||
}
|
||||
|
||||
for (const [channelId, permissions] of permsToSet) {
|
||||
const channel = pluginData.guild.channels.cache.get(channelId as Snowflake);
|
||||
if (!channel || !(channel instanceof TextChannel)) continue;
|
||||
await channel.updateOverwrite(userId, new Permissions(BigInt(permissions)).serialize(), {
|
||||
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