Strencher / BetterDiscordStuff

A collection of my BetterDiscord plugins
https://strencher.github.io/BetterDiscordStuff/
366 stars 226 forks source link

Fails to compile #366

Closed AskAlice closed 1 year ago

AskAlice commented 1 year ago
TypeError: Cannot read properties of undefined (reading 'reduce')
    at eval (betterdiscord://plugins/ChannelDms.plugin.js:261:143)
    at ___createMemoize___ (betterdiscord://plugins/ChannelDms.plugin.js:94:12)
    at get @discord/icons [as @discord/icons] (betterdiscord://plugins/ChannelDms.plugin.js:261:12)
    at eval (betterdiscord://plugins/ChannelDms.plugin.js:423:41)
    at eval (betterdiscord://plugins/ChannelDms.plugin.js:950:5)
    at buildPlugin (betterdiscord://plugins/ChannelDms.plugin.js:952:4)
    at eval (betterdiscord://plugins/ChannelDms.plugin.js:957:2)
    at M.requireAddon (betterdiscord/renderer.js:4:35818)
    at M.loadAddon (betterdiscord/renderer.js:4:8323)
    at M.loadAddon (betterdiscord/renderer.js:4:33490)
    at AsyncFunction.<anonymous> (betterdiscord/renderer.js:4:6315)

looks like some issue with the BD api changing. the reduce is called on this line

 BdApi.findAllModules(m => m.displayName && ~m.toString().indexOf('currentColor')).reduce((icons, icon) => (icons[icon.displayName] = icon, icons), {}))
domi-btnr commented 1 year ago

https://github.com/Strencher/BetterDiscordStuff/issues/324