mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 09:42:22 +00:00
fixed typo in Guild#createEmoji (#1588)
This commit is contained in:
parent
b694ab1b80
commit
ecb8424f52
1 changed files with 1 additions and 1 deletions
|
|
@ -941,7 +941,7 @@ class Guild {
|
||||||
* .catch(console.error);
|
* .catch(console.error);
|
||||||
*/
|
*/
|
||||||
createEmoji(attachment, name, roles) {
|
createEmoji(attachment, name, roles) {
|
||||||
if (typeof attahment === 'string' && attachment.startsWith('data:')) {
|
if (typeof attachment === 'string' && attachment.startsWith('data:')) {
|
||||||
const data = { image: attachment, name };
|
const data = { image: attachment, name };
|
||||||
if (roles) data.roles = roles.map(r => r.id ? r.id : r);
|
if (roles) data.roles = roles.map(r => r.id ? r.id : r);
|
||||||
return this.client.api.guilds(this.id).emojis.post({ data })
|
return this.client.api.guilds(this.id).emojis.post({ data })
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue