fix crash on role edit (#155)

This commit is contained in:
mochie 2025-02-18 14:08:16 +01:00 committed by GitHub
parent 037685bd2b
commit 21e1a960b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -111,7 +111,7 @@ export default definePlugin({
colorIfServer(a: any): string | undefined {
const roleColor = a.author?.colorString ?? "inherit";
if (a.channel.guild_id && !settings.store.colorInServers) return roleColor;
if (a?.channel?.guild_id && !settings.store.colorInServers) return roleColor;
const color = getCustomColorString(a.message.author.id, true);
return color ?? roleColor;