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 webhook client #860

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add webhook client #860

wants to merge 1 commit into from

Conversation

DRSchlaubi
Copy link
Member

No description provided.

- Extract webhook related functions of Kord into WebhookClient
- Extract webhook constructor of Unsafe to WebhookUnsafe
- Add AbstractKordBuilder
- Add stackTraceRecovery to AbstractKordBuilder and therefore restOnly and webhook mode
@Galarzaa90
Copy link
Contributor

Galarzaa90 commented Jul 12, 2024

I was just looking for this! I see this will be almost a year. Is there something missing or something to help with?

I'm really interested in a webhook client.

@DRSchlaubi
Copy link
Member Author

I was just looking for this! I see this will be almost a year. Is there something missing or something to help with?

I'm really interested in a webhook client.

Time flies by whoohoo

Yeah the review from @lukellmann is missing so let's nudge him again

@lukellmann
Copy link
Member

tbh i'm not sure about adding a way to get a half baked Kord instance - but doing it in some other way would require a LOT of work (extra entities for anything that has a reference to a webhook client)

@DRSchlaubi
Copy link
Member Author

This is simmilar to Kord.restOnly

@Galarzaa90
Copy link
Contributor

Galarzaa90 commented Jul 13, 2024

I'm already using a half baked Kord instance to manage webhooks:

Kord.restOnly("") {
    applicationId = Snowflake(-1)
}

At the moment, it is only using the execute endpoint:

kord.rest.webhook.executeWebhook(..., ...) {
}

So no problem there. But also the fact that I have everything in the API available to call even though it will fail, it is something you have to be careful with. 🤷🏼‍♂️

My first comment was before I knew it would be so simple to do it without it 😅, but still, proper support for it would be nice, so it doesn't feel like you are doing something you shouldn't be doing.

@lukellmann
Copy link
Member

This is simmilar to Kord.restOnly

hm, that's right - maybe we could just add another factory function and don't even have the WebhookClient interface. we could eventually design some proper kinds of different clients with their own entities and stuff (autogeneration? 👀)

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

Successfully merging this pull request may close these issues.

3 participants