diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/randomiseFileNames.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/randomiseFileNames.ts b/src/plugins/randomiseFileNames.ts index eeaef3a..3826711 100644 --- a/src/plugins/randomiseFileNames.ts +++ b/src/plugins/randomiseFileNames.ts @@ -23,6 +23,6 @@ export default definePlugin({ { length: 7 }, () => chars[Math.floor(Math.random() * chars.length)] ).join(""); - return rand + window.DiscordNative.fileManager.extname(file); + return rand + (file.lastIndexOf(".") > -1 ? file.slice(file.lastIndexOf(".")) : "") }, }); |