Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix 'TypeError: this._dispatcher.createToken is not a function' error #412

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

0xeac7
Copy link

@0xeac7 0xeac7 commented May 19, 2024

No description provided.

@jaysilver
Copy link

jaysilver commented Dec 13, 2024

Hi, is this project still supported by the developer or is it deprecated? I am currently running into an error happening directly on load; WhoReacted could not be compiled. See console for details.

Console:
TypeError: this._dispatcher.createToken is not a function at new _ (https://discord.com/assets/web.602b92fcb20f85900416.js:12:8255485) at new DefaultSettingsStore (betterdiscord://plugins/WhoReacted.plugin.js:128:9) at eval (betterdiscord://plugins/WhoReacted.plugin.js:165:23) at eval (betterdiscord://plugins/WhoReacted.plugin.js:730:12) at N.requireAddon (betterdiscord/renderer.js:5:28601) at N.loadAddon (betterdiscord/renderer.js:5:6221) at N.loadAddon (betterdiscord/renderer.js:5:26269) at betterdiscord/renderer.js:5:4201

Is the code broken since an update? Or do I need prerequisite libraries to be installed for this plugin to function? If you're still here, I would love to find out if this could be fixed?

All the best! <3

(posted here, because this issue seems to be exactly what i'm experiencing! sorry if this was the wrong place, let me know if you'd prefer I create a separate issue/ticket!)

@Stroobie
Copy link

Stroobie commented Jan 5, 2025

The error is happening because the Dispatcher object is being instantiated using a function that no longer exists _(this.dispatcher.createToken) At least, that's how it looks.

I was able to replace this:
super(new Dispatcher(), { [ActionTypes.SETTINGS_UPDATE]: () => this.save() });

With this:

const dispatcher = BdApi.findModuleByProps('dispatch', 'subscribe'); super(dispatcher, { [ActionTypes.SETTINGS_UPDATE]: () => this.save() });

The plugin loaded, but still is not displaying the avatars/profile pictures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants