mirror of
https://github.com/Myxelium/RandomMemerBot.git
synced 2026-04-09 08:59:39 +00:00
Allow capitalized names
This commit is contained in:
@@ -197,8 +197,7 @@ function generateFileName(name: string) {
|
|||||||
.split(' ')
|
.split(' ')
|
||||||
.filter(word => /^[a-zA-Z0-9]/.test(word))
|
.filter(word => /^[a-zA-Z0-9]/.test(word))
|
||||||
.join(' ')
|
.join(' ')
|
||||||
.replace(/\s+/g, '-')
|
.replace(/\s+/g, ' ');
|
||||||
.toLowerCase();
|
|
||||||
|
|
||||||
return `${formattedName}-${randomHex}.mp3`;
|
return `${formattedName}-${randomHex}.mp3`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user