Add hang up as a command

This commit is contained in:
Dragon Fire
2020-05-16 10:25:34 -04:00
parent 7ed0ce5bc4
commit cd3ca222c8
4 changed files with 31 additions and 3 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ 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) {
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);