Prevent URL embeds in phone messages

This commit is contained in:
Dragon Fire
2021-02-12 17:41:34 -05:00
parent b2e15503e5
commit e5135a2427
4 changed files with 18 additions and 7 deletions
+4
View File
@@ -200,6 +200,10 @@ module.exports = class Util {
return str;
}
static preventURLEmbeds(str) {
return str.replace(/(https?:\/\/\S+)/g, '<$1>');
}
static async reactIfAble(msg, user, emoji, fallbackEmoji) {
const dm = !msg.guild;
if (fallbackEmoji && (!dm && !msg.channel.permissionsFor(user).has('USE_EXTERNAL_EMOJIS'))) {