Remove all adminCall stuff

This commit is contained in:
Dragon Fire
2021-04-29 18:08:31 -04:00
parent 35644c20b9
commit dedf26aa8c
3 changed files with 1 additions and 6 deletions
+1 -2
View File
@@ -252,9 +252,8 @@ client.on('message', async msg => {
if (!origin && !recipient) return; if (!origin && !recipient) return;
const call = origin || recipient; const call = origin || recipient;
if (call.originDM && call.startUser.id !== msg.author.id) return; if (call.originDM && call.startUser.id !== msg.author.id) return;
if (!call.adminCall && (msg.guild && (!msg.channel.topic || !msg.channel.topic.includes('<xiao:phone>')))) return; if (msg.guild && (!msg.channel.topic || !msg.channel.topic.includes('<xiao:phone>'))) return;
if (!call.active) return; if (!call.active) return;
if (call.adminCall && msg.guild.id === call.origin.guild.id && !client.isOwner(msg.author)) return;
try { try {
await call.send(origin ? call.recipient : call.origin, msg, hasText, hasImage, hasEmbed); await call.send(origin ? call.recipient : call.origin, msg, hasText, hasImage, hasEmbed);
} catch { } catch {
-3
View File
@@ -17,9 +17,6 @@ module.exports = class HangUpCommand extends Command {
if (!origin && !recipient) return msg.reply('☎️ This channel is not in a phone call.'); if (!origin && !recipient) return msg.reply('☎️ This channel is not in a phone call.');
const call = origin || recipient; const call = origin || recipient;
if (!call.active) return msg.reply('☎️ This call is not currently active.'); if (!call.active) return msg.reply('☎️ This call is not currently active.');
if (call.adminCall && !this.client.isOwner(msg.author)) {
return msg.reply('☎️ You cannot hang up in an admin call.');
}
const otherChannel = call.origin.id === msg.channel.id ? call.recipient : call.origin; const otherChannel = call.origin.id === msg.channel.id ? call.recipient : call.origin;
if (this.client.phone.isBlocked(msg.channel, otherChannel, msg.author)) { if (this.client.phone.isBlocked(msg.channel, otherChannel, msg.author)) {
return msg.reply('☎️ You are blocked from hanging up this phone call.'); return msg.reply('☎️ You are blocked from hanging up this phone call.');
-1
View File
@@ -29,7 +29,6 @@ module.exports = class PhoneInfoCommand extends Command {
.addField(' Recipient Server', otherChannelDM ? 'DM' : otherChannel.guild.name, true) .addField(' Recipient Server', otherChannelDM ? 'DM' : otherChannel.guild.name, true)
.addField(' Recipient ID', otherChannel.id, true) .addField(' Recipient ID', otherChannel.id, true)
.addField(' Call Duration', call.durationDisplay, true) .addField(' Call Duration', call.durationDisplay, true)
.addField(' Admin Call?', call.adminCall ? 'Yes' : 'No', true)
.addField(' Started By', call.startUser.tag, true); .addField(' Started By', call.startUser.tag, true);
return msg.embed(embed); return msg.embed(embed);
} }