mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Hang up now forces you to use the command
This commit is contained in:
@@ -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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "120.1.0",
|
||||
"version": "121.0.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -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!`);
|
||||
|
||||
Reference in New Issue
Block a user