reformat: auto format
This commit is contained in:
parent
5338b56e4c
commit
7a9c2441a3
@ -53,7 +53,8 @@ export async function execute(interaction) {
|
|||||||
step = 'create';
|
step = 'create';
|
||||||
// Create new channel
|
// Create new channel
|
||||||
const channel = await guild.channels.create({
|
const channel = await guild.channels.create({
|
||||||
name, type: ChannelType.GuildVoice
|
name,
|
||||||
|
type: ChannelType.GuildVoice
|
||||||
});
|
});
|
||||||
|
|
||||||
// Save channel data
|
// Save channel data
|
||||||
@ -104,8 +105,7 @@ export async function execute(interaction) {
|
|||||||
|
|
||||||
// Set reply based on result of deletion
|
// Set reply based on result of deletion
|
||||||
let response = 'Successfully removed';
|
let response = 'Successfully removed';
|
||||||
if (count === 0)
|
if (count === 0) response = 'Failed to remove';
|
||||||
response = 'Failed to remove';
|
|
||||||
|
|
||||||
// Reply to acknowledge command
|
// Reply to acknowledge command
|
||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
|
@ -9,6 +9,5 @@ export async function execute(channel) {
|
|||||||
id: channel.id
|
id: channel.id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (count > 0)
|
if (count > 0) console.info(`[INFO] Custom VC with ID '${channel.id}' was deleted.`);
|
||||||
console.info(`[INFO] Custom VC with ID '${channel.id}' was deleted.`);
|
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ const getChannel = async (member, channels) => {
|
|||||||
await VoiceChannel.create({
|
await VoiceChannel.create({
|
||||||
id: privCh.id,
|
id: privCh.id,
|
||||||
owner: member.user.id
|
owner: member.user.id
|
||||||
})
|
});
|
||||||
|
|
||||||
return privCh;
|
return privCh;
|
||||||
};
|
};
|
||||||
@ -78,14 +78,13 @@ const leftVoiceChat = async (state) => {
|
|||||||
|
|
||||||
export const name = Events.VoiceStateUpdate;
|
export const name = Events.VoiceStateUpdate;
|
||||||
export async function execute(oldState, newState) {
|
export async function execute(oldState, newState) {
|
||||||
if (!newState.channel)
|
if (!newState.channel) return await leftVoiceChat(oldState);
|
||||||
return await leftVoiceChat(oldState);
|
|
||||||
|
|
||||||
// Find channel by id, return if not registered for customs
|
// Find channel by id, return if not registered for customs
|
||||||
const createCh = await VoiceChannel.findOne({
|
const createCh = await VoiceChannel.findOne({
|
||||||
where: {
|
where: {
|
||||||
id: newState.channel.id,
|
id: newState.channel.id,
|
||||||
create: true,
|
create: true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (createCh === null) return;
|
if (createCh === null) return;
|
||||||
|
@ -9,6 +9,5 @@ export async function execute(message) {
|
|||||||
id: message.id
|
id: message.id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (count > 0)
|
if (count > 0) console.info(`[INFO] Reaction Roles Message with ID '${message.id}' was deleted.`);
|
||||||
console.info(`[INFO] Reaction Roles Message with ID '${message.id}' was deleted.`);
|
|
||||||
}
|
}
|
||||||
|
@ -13,8 +13,7 @@ export const removeSelfRoles = async (interaction, id) => {
|
|||||||
|
|
||||||
// Set reply based on result of deletion
|
// Set reply based on result of deletion
|
||||||
let response = 'Successfully removed';
|
let response = 'Successfully removed';
|
||||||
if (count === 0)
|
if (count === 0) response = 'Failed to remove';
|
||||||
response = 'Failed to remove';
|
|
||||||
|
|
||||||
// Reply to acknowledge command
|
// Reply to acknowledge command
|
||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
|
Loading…
Reference in New Issue
Block a user