mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
fixed typo in Guild#createEmoji (#1588)
This commit is contained in:
committed by
Schuyler Cebulskie
parent
b694ab1b80
commit
ecb8424f52
@@ -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 })
|
||||||
|
|||||||
Reference in New Issue
Block a user