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

Feature request: add channel.createWebhook() function #197

Closed
williamhorning opened this issue Dec 11, 2022 · 2 comments · Fixed by #203
Closed

Feature request: add channel.createWebhook() function #197

williamhorning opened this issue Dec 11, 2022 · 2 comments · Fixed by #203
Assignees
Labels
enhancement New feature or request

Comments

@williamhorning
Copy link

Is your feature request related to a problem? Please describe.
Not really, this would allow us to create webhooks the same was as discord.js.

Describe the solution you'd like
In discord.js, there is a channel.createWebhook() function that allows for us to create webhooks in a channel but there isn't an equivalent in guilded.js.

Describe alternatives you've considered
Currently, I use the client.rest.router.createWebhook() function to do this, but it's a bit more complex than channel.createWebhook() in discord.js.

Additional context

// This is what needs to be done currently
let a = await client.rest.router.createWebhook(channelId, {
	channelId,
	name: "bridge",
});
// This is what I want to be able to do
let a = await channel.createWebhook({
	name: "bridge",
})
@williamhorning williamhorning added the enhancement New feature or request label Dec 11, 2022
@zaida04
Copy link
Owner

zaida04 commented Dec 11, 2022

Hmmm, I've held off on making channel methods because the Guilded API at most gives a channel ID in payloads, meaning you'd have a channel object with just an ID.

I recommend using client.webhooks.create if the rest router is giving too complex payloads back to you.

@williamhorning
Copy link
Author

@zaida04 I guess that makes sense, though I didn't know there was the client.webhooks.create function

@zaida04 zaida04 linked a pull request Jan 8, 2023 that will close this issue
4 tasks
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

Successfully merging a pull request may close this issue.

2 participants