Skip to content

Commit 0aac4b6

Browse files
Merge pull request #60 from GravityWolfNotAmused/dev
Fix issue with Voice Channels being both Voice and Text Channel interfaces.
2 parents 7f230a2 + 3f2072b commit 0aac4b6

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/CreateReleaseApps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ jobs:
9595
uses: actions/upload-artifact@v3
9696
with:
9797
name: playercountbot-${{ steps.branch-name.outputs.current_branch }}-${{steps.date.outputs.date}}-linux-arm64
98-
path: ./DiscordPlayerCountBot/bin/Release/net6.0/linux-arm64/publish
98+
path: ./DiscordPlayerCountBot/bin/Release/net6.0/linux-arm64/publish

DiscordPlayerCountBot/Bot/Bot.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ public async Task UpdateAsync()
7777
await DiscordClient.SetChannelName(Information.ChannelID, gameStatus);
7878
}
7979
}
80-
}
80+
}

DiscordPlayerCountBot/DiscordClient.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ public static async Task SetChannelName(this IDiscordClient socket, ulong? chann
2525

2626
if (channel != null)
2727
{
28-
if (channel is ITextChannel)
29-
{
30-
gameStatus = gameStatus.Replace('/', '-').Replace(' ', '-').Replace(':', '-');
31-
}
28+
if (channel is ITextChannel && channel is not IVoiceChannel)
29+
{
30+
gameStatus = gameStatus.Replace('/', '-').Replace(' ', '-').Replace(':', '-');
31+
}
3232

3333
//Keep in mind there is a massive rate limit on this call that is specific to discord, and not Discord.Net
3434
//2x per 10 minutes

0 commit comments

Comments
 (0)