Skip to content

Create and assign role Discord.js

I’m creating a Discord bot with discord.js, but I don’t find how to create a role and assign it automatically. Example, a client writes: ?insc NAME @pseudo1 @pseudo2 @pseudo3 This command create the role NAME, then a category with channelVoice and channelText with access only for NAME. For the mom…

Filter children in nested object

I have an object which I’m trying to filter out elements with a path and map, but I can’t get past the first level into the nested children. My object (with UI components removed): This filters the elements with a path, but only to the first level: Result: My goal is to have a list of routes with …

Undefined error even though variable is declared

I am trying to create a card where all information are stored. However after I created the variable and tried to append text to it, I got an undefined error. What should I change? Here’s the error: Uncaught TypeError: title is undefined createCards http://localhost/Projects/diary/:86 createCards http://…

How to make external javascript file work in ReactJs?

In a React project, my public.html file looks like this: All the components of the project load inside the “root” div. The “function.js” file is an external javascript file from a theme. In one of the React components, I have an input field: Now, inside “componentDidMount()&#8221…