diff --git a/README.md b/README.md index a0e5cc0a..c4945ce7 100644 --- a/README.md +++ b/README.md @@ -251,6 +251,7 @@ in the appropriate channel's topic to use it. * `` Disables leave messages (Place in the channel you recieve welcome messages in). * `` Allows a channel to recieve phone calls from the `phone` command. +* `` Hides the abuse notice from phone call pick-ups. * `` 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. diff --git a/commands/util-public/options.js b/commands/util-public/options.js index 825ff8e9..f565399e 100644 --- a/commands/util-public/options.js +++ b/commands/util-public/options.js @@ -23,6 +23,7 @@ module.exports = class OptionsCommand extends Command { __Phone Options__ \`\` Allows this channel to recieve phone calls. + \`\` Hides the abuse notice from phone call pick-ups. \`\` 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. diff --git a/structures/phone/PhoneCall.js b/structures/phone/PhoneCall.js index fdb52446..d8a2989b 100644 --- a/structures/phone/PhoneCall.js +++ b/structures/phone/PhoneCall.js @@ -53,10 +53,13 @@ module.exports = class PhoneCall { this.setTimeout(); if (this.adminCall) return this; const usage = this.client.registry.commands.get('hang-up').usage(); + if (!this.origin.topic.includes('')) await this.sendNotice(this.origin); await this.origin.send(`☎️ **${this.recipient.guild.name}** picked up! Use ${usage} to hang up.`); if (this.originDM) { + await this.sendNotice(this.recipient, true); await this.recipient.send(`☎️ Accepted call from **${this.startUser.tag}'s DM**. Use ${usage} to hang up.`); } else { + if (!this.recipient.topic.includes('')) await this.sendNotice(this.recipient); await this.recipient.send(`☎️ Accepted call from **${this.origin.guild.name}**. Use ${usage} to hang up.`); } return this; @@ -162,4 +165,14 @@ module.exports = class PhoneCall { str = preventURLEmbeds(str); return str; } + + sendNotice(channel, dm) { + const reportUsage = this.client.registry.commands.get('report').usage('abuse '); + return channel.send(stripIndents` + ⚠️ **Notice:** ⚠️ + Sending illegal, NSFW, obscene, or hateful content can result in you and your server being banned from Xiao. + To report abuse, use ${reportUsage} (please include IDs and user tags). + ${dm ? '' : 'To hide this notice, place `` in your channel topic.'} + `); + } };