hello i am quite new to javascript (im coming from python and i love d.js already)
i have this class ```javascript
class LocalSlashBuilder {
constructor() {
this.data = [];
this.interactionMap = {};
}
register(name, description, callback) {
this.data.push({name: name, description: description});
this.interactionMap[name] = callback;
}
dispatch_for(name, interaction) {
this.interactionMap[name](interaction);
}
}
``` the issue is, in dispatch_for the expression doesnt work, it says that: TypeError: this.interactionMap[name] is not a function
though upon googling i dont see anything wrong
this is also how i would write this in python
i have no idea why this happens