Skip to content

Commit 1521004

Browse files
committed
edit channel after it has been created
may resolve needing admin perm
1 parent 60e691c commit 1521004

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/services/discord/modules/commands/TempVoiceChannel.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,14 @@ export const SlashVoiceCommand: SlashCommand = {
4949
name: ctx.options.getString("name", true),
5050
type: Discord.ChannelType.GuildVoice,
5151
parent: bot.config.categories.voiceChat,
52-
permissionOverwrites: [
53-
{ id: ctx.user.id, allow: ["ManageChannels", "ManageRoles"] },
54-
],
5552
reason: `temp channel command from <@${ctx.user.id}> (${ctx.user.id})`,
5653
});
5754
if (channel) {
55+
await channel.edit({
56+
permissionOverwrites: [
57+
{ id: ctx.user.id, allow: ["ManageChannels", "ManageRoles"] },
58+
],
59+
});
5860
pending.push(ctx.user.id);
5961
setTimeout(async () => {
6062
const updatedChannel = (await bot

0 commit comments

Comments
 (0)