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

Mark avatar as being optional when creating webhooks #1055

Merged
merged 1 commit into from
Nov 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ declare namespace Eris {
lastPinTimestamp: number | null;
rateLimitPerUser: number;
topic: string | null;
createWebhook(options: { name: string; avatar: string }, reason?: string): Promise<Webhook>;
createWebhook(options: { name: string; avatar?: string | null }, reason?: string): Promise<Webhook>;
deleteMessages(messageIDs: string[], reason?: string): Promise<void>;
getWebhooks(): Promise<Webhook[]>;
purge(limit: number, filter?: (message: Message<GuildTextable>) => boolean, before?: string, after?: string, reason?: string): Promise<number>;
Expand Down Expand Up @@ -1357,7 +1357,7 @@ declare namespace Eris {
): Promise<Invite & InviteWithoutMetadata<null>>;
createChannelWebhook(
channelID: string,
options: { name: string; avatar: string },
options: { name: string; avatar?: string | null },
reason?: string
): Promise<Webhook>;
createGroupChannel(userIDs: string[]): Promise<GroupChannel>;
Expand Down Expand Up @@ -2196,7 +2196,7 @@ declare namespace Eris {
addMessageReaction(messageID: string, reaction: string): Promise<void>;
createInvite(options?: CreateInviteOptions, reason?: string): Promise<Invite & InviteWithoutMetadata<null, TextChannel>>;
createMessage(content: MessageContent, file?: MessageFile | MessageFile[]): Promise<Message<TextChannel>>;
createWebhook(options: { name: string; avatar: string }, reason?: string): Promise<Webhook>;
createWebhook(options: { name: string; avatar?: string | null}, reason?: string): Promise<Webhook>;
deleteMessage(messageID: string, reason?: string): Promise<void>;
deleteMessages(messageIDs: string[], reason?: string): Promise<void>;
edit(options: Omit<EditChannelOptions, "icon" | "ownerID">, reason?: string): Promise<this>;
Expand Down
2 changes: 1 addition & 1 deletion lib/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ class Client extends EventEmitter {
* @arg {String} channelID The ID of the channel to create the webhook in
* @arg {Object} options Webhook options
* @arg {String} options.name The default name
* @arg {String} options.avatar The default avatar as a base64 data URI. Note: base64 strings alone are not base64 data URI strings
* @arg {String} [options.avatar] The default avatar as a base64 data URI. Note: base64 strings alone are not base64 data URI strings
* @arg {String} [reason] The reason to be displayed in audit logs
* @returns {Promise<Object>} Resolves with a webhook object
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/structures/TextChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class TextChannel extends GuildChannel {
/**
* Create a channel webhook
* @arg {Object} options Webhook options
* @arg {String} options.avatar The default avatar as a base64 data URI. Note: base64 strings alone are not base64 data URI strings
* @arg {String} [options.avatar] The default avatar as a base64 data URI. Note: base64 strings alone are not base64 data URI strings
* @arg {String} options.name The default name
* @arg {String} [reason] The reason to be displayed in audit logs
* @returns {Promise<Object>} Resolves with a webhook object
Expand Down