forked from ChrisChrome/weather-bot
Updated Bcfy voice commands to be there own.
This commit is contained in:
parent
7b49ad0d38
commit
e59ccaf3ff
|
@ -26,6 +26,8 @@
|
|||
"username": "YOUR_USERNAME",
|
||||
"password": "YOUR_PASSWORD"
|
||||
},
|
||||
"voice_enabled": true,
|
||||
|
||||
"uptime-kuma": {
|
||||
"enabled": false,
|
||||
"url": "",
|
||||
|
|
17
index.js
17
index.js
|
@ -606,11 +606,6 @@ discord.on('ready', async () => {
|
|||
if (config.broadcastify.enabled) {
|
||||
// Add commands to join vc, leave vc, and play stream
|
||||
commands.push(
|
||||
{
|
||||
"name": "leave",
|
||||
"description": "Leave the current voice chat",
|
||||
"default_member_permissions": 0
|
||||
},
|
||||
{
|
||||
"name": "playbcfy",
|
||||
"description": "Play the broadcastify stream",
|
||||
|
@ -622,6 +617,16 @@ discord.on('ready', async () => {
|
|||
"required": true
|
||||
}
|
||||
]
|
||||
}
|
||||
)
|
||||
}
|
||||
if (config.voice_enabled) {
|
||||
// Add commands to join vc, leave vc, and play stream
|
||||
commands.push(
|
||||
{
|
||||
"name": "leave",
|
||||
"description": "Leave the current voice chat",
|
||||
"default_member_permissions": 0
|
||||
},
|
||||
{
|
||||
"name": "play",
|
||||
|
@ -654,7 +659,6 @@ discord.on('ready', async () => {
|
|||
}
|
||||
)
|
||||
}
|
||||
|
||||
await (async () => {
|
||||
try {
|
||||
//Global
|
||||
|
@ -1035,7 +1039,6 @@ discord.on("interactionCreate", async (interaction) => {
|
|||
|
||||
case "leave": // Leave broadcastify stream
|
||||
if (!interaction.inGuild()) return interaction.reply({ content: "This command can only be used in a guild", ephemeral: true });
|
||||
if (!config.broadcastify.enabled) return interaction.reply({ content: "Broadcastify is not enabled", ephemeral: true });
|
||||
channel = interaction.member.voice.channel;
|
||||
if (!channel) return interaction.reply({ content: "You need to be in a voice channel", ephemeral: true });
|
||||
res = LeaveVoiceChannel(channel)
|
||||
|
|
Loading…
Reference in a new issue