generated from Baipyrus/DiscordJS-Template
Compare commits
No commits in common. "8e9ddb1e7bee1ef705256eb182eff7039224d8b5" and "7f94c9ddd3dc1ada883551923064cf592bdb0916" have entirely different histories.
8e9ddb1e7b
...
7f94c9ddd3
@ -82,7 +82,7 @@ export async function execute(interaction) {
|
|||||||
|
|
||||||
// Reply failed to acknowledge command
|
// Reply failed to acknowledge command
|
||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
content: `Failed to ${step} channel!`,
|
content: `Failed to ${step} message!`,
|
||||||
ephemeral: true
|
ephemeral: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,24 +1,6 @@
|
|||||||
import { ChannelType, Events, PermissionFlagsBits } from 'discord.js';
|
import { ChannelType, Events, PermissionsBitField } from 'discord.js';
|
||||||
import { VoiceChannel } from '../../database.js';
|
import { VoiceChannel } from '../../database.js';
|
||||||
|
|
||||||
const vcPermissionOverwrites = [
|
|
||||||
PermissionFlagsBits.ManageRoles,
|
|
||||||
PermissionFlagsBits.ManageChannels,
|
|
||||||
PermissionFlagsBits.ViewChannel,
|
|
||||||
PermissionFlagsBits.ModerateMembers,
|
|
||||||
PermissionFlagsBits.SendMessages,
|
|
||||||
PermissionFlagsBits.SendMessagesInThreads,
|
|
||||||
PermissionFlagsBits.ManageMessages,
|
|
||||||
PermissionFlagsBits.ReadMessageHistory,
|
|
||||||
PermissionFlagsBits.AddReactions,
|
|
||||||
PermissionFlagsBits.Connect,
|
|
||||||
PermissionFlagsBits.Speak,
|
|
||||||
PermissionFlagsBits.MuteMembers,
|
|
||||||
PermissionFlagsBits.DeafenMembers,
|
|
||||||
PermissionFlagsBits.MoveMembers,
|
|
||||||
PermissionFlagsBits.UseVAD
|
|
||||||
];
|
|
||||||
|
|
||||||
const getchannel = async (member, channels) => {
|
const getchannel = async (member, channels) => {
|
||||||
// Check database for existing channel
|
// Check database for existing channel
|
||||||
const ownCh = await VoiceChannel.findOne({
|
const ownCh = await VoiceChannel.findOne({
|
||||||
@ -39,7 +21,9 @@ const getchannel = async (member, channels) => {
|
|||||||
permissionOverwrites: [
|
permissionOverwrites: [
|
||||||
{
|
{
|
||||||
id: member.id,
|
id: member.id,
|
||||||
allow: vcPermissionOverwrites
|
allow: [
|
||||||
|
PermissionsBitField.All
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user