fedimbed: fix hopefully
This commit is contained in:
parent
f6f3f2654e
commit
bbc183e179
1 changed files with 5 additions and 2 deletions
|
|
@ -1613,9 +1613,12 @@ events.add("messageCreate", "fedimbed", async function (msg) {
|
|||
if (!((await hasFlag(msg.guildID, "fedimbed")) || (await hasFlag(msg.guildID, "bskyEmbeds")))) return;
|
||||
if (!msg.content || msg.content == "") return;
|
||||
|
||||
if (!msg.member.permissions.has("embedLinks")) return;
|
||||
|
||||
if (URLS_REGEX.test(msg.content)) {
|
||||
if (!msg.member) {
|
||||
msg.member = await msg.channel.guild.getRESTMember(msg.author.id);
|
||||
}
|
||||
if (!msg.member?.permissions?.has?.("embedLinks")) return;
|
||||
|
||||
const urls = msg.content.match(URLS_REGEX);
|
||||
for (let url of urls) {
|
||||
const minimal = /^-#\s+/.test(url);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue