Hang up now forces you to use the command

This commit is contained in:
Dragon Fire
2020-11-22 14:01:52 -05:00
parent 64e1ebdd13
commit 598eeb5577
3 changed files with 2 additions and 7 deletions
+1
View File
@@ -4,6 +4,7 @@ module.exports = class HangUpCommand extends Command {
constructor(client) {
super(client, {
name: 'hang-up',
aliases: ['hang'],
group: 'phone',
memberName: 'hang-up',
description: 'Hangs up the current phone call.',
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "120.1.0",
"version": "121.0.0",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {
-6
View File
@@ -92,12 +92,6 @@ module.exports = class PhoneCall {
}
send(channel, msg, hasText, hasImage, hasEmbed) {
if (msg.content && msg.content.toLowerCase() === 'hang up') {
if (this.ownerOrigin && channel.id === this.origin.id && !this.client.isOwner(msg.author)) {
return this.recipient.send('☎️ You cannot hang up in an admin call.');
}
return this.hangup(channel);
}
if (this.cooldown.has(msg.author.id) && !this.client.isOwner(msg.author)) {
const badChannel = channel.id === this.origin.id ? this.recipient : this.origin;
return badChannel.send(`☎️ ${msg.author}, slow down! You're sending messages too fast!`);