Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

feat!: adjust webhook methods to match latest discord api docs #475

Merged
merged 5 commits into from
Mar 1, 2022

Conversation

DevYukine
Copy link
Contributor

Description

This PR adjusts webhook.go with following changes:

  • Removes Execute methods on WebhookQueryBuilder (interface & impl) because these methods will not work without token and the current implementation just sets token to "" which will always return a Missing Token Error (no need to keep functions which always error)
  • Adds missing Execute (ExecuteGithub/ExecuteSlack) functions to WebhookWithTokenQueryBuilder struct
  • Add missing Get/Edit/Delete Message functions to WebhookWithTokenQueryBuilder struct
  • Adjust Execute definition to make wait & threadId fully optional as by Discord Docs
  • Adjust execWebhook for the optional values
  • Replaced deprecated errors with non deprecated ones

I've also run go generate once to regenerate anything needed, i hope that was right as the readme just briefly mentions this but not say if this is required or not on PRs

Breaking Change?

yes

Benchmarks

Checklist:

  • I have performed a self-review of my own code
  • Commented complex situations or referenced the discord documentation
  • Updated documentation
  • Added/Updated unit tests
  • Added/Updated benchmarks (if this is a performance critical component)

@andersfylling andersfylling changed the title feat/fix!: adjust webhook methods to match latest discord api docs feat!: adjust webhook methods to match latest discord api docs Feb 16, 2022
@andersfylling
Copy link
Owner

I'll take a look this weekend. I'm a bit occupied today.

@andersfylling
Copy link
Owner

LGTM!

@andersfylling andersfylling merged commit 7aaf8fb into andersfylling:master Mar 1, 2022
@DevYukine DevYukine deleted the fix/webhook-impl branch March 5, 2022 04:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants