fixed createMessage.ts
diff --git a/TODO.json b/TODO.json
deleted file mode 100644
index 90fe168..0000000
--- a/TODO.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "filters": {
- "wordFilter": {
- "enabled": true,
- "words": {
- "strict": [],
- "loose": []
- }
- },
- "invite": {
- "enabled": false,
- "channels": []
- },
- "pings": {
- "mass": 5,
- "everyone": true,
- "roles": true
- }
- }
-}
diff --git a/src/events/messageCreate.ts b/src/events/messageCreate.ts
index 69bc542..d17dccb 100644
--- a/src/events/messageCreate.ts
+++ b/src/events/messageCreate.ts
@@ -78,7 +78,8 @@
if (fileNames.files.length > 0) {
for (const element of fileNames.files) {
const url = element.url ? element.url : element.local;
- if (/\.(jpg|jpeg|png|gif|gifv|webm|webp|mp4|wav|mp3|ogg)$/.test(url)) {
+ if (/\.(j(pe?g|fif)|a?png|gifv?|w(eb[mp]|av)|mp([34]|eg-\d)|ogg|avi|h\.26(4|5)|cda)$/.test(url.toLowerCase())) {
+ // jpg|jpeg|png|apng|gif|gifv|webm|webp|mp4|wav|mp3|ogg|jfif|MPEG-#|avi|h.264|h.265
if (
config.filters.images.NSFW &&
!(message.channel instanceof ThreadChannel ? message.channel.parent?.nsfw : message.channel.nsfw)