M
M
DIAdiscord.js - Imagine an app
Created by M on 3/26/2024 in #djs-questions
Emoji steal command.
omfg i finnally got it yay
44 replies
DIAdiscord.js - Imagine an app
Created by M on 3/26/2024 in #djs-questions
Emoji steal command.
im fixxing it rn
44 replies
DIAdiscord.js - Imagine an app
Created by M on 3/26/2024 in #djs-questions
Emoji steal command.
kinda works but the name is messed up https://thicc-thighs.com/g8t073df.png
44 replies
DIAdiscord.js - Imagine an app
Created by M on 3/26/2024 in #djs-questions
Emoji steal command.
i forgor to define the guild whol up
44 replies
DIAdiscord.js - Imagine an app
Created by M on 3/26/2024 in #djs-questions
Emoji steal command.
44 replies
DIAdiscord.js - Imagine an app
Created by M on 3/26/2024 in #djs-questions
Emoji steal command.
lol
44 replies
DIAdiscord.js - Imagine an app
Created by M on 3/26/2024 in #djs-questions
Emoji steal command.
i just did that
44 replies
DIAdiscord.js - Imagine an app
Created by M on 3/26/2024 in #djs-questions
Emoji steal command.
its wtv i have a backup on github ill get later
44 replies
DIAdiscord.js - Imagine an app
Created by M on 3/26/2024 in #djs-questions
Emoji steal command.
i did idk what happend
44 replies
DIAdiscord.js - Imagine an app
Created by M on 3/26/2024 in #djs-questions
Emoji steal command.
i just noticed my package and package lock is missing im confused
44 replies
DIAdiscord.js - Imagine an app
Created by M on 3/26/2024 in #djs-questions
Emoji steal command.
14.14.4 i think
44 replies
DIAdiscord.js - Imagine an app
Created by M on 3/26/2024 in #djs-questions
Emoji steal command.
Error adding emoji to the guild: TypeError [ReqResourceType]: The resource must be a string, Buffer or a valid file stream.
at GuildEmojiManager.create (C:\Users\Minoa\node_modules\discord.js\src\managers\GuildEmojiManager.js:54:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Client.<anonymous> (C:\Users\Minoa\Desktop\bot\index.js:2911:23) {
code: 'ReqResourceType'
}
Error adding emoji to the guild: TypeError [ReqResourceType]: The resource must be a string, Buffer or a valid file stream.
at GuildEmojiManager.create (C:\Users\Minoa\node_modules\discord.js\src\managers\GuildEmojiManager.js:54:28)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Client.<anonymous> (C:\Users\Minoa\Desktop\bot\index.js:2911:23) {
code: 'ReqResourceType'
}
44 replies
DIAdiscord.js - Imagine an app
Created by M on 3/26/2024 in #djs-questions
Emoji steal command.
i think it needs to be converted to base64 due to the emoji add api
44 replies
DIAdiscord.js - Imagine an app
Created by M on 3/26/2024 in #djs-questions
Emoji steal command.
if i fix one error i run into another and another and another and another and another ect ect
} else if (command === 'emojisteal') {
if (!message.member.permissions.has('ManageEmojisAndStickers') &&
message.author.id !== process.env.OWNER_ID) {
return message.channel.send("You don't have permission to use this command.");
}

const [emojiArg] = args;
if (!emojiArg || !emojiArg.match(/^<a?:\w+:\d+>$/)) {
return message.reply('Please provide a valid emoji.');
}

const [, emojiName, emojiId] = emojiArg.match(/<a?:\w+:(\d+)>/);
const emojiURL = `https://cdn.discordapp.com/emojis/${emojiId}`;

try {
const emoji = await message.guild.emojis.create(emojiURL, emojiName);
message.reply(`Emoji ${emoji} has been added to the guild.`);
} catch (error) {
console.error('Error adding emoji to the guild:', error);
message.reply('An error occurred while adding the emoji to the guild.');
}
} else if (command === 'emojisteal') {
if (!message.member.permissions.has('ManageEmojisAndStickers') &&
message.author.id !== process.env.OWNER_ID) {
return message.channel.send("You don't have permission to use this command.");
}

const [emojiArg] = args;
if (!emojiArg || !emojiArg.match(/^<a?:\w+:\d+>$/)) {
return message.reply('Please provide a valid emoji.');
}

const [, emojiName, emojiId] = emojiArg.match(/<a?:\w+:(\d+)>/);
const emojiURL = `https://cdn.discordapp.com/emojis/${emojiId}`;

try {
const emoji = await message.guild.emojis.create(emojiURL, emojiName);
message.reply(`Emoji ${emoji} has been added to the guild.`);
} catch (error) {
console.error('Error adding emoji to the guild:', error);
message.reply('An error occurred while adding the emoji to the guild.');
}
44 replies
DIAdiscord.js - Imagine an app
Created by M on 3/26/2024 in #djs-questions
Emoji steal command.
yay i can send you what i have, it no workey
44 replies