Can't set role icon
Discord.js version: 14.15.3
Node version: v20.5.1
Code:
I get no errors, so i have no idea what to do. The bot has Administrator permissions.
const customEmojis = content.match(/<a?:\w+:(\d+)>/g);
const attachments = message.attachments;
let response;
if (customEmojis) {
response = await axios.get(`https://cdn.discordapp.com/emojis/${customEmojis[0].match(/:(\d+)>/)[1]}.png`, { responseType: "arraybuffer" })
} else if (attachments) {
response = await axios.get(attachments.first().url, { responseType: "arraybuffer" });
}
console.log(response.data);
await discordRole.setIcon(response.data);