krisppurg / dimscord

A Discord Bot & REST Library for Nim.
https://krisppurg.github.io/dimscord/
MIT License
222 stars 20 forks source link

Add support for message components #59

Closed ire4ever1190 closed 3 years ago

ire4ever1190 commented 3 years ago

Adds support for all current message components (ActionRow, SelectMenu, Button) and added an example to go with it

Found working with the objects directly was a bit annoying and added a simple api to create the components easy enough (this can easily be removed if needed)

Tested and it works correctly (might be some edge cases I missed so if anyone wants to toy around and find them, feel free lol)

dannyhpy commented 3 years ago

Hey!

Discord also supports Message components for webhooks https://discord.com/developers/docs/resources/webhook#execute-webhook

It might be interesting to add it to the executeWebhook proc?

ire4ever1190 commented 3 years ago

Thanks! Will add that in asap

krisppurg commented 3 years ago

Thanks hobble for the contribution.

As of recently I have a bunch of files unsaved (because the implementation is uncomplete.). Hopefully I will get to save those files, test them and finally push them to master.

I will review your Pull Request and of course change what is needed 👍.

ire4ever1190 commented 3 years ago

Added components for executeWebhook and merged upstream

krisppurg commented 3 years ago

Nice

krisppurg commented 3 years ago

I will go back to my left over files and complete some of them. Hopefully it doesn't take long.

ire4ever1190 commented 3 years ago

There seems to be some issues with your latest commit, I'll try and solve it before this gets merged My code seems to have issues with the commit, will fix it

krisppurg commented 3 years ago

Is it fixed now?

ire4ever1190 commented 3 years ago

Sorry for the delay, I've ran into emojis that I didn't have before

ire4ever1190 commented 3 years ago

Seems to all be working again