vsTerminus / Mojo-Discord

Perl Modules that implement parts of the Discord API. Intended for Text Chat Bots.
MIT License
33 stars 10 forks source link

Added create_invite subroutine (and documentation with example of usage) #44

Closed randolf closed 2 years ago

randolf commented 2 years ago

Please see also #45 because I couldn't figure out how to include changes to two different modules in a single Pull Request. Thanks!

vsTerminus commented 2 years ago

Thanks for submitting, I'll get these merged as soon as I have time.

randolf commented 2 years ago

Thanks for submitting, I'll get these merged as soon as I have time.

I appreciate it, and I understand the challenge of having other things to do. Thanks for Mojo::Discord -- it has been helpful to me, and I hope to contribute more in the future.

vsTerminus commented 2 years ago

Merged as part of 114f879f216ca8670da836914bffb3bef755fbae

Thank you!

I made a couple of changes to how and what gets returned, it will conflict with yours. Check it out and let me know if you have any questions.

randolf commented 2 years ago

I made a couple of changes to how and what gets returned, it will conflict with yours. Check it out and let me know if you have any questions.

Thanks for the heads up on this -- I did have to make some changes, but the way you changed things actually brings everything to a better outcome with simpler coding overall (I like this more).

I'm looking at your code to learn how to contribute better in the future.

vsTerminus commented 2 years ago

What you contributed was just fine.

You kinda had the misfortune of picking an endpoint that doesn't return nice clean JSON results like the others seem to. Normally $tx->res->json should just provide a nice perl hashref with everything in it. We shouldn't have to parse the text body like we did here.

The only suggestion I could make is to create a branch for the code you want to submit. Do your commits on that branch, and then submit your pull request when you're done. If you can get everything into one pull request it's easier to manage.