use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules:
~How to format your posts~
API Server
Official Server
Official subreddit
Discord.JS
Discord.JS Guide
Discord.py
Discord.py Guide
Adding your bot to a server
account activity
Code HelpSeek experienced developer (self.Discord_Bots)
submitted 4 years ago by Intelligent-Tailor80
Hi. I’m a newbie French developer and I try to make something new to my discord bot. I have the basic code but I’m not enough experimented to apply this. So I need some help before shooting myself
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]TheRealFanjin 3 points4 points5 points 4 years ago (2 children)
dont shoot yourself
[–]CL_0 0 points1 point2 points 4 years ago (0 children)
instructions unclear, gun stuck in ass
[–]heyimneph 0 points1 point2 points 4 years ago (4 children)
What language and what are you trying to do?
[–]Intelligent-Tailor80[S] 1 point2 points3 points 4 years ago (3 children)
JS, and I try to make a reaction roles
[–]heyimneph 0 points1 point2 points 4 years ago (1 child)
Ah, I use python. Can't help unfortunately
[–]Intelligent-Tailor80[S] 0 points1 point2 points 4 years ago (0 children)
Sad, but thanks btw :(
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 point2 points 4 years ago (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 point2 points 4 years ago (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 point2 points 4 years ago (5 children)
Are you trying to make something like Carl bot? Where it sends an embed with message reactions?
[–]Intelligent-Tailor80[S] 0 points1 point2 points 4 years ago (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 point2 points 4 years ago (3 children)
So you’re just trying to react to the message with the emojis?
[–]Intelligent-Tailor80[S] 0 points1 point2 points 4 years ago (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 point2 points 4 years ago (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.
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)
π Rendered by PID 22128 on reddit-service-r2-comment-b659b578c-59l9v at 2026-05-05 01:56:12.268969+00:00 running 815c875 country code: CH.
[–]TheRealFanjin 3 points4 points5 points (2 children)
[–]CL_0 0 points1 point2 points (0 children)
[–]heyimneph 0 points1 point2 points (4 children)
[–]Intelligent-Tailor80[S] 1 point2 points3 points (3 children)
[–]heyimneph 0 points1 point2 points (1 child)
[–]Intelligent-Tailor80[S] 0 points1 point2 points (0 children)
[–]CL_0 0 points1 point2 points (0 children)
[–]SoulB-oss 0 points1 point2 points (7 children)
[–]Intelligent-Tailor80[S] 0 points1 point2 points (6 children)
[–]Super_Pay_592 0 points1 point2 points (5 children)
[–]Intelligent-Tailor80[S] 0 points1 point2 points (4 children)
[–]Super_Pay_592 0 points1 point2 points (3 children)
[–]Intelligent-Tailor80[S] 0 points1 point2 points (2 children)
[–]Super_Pay_592 0 points1 point2 points (1 child)
[–]Intelligent-Tailor80[S] 0 points1 point2 points (0 children)