Skip to content

Commit

Permalink
Merge pull request #60 from GravityWolfNotAmused/dev
Browse files Browse the repository at this point in the history
Fix issue with Voice Channels being both Voice and Text Channel interfaces.
  • Loading branch information
GravityWolfNotAmused authored May 22, 2023
2 parents 7f230a2 + 3f2072b commit 0aac4b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CreateReleaseApps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: playercountbot-${{ steps.branch-name.outputs.current_branch }}-${{steps.date.outputs.date}}-linux-arm64
path: ./DiscordPlayerCountBot/bin/Release/net6.0/linux-arm64/publish
path: ./DiscordPlayerCountBot/bin/Release/net6.0/linux-arm64/publish
2 changes: 1 addition & 1 deletion DiscordPlayerCountBot/Bot/Bot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ public async Task UpdateAsync()
await DiscordClient.SetChannelName(Information.ChannelID, gameStatus);
}
}
}
}
8 changes: 4 additions & 4 deletions DiscordPlayerCountBot/DiscordClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ public static async Task SetChannelName(this IDiscordClient socket, ulong? chann

if (channel != null)
{
if (channel is ITextChannel)
{
gameStatus = gameStatus.Replace('/', '-').Replace(' ', '-').Replace(':', '-');
}
if (channel is ITextChannel && channel is not IVoiceChannel)
{
gameStatus = gameStatus.Replace('/', '-').Replace(' ', '-').Replace(':', '-');
}

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

0 comments on commit 0aac4b6

Please sign in to comment.