BotClient icon indicating copy to clipboard operation
BotClient copied to clipboard

bug: client crashes while parsing discord system messages

Open hideonrosie opened this issue 1 year ago • 3 comments

Issue checklist

  • [X] I have checked the FAQs.
  • [X] I have searched the existing issues to make sure this isn't a duplicate.
  • [ ] I have discussed this issue on the support server.

Issue description

So, i just got botclient crashed when switching from other channel to a channel that have AutoMod logging

Here is the crash report:

TypeError: Cannot read properties of undefined (reading 'startsWith')
    at r (file:///C:/Users/Admin/AppData/Local/Programs/botclient/resources/app.asar/build/static/js/main.89189ca3.js:2:1698255)
    at discord-messages
    at _ (file:///C:/Users/Admin/AppData/Local/Programs/botclient/resources/app.asar/build/static/js/main.89189ca3.js:2:115420)
    at DiscordMessages
    at main
    at div
    at div
    at r (file:///C:/Users/Admin/AppData/Local/Programs/botclient/resources/app.asar/build/static/js/main.89189ca3.js:2:1689800)
    at div
    at div
    at n (file:///C:/Users/Admin/AppData/Local/Programs/botclient/resources/app.asar/build/static/js/main.89189ca3.js:2:1672985)
    at div
    at div
    at div
    at div
    at div
    at div
    at n (file:///C:/Users/Admin/AppData/Local/Programs/botclient/resources/app.asar/build/static/js/main.89189ca3.js:2:1720516)
    at n (file:///C:/Users/Admin/AppData/Local/Programs/botclient/resources/app.asar/build/static/js/main.89189ca3.js:2:1598774)

Current behavior

No response

Expected behavior

No response

BotClient version

v0.10.3

Operating System

Windows 10 21H2. Build 19044.1826

How did you download the application?

From GitHub releases (or links from the readme)

Priority this issue should have

Medium (should be fixed soon)

Addition information

No response

hideonrosie avatar Jul 18 '22 10:07 hideonrosie

Can you give information on the channel that's causing the said error?

Like, channel-type, permissions, etc

Also, my closest guess is it's something to do with weird messages but i cant say for sure until I can reproduce the crash.

DarkGuy10 avatar Jul 19 '22 08:07 DarkGuy10

This is that channel Information Type: TEXT Channel Permmissions:

  • Bot: Admin Permmission
  • Channel: Everyone: View channel, view message history, send messages, react, embed file and link

In the server, I dedicate this channel to storing AutoMod logs, so I think AutoMod is the reason for this problem. Because then I tried deleting all Discord System messages and the Client didn't crash anymore

Sorry for the late reply, I've been busy studying for exams lately

hideonrosie avatar Jul 26 '22 05:07 hideonrosie

Yup, it's definitely an issue with Discord System messages. The only ones that are currently being parsed appropriately are the user joining messages.

The message parser is mostly legacy code from early days of the client and needs to be rewritten. This issue will be fixed at the same time :+1:

Sorry for the late reply, I've been busy studying for exams lately

Np! Tysm for taking the time to file this report and helping us out!

DarkGuy10 avatar Jul 27 '22 04:07 DarkGuy10