mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Leave Voice Channel Command
This commit is contained in:
@@ -8,7 +8,7 @@ Xiao is a Discord bot coded in JavaScript with
|
||||
300 commands, she is one of the most feature-filled bots out there, and formerly
|
||||
served over 10,000 servers with a uniquely devoted fanbase.
|
||||
|
||||
## Commands (298)
|
||||
## Commands (299)
|
||||
### Utility:
|
||||
|
||||
* **prefix**: Shows or sets the command prefix.
|
||||
@@ -212,6 +212,7 @@ served over 10,000 servers with a uniquely devoted fanbase.
|
||||
|
||||
* **airhorn**: Plays an airhorn sound in your voice channel.
|
||||
* **dec-talk**: The world's best Text-to-Speech.
|
||||
* **leave-voice-channel**: Leaves a voice channel, in case the bot gets stuck.
|
||||
* **soundboard**: Plays a sound in your voice channel.
|
||||
|
||||
### Image Manipulation:
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
|
||||
module.exports = class LeaveVoiceChannelCommand extends Command {
|
||||
constructor(client) {
|
||||
super(client, {
|
||||
name: 'leave-voice-channel',
|
||||
aliases: ['leave-vc'],
|
||||
group: 'voice',
|
||||
memberName: 'leave',
|
||||
description: 'Leaves a voice channel, in case the bot gets stuck.',
|
||||
guildOnly: true
|
||||
});
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
if (!this.client.voiceConnections.has(msg.guild.id)) return msg.reply('I am not in a voice channel...');
|
||||
const { channel } = this.client.voiceConnections.get(msg.guild.id);
|
||||
channel.leave();
|
||||
return msg.say(`Left **${channel.name}**.`);
|
||||
}
|
||||
};
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "70.4.0",
|
||||
"version": "70.5.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user