Add blocking of users fully from phone

This commit is contained in:
Dragon Fire
2020-12-03 15:00:33 -05:00
parent 390853e208
commit ebabd3ec75
5 changed files with 29 additions and 11 deletions
+5 -2
View File
@@ -111,9 +111,12 @@ module.exports = class PhoneCall {
}
send(channel, msg, hasText, hasImage, hasEmbed) {
const otherChannel = channel.id === this.origin.id ? this.recipient : this.origin;
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!`);
return otherChannel.send(`☎️ ${msg.author}, slow down! You're sending messages too fast!`);
}
if (this.client.isBlockedFromPhone(otherChannel, channel, msg.author)) {
return otherChannel.send(`☎️ ${msg.author}, you are blocked from sending messages to this channel!`);
}
this.setTimeout();
if (!this.client.isOwner(msg.author)) {