mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
Remove all string object references (#586)
This commit is contained in:
committed by
Amish Shah
parent
ec0a5cdfbc
commit
d97ce2e181
@@ -196,7 +196,7 @@ class TextBasedChannel {
|
||||
*/
|
||||
sendFile(attachment, fileName) {
|
||||
if (!fileName) {
|
||||
if (attachment instanceof String || typeof attachment === 'string') {
|
||||
if (typeof attachment === 'string') {
|
||||
fileName = path.basename(attachment);
|
||||
} else if (attachment && attachment.path) {
|
||||
fileName = path.basename(attachment.path);
|
||||
|
||||
Reference in New Issue
Block a user