mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 22:34:46 +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) {
|
constructor(client) {
|
||||||
super(client, {
|
super(client, {
|
||||||
name: 'hang-up',
|
name: 'hang-up',
|
||||||
|
aliases: ['hang'],
|
||||||
group: 'phone',
|
group: 'phone',
|
||||||
memberName: 'hang-up',
|
memberName: 'hang-up',
|
||||||
description: 'Hangs up the current phone call.',
|
description: 'Hangs up the current phone call.',
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "120.1.0",
|
"version": "121.0.0",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -92,12 +92,6 @@ module.exports = class PhoneCall {
|
|||||||
}
|
}
|
||||||
|
|
||||||
send(channel, msg, hasText, hasImage, hasEmbed) {
|
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)) {
|
if (this.cooldown.has(msg.author.id) && !this.client.isOwner(msg.author)) {
|
||||||
const badChannel = channel.id === this.origin.id ? this.recipient : this.origin;
|
const badChannel = channel.id === this.origin.id ? this.recipient : this.origin;
|
||||||
return badChannel.send(`☎️ ${msg.author}, slow down! You're sending messages too fast!`);
|
return badChannel.send(`☎️ ${msg.author}, slow down! You're sending messages too fast!`);
|
||||||
|
|||||||
Reference in New Issue
Block a user