Fix setActivity TypeError by using a try-catch block
This commit is contained in:
parent
1a9abffab5
commit
4ccb769c9d
1 changed files with 3 additions and 1 deletions
|
|
@ -287,7 +287,9 @@ async function ensureVoiceConnection(session) {
|
|||
session.lastError = "";
|
||||
|
||||
if (runtime.client.user && typeof runtime.client.user.setActivity === "function") {
|
||||
runtime.client.user.setActivity(`Watch Party: ${session.currentTitle || session.title || "idle"}`).catch(() => {});
|
||||
try {
|
||||
runtime.client.user.setActivity(`Watch Party: ${session.currentTitle || session.title || "idle"}`);
|
||||
} catch (_) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue