From 661b3eb2177d7a5f707d89ed95533c6f9854f11d Mon Sep 17 00:00:00 2001 From: Schlauer-Hax Date: Sat, 6 Apr 2024 21:54:33 +0200 Subject: [PATCH] feat: auto status --- helper.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/helper.ts b/helper.ts index f1b7996..3623801 100644 --- a/helper.ts +++ b/helper.ts @@ -74,6 +74,9 @@ export function resolve(domains: string[]) { export function sendVoice(oldState: VoiceState, newState: VoiceState) { if (!oldState.channel && newState.channel) { sendVoiceMessage(generateVoiceEmbed('joined', false, newState, oldState), newState); + if (newState.channel.name === 'Talk 1') { + newState.guild.client.rest.put(`/channels/${newState.channelId}/voice-status`, { body: { status: "<:Shyguy:1223733571118960700> ❤" } }) + } } if (oldState.channel && !newState.channel) { sendVoiceMessage(generateVoiceEmbed('left', true, newState, oldState), newState); @@ -92,6 +95,9 @@ export function sendVoice(oldState: VoiceState, newState: VoiceState) { } if (oldState.channel && newState.channel && oldState.channelId !== newState.channelId) { sendVoiceMessage(generateVoiceEmbed('switched channel', true, newState, oldState).setColor('#FEE75C'), newState); + if (newState.channel.name === 'Talk 1') { + newState.guild.client.rest.put(`/channels/${newState.channelId}/voice-status`, { body: { status: "<:Shyguy:1223733571118960700> ❤" } }) + } } }