withUploadDocument<T> method
Shows upload document indicator and executes a function.
Example:
await ctx.withUploadDocument(() async {
final document = await generateReport();
await ctx.replyWithDocument(document);
});
Implementation
Future<T> withUploadDocument<T>(Future<T> Function() operation) async {
await sendUploadDocument();
return await operation();
}