canHandle method
Determines whether this builder can handle the given message
and
attachments
. If this returns true
, build will be called.
Otherwise, the next builder in the list will be called.
Implementation
@override
bool canHandle(
Message message,
Map<String, List<Attachment>> attachments,
) {
final giphyAttachments = attachments[AttachmentType.giphy];
return giphyAttachments != null && giphyAttachments.length == 1;
}