Skip to content

Commit

Permalink
feat: auto status
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlauer-Hax committed Apr 6, 2024
1 parent dbe5d86 commit 661b3eb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions helper.ts
Expand Up @@ -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);
Expand All @@ -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> ❤" } })
}
}
}

Expand Down

1 comment on commit 661b3eb

@g9aerospace
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn I didnt know the bot does so much #coolasf

Please sign in to comment.