obj.forEach() does not work
I'm new to Discord ... so, no, I don't know what I'm doing ... & also no, I can't find any examples or discussion online. That's why I'm here.
Started working on a bot to assign a new user role after new member accepts rules ... then self-assigns their roles.
Old msgs & reactions are not cached when bot is initialized. I can hard code the chanID/msgID & initialize/cache them so that events will fire ... specifically the messageReactionAdd/Remove events.
The main things that I want to accomplish are the role assignments & toggle the other reactions off to force only a single reaction for polls & things.
So now I'd like to make this a function instead of hard coding every single chan/msg combination. So my objective is to build an object in 'config.json' to store the chan/msg ID's so they will be cached/initialized during bot's clientReady event.
typeof(Initializations) = object
However, I cannot figure out how to ... for(msg in/of obj) ... obj.forEach() ... or obj.each().
What am I doing wrong?
Started working on a bot to assign a new user role after new member accepts rules ... then self-assigns their roles.
Old msgs & reactions are not cached when bot is initialized. I can hard code the chanID/msgID & initialize/cache them so that events will fire ... specifically the messageReactionAdd/Remove events.
The main things that I want to accomplish are the role assignments & toggle the other reactions off to force only a single reaction for polls & things.
So now I'd like to make this a function instead of hard coding every single chan/msg combination. So my objective is to build an object in 'config.json' to store the chan/msg ID's so they will be cached/initialized during bot's clientReady event.
typeof(Initializations) = object
However, I cannot figure out how to ... for(msg in/of obj) ... obj.forEach() ... or obj.each().
What am I doing wrong?
