From 1d2ae54f2b192001915bf77c0418b2134dfc6d80 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Tue, 7 Jul 2020 16:48:20 -0400 Subject: [PATCH] Allow hiding channel name from portal-send --- README.md | 1 + commands/other/portal-send.js | 3 +++ commands/util-public/options.js | 1 + package.json | 2 +- 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ec584a94..57a78bd4 100644 --- a/README.md +++ b/README.md @@ -248,6 +248,7 @@ in the appropriate channel's topic to use it. * `` Prevents this channel from recieving voicemails for missed calls. * `` 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. ## Commands diff --git a/commands/other/portal-send.js b/commands/other/portal-send.js index 3abe4072..33d672c0 100644 --- a/commands/other/portal-send.js +++ b/commands/other/portal-send.js @@ -51,6 +51,9 @@ module.exports = class PortalSendCommand extends Command { **${this.portalEmoji} ${msg.author.tag} (${displayName}):** ${message} ${attachments || ''} `); + if (channel.topic.includes('')) { + return msg.say('Message sent to a server too terrified to show their name.'); + } return msg.say(`Message sent to **${channel.name}** in **${channel.guild.name}**!`); } catch { return msg.reply('Failed to send the message. Try again later!'); diff --git a/commands/util-public/options.js b/commands/util-public/options.js index 753bb34e..b330c6c4 100644 --- a/commands/util-public/options.js +++ b/commands/util-public/options.js @@ -23,6 +23,7 @@ module.exports = class OptionsCommand extends Command { \`\` Prevents this channel from recieving voicemails for missed calls. \`\` 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 e31c34c3..dd16a2f3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "119.12.2", + "version": "119.12.3", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {