Voltaire
Voltaire copied to clipboard
Add ability to send files
Would it be possible to add the ability to send files like pdf documents via the bot? How would you go about implementing this? Maybe the bot could wait for the document after the command as it can not be included in the command?
I believe it would only be a matter of pulling the attachments off of messages and relaying them along with the message when sent: https://discord.foxbot.me/docs/api/Discord.Attachment.html
If you want to look into implementation, I would start with the send handlers here: https://github.com/nminchow/Voltaire/blob/master/Voltaire/Modules/Messages.cs#L30-L52
I'll try to implement it. Can you give me a hint on how to carry on the Attachment from Program.HandleCommandAsync() without destroying your Architecture? ^^ I believe it is discarded here. Is integrating it in the ServiceCollection the right way?
@AntiGuide - I'm sorry, I totally missed this question!
I would think we would pass it along to SendCommandAsync (both calls). I'd need to look into those signatures, tho.