-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: send interface into voice channel / change logic for interface …
…command
- Loading branch information
Showing
3 changed files
with
65 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
const { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js'); | ||
|
||
async function vcInterface(channel) { | ||
const vcLock = new ButtonBuilder() | ||
.setCustomId('vcLock') | ||
.setLabel('🔒') | ||
.setStyle(ButtonStyle.Secondary); | ||
|
||
const vcUnlock = new ButtonBuilder() | ||
.setCustomId('vcUnlock') | ||
.setLabel('🔓') | ||
.setStyle(ButtonStyle.Secondary); | ||
|
||
/* const vcRename = new ButtonBuilder() | ||
.setCustomId('vcRename') | ||
.setLabel('✏️') | ||
.setStyle(ButtonStyle.Secondary); | ||
const vcBlock = new ButtonBuilder() | ||
.setCustomId('vcBlock') | ||
.setLabel('🚫') | ||
.setStyle(ButtonStyle.Secondary); | ||
const vcPermit = new ButtonBuilder() | ||
.setCustomId('vcPermit') | ||
.setLabel('✅') | ||
.setStyle(ButtonStyle.Secondary); | ||
const vcLimit = new ButtonBuilder() | ||
.setCustomId('vcLimit') | ||
.setLabel('👪') | ||
.setStyle(ButtonStyle.Secondary); | ||
const vcKick = new ButtonBuilder() | ||
.setCustomId('vcKick') | ||
.setLabel('❌') | ||
.setStyle(ButtonStyle.Secondary);*/ | ||
|
||
const row1 = new ActionRowBuilder() | ||
.addComponents([vcLock, vcUnlock /* vcRename*/]); | ||
|
||
/* const row2 = new ActionRowBuilder() | ||
.addComponents([vcBlock, vcPermit, vcLimit, vcKick]);*/ | ||
|
||
const embed = new EmbedBuilder() | ||
.setTitle('Voice Channel Interface') | ||
.setDescription('You can use this interface to manage your voice channel.\nYou can also use the slash commands!\n\n🔒 Lock\n🔓 Unlock') | ||
/* .setDescription('You can use this interface to manage your voice channel.\nYou can also use the slash commands!\n\n🔒 Lock\n🔓 Unlock\n✏️ Rename\n🚫 Block\n✅ Permit\n👪 Limit\n❌ Kick')*/ | ||
.setFooter({ text: 'Use the buttons below to manage your voice channel!' }); | ||
|
||
await channel.send({ | ||
embeds: [embed], | ||
components: [row1.toJSON() /* row2.toJSON()*/], | ||
}); | ||
} | ||
|
||
module.exports = { | ||
vcInterface, | ||
}; |