diff --git a/lib/src/builders/message/attachment.dart b/lib/src/builders/message/attachment.dart index 45be187c2..07be6241e 100644 --- a/lib/src/builders/message/attachment.dart +++ b/lib/src/builders/message/attachment.dart @@ -8,11 +8,11 @@ import 'package:nyxx/src/models/message/attachment.dart'; class AttachmentBuilder extends Builder { List data; - String? fileName; + String fileName; String? description; - AttachmentBuilder({required this.data, this.fileName, this.description}); + AttachmentBuilder({required this.data, required this.fileName, this.description}); static Future fromFile(File file, {String? description}) async { final data = await file.readAsBytes(); @@ -26,7 +26,7 @@ class AttachmentBuilder extends Builder { @override Map build() => { - if (fileName != null) 'filename': fileName, + 'filename': fileName, if (description != null) 'description': description, }; }