diff --git a/README.md b/README.md index e1b3efb1..da310e2c 100644 --- a/README.md +++ b/README.md @@ -248,6 +248,7 @@ in the appropriate channel's topic to use it. * `` Allows a channel to recieve phone calls from the `phone` command. * `` Prevents this channel from recieving voicemails for missed calls. * `` Makes the channel only able to be called directly in the `phone` command, rather than be picked at random. +* `` Blocks a channel or server from contacting the channel via phone. * `` Hides a channel from the `phone-book` command. * `` Allows a channel to recieve portal messages from the `portal-send` command. * `` Hides the channel and server name from the `portal-send` command when your channel is picked. diff --git a/commands/phone/phone.js b/commands/phone/phone.js index 17825733..cfe80e8f 100644 --- a/commands/phone/phone.js +++ b/commands/phone/phone.js @@ -48,6 +48,8 @@ module.exports = class PhoneCommand extends Command { && channel.topic && channel.topic.includes('') && !channel.topic.includes('') + && !channel.topic.includes(``) + && !channel.topic.includes(``) && !msg.guild.channels.cache.has(channel.id) && (channelID ? true : !this.client.inPhoneCall(channel))); if (!channels.size) return msg.reply('No channels currently allow phone calls...'); @@ -60,6 +62,12 @@ module.exports = class PhoneCommand extends Command { return msg.reply('This channel does not allow phone calls.'); } if (this.client.inPhoneCall(channel)) return msg.reply('This channel is already in a call.'); + if (channel.topic.includes(``)) { + return msg.reply('That channel has blocked this channel from calling them.'); + } + if (channel.topic.includes(``)) { + return msg.replY('That channel has blocked this server from calling them.'); + } } else { channel = channels.random(); } diff --git a/commands/util-public/options.js b/commands/util-public/options.js index d13165ac..10f69358 100644 --- a/commands/util-public/options.js +++ b/commands/util-public/options.js @@ -22,6 +22,7 @@ module.exports = class OptionsCommand extends Command { \`\` Allows this channel to recieve phone calls. \`\` Prevents this channel from recieving voicemails for missed calls. \`\` Makes the channel only able to be called directly, rather than picked randomly. + \`\` Blocks a channel or server from contacting you via phone. \`\` Hides this channel from \`phone-book\`. \`\` Marks the channel as a portal channel for \`portal-send\`. \`\` Hides the channel's name when the channel is chosen to recieve a portal message. diff --git a/package.json b/package.json index 9a883923..30af2525 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "119.20.0", + "version": "119.21.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {