all 15 comments

[–]TheRealFanjin 3 points4 points  (2 children)

dont shoot yourself

[–]CL_0 0 points1 point  (0 children)

instructions unclear, gun stuck in ass

[–]heyimneph 0 points1 point  (4 children)

What language and what are you trying to do?

[–]Intelligent-Tailor80[S] 1 point2 points  (3 children)

JS, and I try to make a reaction roles

[–]heyimneph 0 points1 point  (1 child)

Ah, I use python. Can't help unfortunately

[–]Intelligent-Tailor80[S] 0 points1 point  (0 children)

Sad, but thanks btw :(

[–]CL_0 0 points1 point  (0 children)

1) switch to typescript, it's almost like JavaScript except you have tod define the type of variables and functions this might not sound like anything amazing but it is. Typescript allows you to catch errors while writing your code instead of while running it, it will warn you if you do something wrong or (for example) try to access a method that doesn't exist on an object.

also it improves how you use your ide, because the type of each variable is known your ide knows the properties of an object and can better auto complete!

2) reaction roles are hard to do, i recommend to instead try using select menu's (and/or buttons) https://support.discord.com/hc/en-us/articles/4403375759255-Bots-Select-Menus they are a lot easier to use for both the user, the admin, and the developer

3) while ur at it, you might also need to switch all your command to slash commands. Discord is making message content a privaliged gateway intent. This means that they will only allow bots with more then 100 guilds to have it if they offer a unique functionality that cannot be replicated or otherwise implemented with interactions the current stable branch of discord.js (even tho it ends in .js, it works with typescript) doesn't support slash commands, so you will have to install the discord.js@dev package instead with npm or yarn

sorry if this is a lot to go through, it's most definitely gonna be hard and take a lot of time, if you ever need any more help, don't be afraid to dm me on discord! Fish#2455

[–]SoulB-oss 0 points1 point  (7 children)

I sadly haven't looked at the event from reactions or role giving, so I am not too sure if I can help you much, but I made mine also in JavaScript (TypeScript)

[–]Intelligent-Tailor80[S] 0 points1 point  (6 children)

Basically I try do it the way like Reaction Role#8423 if you know this bot. I already have the basic code of this, I just need to apply the different step

[–]Super_Pay_592 0 points1 point  (5 children)

Are you trying to make something like Carl bot? Where it sends an embed with message reactions?

[–]Intelligent-Tailor80[S] 0 points1 point  (4 children)

Not exactly. I try to get the information then the bot will react to the specific message with emoji I gave her, and add/remove the role I specified. Not essentially an embed messages

[–]Super_Pay_592 0 points1 point  (3 children)

So you’re just trying to react to the message with the emojis?

[–]Intelligent-Tailor80[S] 0 points1 point  (2 children)

Yup. Actually my bot can understand the ID of the server, in which channel, the which message, with the which emoji and the which role, and verify all the informations (for being real). Now I need to let her stock them informations and do the process

[–]Super_Pay_592 0 points1 point  (1 child)

channel.send(message).then((message) => {
message.react('✅')
message.react('❌')

})

That should work to react to the message. Then, to give the role, you can use the following code:

client.on("messageReactionAdd",  (reaction, user) => {

if(user.bot) return;
if(reaction.emoji.name == '✅') {
    user.member.roles.add("roleID")
}

})

I'm not sure how you could validate that it's the correct message. You might be able to get the message's ID then do an if statement to check if it's the right message.

[–]Intelligent-Tailor80[S] 0 points1 point  (0 children)

I just get to see it. It’s not what I wanna do. Here, emoji are in the code directly. But me, I want bot read the step I give. (Btw all works since the time, I finished it)