Skip to content

Commit

Permalink
fix: sometimes kick messages where not formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy committed Jan 16, 2025
1 parent 8f91d28 commit ce8e414
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/botUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ export const displayClientChat = (text: string) => {
}

export const parseFormattedMessagePacket = (arg) => {
if (typeof arg === 'string') {
try {
arg = JSON.parse(arg)
} catch {}
}
if (typeof arg === 'object') {
try {
return {
Expand Down

0 comments on commit ce8e414

Please sign in to comment.