BetterDiscordStuff icon indicating copy to clipboard operation
BetterDiscordStuff copied to clipboard

[ BUG | SendTimeStamps cant be constructed.

Open Masono03 opened this issue 1 year ago • 8 comments

Issue Started today. As title states cant be constrcuted during load.

Canary 141316 (e700422) BetterDiscord 1.6.2 Host 1.0.48 Windows 10 64-Bit (10.0.19044)

Masono03 avatar Aug 11 '22 22:08 Masono03

Adding onto this with the error:

TypeError: Cannot read property 'locale' of undefined
    at new SendTimestamp (betterdiscord://plugins/SendTimestamps.plugin.js:226:59)
    at Object.initializeAddon (<anonymous>:4:41393)
    at Object.loadAddon (<anonymous>:4:8923)
    at Object.loadAddon (<anonymous>:4:40648)
    at Object.updateList (<anonymous>:4:10561)
    at Object.updatePluginList (<anonymous>:4:40345)
    at O.reload (<anonymous>:4:108250)
    at Object.Ye (https://canary.discord.com/assets/d81410ec2d330583c6e5.js:6010:658)
    at qe (https://canary.discord.com/assets/d81410ec2d330583c6e5.js:6010:812)
    at https://canary.discord.com/assets/d81410ec2d330583c6e5.js:6030:409
    at Pr (https://canary.discord.com/assets/d81410ec2d330583c6e5.js:6030:506)
    at Mr (https://canary.discord.com/assets/d81410ec2d330583c6e5.js:6030:920)
    at https://canary.discord.com/assets/d81410ec2d330583c6e5.js:6036:680
    at ke (https://canary.discord.com/assets/d81410ec2d330583c6e5.js:6118:404)
    at https://canary.discord.com/assets/d81410ec2d330583c6e5.js:6032:395
    at Vr (https://canary.discord.com/assets/d81410ec2d330583c6e5.js:6032:425)
    at rn (https://canary.discord.com/assets/d81410ec2d330583c6e5.js:6019:757)
    at nn (https://canary.discord.com/assets/d81410ec2d330583c6e5.js:6019:7)
    at t.unstable_runWithPriority (https://canary.discord.com/assets/d81410ec2d330583c6e5.js:6230:828)
    at Ki (https://canary.discord.com/assets/d81410ec2d330583c6e5.js:6041:117)
    at Ue (https://canary.discord.com/assets/d81410ec2d330583c6e5.js:6118:144)
    at en (https://canary.discord.com/assets/d81410ec2d330583c6e5.js:6018:800)
    at HTMLDivElement.r (https://canary.discord.com/assets/e813ffde6cadac615dfb.js:126:559)```

dippyshere avatar Aug 12 '22 04:08 dippyshere

Can confirm same on Discord-PTB and Linux: Ptb 141407 (be1e474) BetterDiscord 1.6.2 Host 0.0.31 Linux 64-Bit (5.18.16-Hardened1-1-Hardened)

Ash3781 avatar Aug 12 '22 17:08 Ash3781

The update that broke this has now been pushed to stable.

aaronliu0130 avatar Aug 13 '22 00:08 aaronliu0130

Can also confirm on stable version Stable 141471 (8b6078f) BetterDiscord 1.6.2 Host 1.0.9006 Windows 10 64-Bit (10.0.22000)

Testovani000 avatar Aug 13 '22 12:08 Testovani000

As a tempory solution you can remove line 234:

this.locale = UserSettingsStore.locale;

Like that:

this.forceOnRight = false;
//this.locale = UserSettingsStore.locale;

this.sendFormatOptions = {
    0: 'F',
};

at least it helped me

AndryS0 avatar Aug 13 '22 15:08 AndryS0

Another solution that fixes some other plugins too is to modify line 376 in 0PluginLibrary.plugin.js from:

get UserSettingsStore() {return _webpackmodules__WEBPACK_IMPORTED_MODULE_1__["default"].getByProps("guildPositions");},

to:

get UserSettingsStore() {return _webpackmodules__WEBPACK_IMPORTED_MODULE_1__["default"].getByProps("getAllSettings", "theme");},

from this pull request

dippyshere avatar Aug 14 '22 03:08 dippyshere

I fixed my issue with

this.locale = UserSettingsStore.locale;

simply by changing it to

this.locale = Api.DiscordModules.locale

since that's how it's more or less set up in the code

Fusezion avatar Aug 18 '22 08:08 Fusezion

Hey guys, Sorry for being inactive for too long. I had a lot going on so I was not able to fix bugs. As you may know that the recent Discord update broke a lot of the plugins. I will attempt to fix my plugins once I figure out what the broken changes are 💛.

Taimoor-Tariq avatar Oct 17 '22 17:10 Taimoor-Tariq