From 1483dd71d8e70b3c064d1a9d1ccbdb169aaa4d85 Mon Sep 17 00:00:00 2001 From: diamondburned Date: Wed, 16 Dec 2020 13:22:26 -0800 Subject: [PATCH] Webhook: Shorter constructor function names --- api/webhook/webhook.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/api/webhook/webhook.go b/api/webhook/webhook.go index 7d7a579..aad628b 100644 --- a/api/webhook/webhook.go +++ b/api/webhook/webhook.go @@ -26,14 +26,14 @@ type Client struct { Token string } -// NewClient creates a new Client using the passed token and id. -func NewClient(id discord.WebhookID, token string) *Client { - return NewCustomClient(id, token, httputil.NewClient()) +// New creates a new Client using the passed token and id. +func New(id discord.WebhookID, token string) *Client { + return NewCustom(id, token, httputil.NewClient()) } -// NewCustomClient creates a new Client creates a new Client using the passed -// token and id and makes API calls using the passed httputil.Client -func NewCustomClient(id discord.WebhookID, token string, c *httputil.Client) *Client { +// NewCustom creates a new Client creates a new Client using the passed token +// and ID and makes API calls using the passed httputil.Client +func NewCustom(id discord.WebhookID, token string, c *httputil.Client) *Client { return &Client{ Client: c, ID: id,