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

Commit

Permalink
fix: remove unused and broken channel id checks in webhook (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
DevYukine authored Mar 7, 2022
1 parent 350e68c commit 70addb8
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,13 @@ type webhookQueryBuilder struct {
ctx context.Context
flags Flag
client *Client
cid Snowflake
webhookID Snowflake
}

func (w *webhookQueryBuilder) validate() error {
if w.client == nil {
return ErrMissingClientInstance
}
if w.cid.IsZero() {
return ErrMissingChannelID
}
if w.webhookID.IsZero() {
return ErrMissingWebhookID
}
Expand Down Expand Up @@ -204,7 +200,6 @@ type webhookWithTokenQueryBuilder struct {
ctx context.Context
flags Flag
client *Client
cid Snowflake
webhookID Snowflake
token string
}
Expand All @@ -213,9 +208,6 @@ func (w *webhookWithTokenQueryBuilder) validate() error {
if w.client == nil {
return ErrMissingClientInstance
}
if w.cid.IsZero() {
return ErrMissingChannelID
}
if w.webhookID.IsZero() {
return ErrMissingWebhookID
}
Expand Down

0 comments on commit 70addb8

Please sign in to comment.