mirror of
https://github.com/diamondburned/arikawa.git
synced 2025-01-07 12:38:05 +00:00
Webhook: Shorter constructor function names
This commit is contained in:
parent
868825da7d
commit
1483dd71d8
|
@ -26,14 +26,14 @@ type Client struct {
|
||||||
Token string
|
Token string
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewClient creates a new Client using the passed token and id.
|
// New creates a new Client using the passed token and id.
|
||||||
func NewClient(id discord.WebhookID, token string) *Client {
|
func New(id discord.WebhookID, token string) *Client {
|
||||||
return NewCustomClient(id, token, httputil.NewClient())
|
return NewCustom(id, token, httputil.NewClient())
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewCustomClient creates a new Client creates a new Client using the passed
|
// NewCustom creates a new Client creates a new Client using the passed token
|
||||||
// token and id and makes API calls using the passed httputil.Client
|
// and ID and makes API calls using the passed httputil.Client
|
||||||
func NewCustomClient(id discord.WebhookID, token string, c *httputil.Client) *Client {
|
func NewCustom(id discord.WebhookID, token string, c *httputil.Client) *Client {
|
||||||
return &Client{
|
return &Client{
|
||||||
Client: c,
|
Client: c,
|
||||||
ID: id,
|
ID: id,
|
||||||
|
|
Loading…
Reference in a new issue