Modmail icon indicating copy to clipboard operation
Modmail copied to clipboard

The title command breaks the bot temporarily in that channel by setting "User ID" to -1

Open Atharv-Agarwal opened this issue 2 years ago • 10 comments

Bot Version

4.0 dev9

How are you hosting Modmail?

Other

Error Logs

NA

Screenshots

No response

Additional Information

By default, the bot shows the first message of the modmail in the logs channel, but by using the title command, it used to set that instead. No error logs.

Atharv-Agarwal avatar Apr 28 '22 16:04 Atharv-Agarwal

image

If it helps, look at the user id it set it to after using the title command.

Atharv-Agarwal avatar Apr 29 '22 15:04 Atharv-Agarwal

Tested in another thread, the bot seems to change back the channel name! Attached audit logs and me changing the name. I suspect this is the reason for #3150 The bot cant close the channel without the user ID being proper in the topic

image image image

Atharv-Agarwal avatar Apr 29 '22 15:04 Atharv-Agarwal

Its somehow always returning -1 https://github.com/kyb3r/modmail/blob/c6ed564db714c3296a74046ac98df2ef27bcc2c8/core/utils.py#L310

Pretty sure it was broken in #3111

Atharv-Agarwal avatar Apr 30 '22 12:04 Atharv-Agarwal

@Jerrie-Aries Since you did this ^ you probably have a better idea around this. I have tried combing through but only if I understood regex better

Atharv-Agarwal avatar Apr 30 '22 13:04 Atharv-Agarwal

@Cordila does this always happen for this particular user? (958407376451567717)

I'm unable to find a consistent reproduction method

fourjr avatar May 03 '22 14:05 fourjr

I am unable to find a constant reproduction either, but I can confirm this happens with me. Funny part being this doesnt happen when I run in the Test server. Maybe some config I have is interfering? Let me try clean updating to dev14 and get back to you.

image ID: 705769248034914314

Atharv-Agarwal avatar May 04 '22 03:05 Atharv-Agarwal

Still having the same issue even after updating.

Atharv-Agarwal avatar May 04 '22 03:05 Atharv-Agarwal

Having the same issue in the latest commit too.

JeDaYoshi avatar May 04 '22 03:05 JeDaYoshi

Here is a user ID it worked for properly 756407638744629249

Atharv-Agarwal avatar May 04 '22 06:05 Atharv-Agarwal

I don't think it's something specific to certain user IDs not working. For example, it did not work at first for my account, but did on further attempts.

JeDaYoshi avatar May 04 '22 06:05 JeDaYoshi