Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to send files #32

Open
AntiGuide opened this issue May 13, 2020 · 3 comments
Open

Add ability to send files #32

AntiGuide opened this issue May 13, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@AntiGuide
Copy link

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?

@nminchow
Copy link
Owner

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

@nminchow nminchow added the enhancement New feature or request label May 13, 2020
@AntiGuide
Copy link
Author

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?

@nminchow
Copy link
Owner

nminchow commented Dec 29, 2020

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants