mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-17 21:40:51 +02:00
Prevent URL embeds in phone messages
This commit is contained in:
@@ -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'))) {
|
||||
|
||||
Reference in New Issue
Block a user