mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-26 22:32:52 +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
|
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.
|
served over 10,000 servers with a uniquely devoted fanbase.
|
||||||
|
|
||||||
## Commands (298)
|
## Commands (299)
|
||||||
### Utility:
|
### Utility:
|
||||||
|
|
||||||
* **prefix**: Shows or sets the command prefix.
|
* **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.
|
* **airhorn**: Plays an airhorn sound in your voice channel.
|
||||||
* **dec-talk**: The world's best Text-to-Speech.
|
* **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.
|
* **soundboard**: Plays a sound in your voice channel.
|
||||||
|
|
||||||
### Image Manipulation:
|
### 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",
|
"name": "xiao",
|
||||||
"version": "70.4.0",
|
"version": "70.5.0",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user