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