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

Modifying a webhook's channel doesn't actually modify it? #1447

Closed
Aida-Enna opened this issue Feb 11, 2020 · 1 comment · Fixed by #1791
Closed

Modifying a webhook's channel doesn't actually modify it? #1447

Aida-Enna opened this issue Feb 11, 2020 · 1 comment · Fixed by #1791

Comments

@Aida-Enna
Copy link

I'm trying to create a generic webhook for use across the entire server, as opposed to an obnoxious number of webhooks per channel. I create the singular webhook and reassign it's Channel, but it still posts in the original specified channel in server settings. ChannelID reassignment doesn't work either.

using (var client = new DiscordWebhookClient("https://discordapp.com/api/webhooks/whatever"))
{
await client.ModifyWebhookAsync(x => x.Channel = BotClient.GetChannel(Context.Channel.Id) as SocketTextChannel);
await client.ModifyWebhookAsync(x => x.ChannelId = Context.Channel.Id);
await client.SendMessageAsync("test", false, null);
}
@merthsoft
Copy link

I'm also running into this--has anyone found a workaround?

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

Successfully merging a pull request may close this issue.

3 participants