ModifyAsync Breaks ratelimit for ANY channel
See original GitHub issueI have been able to modify a voice channel for the past 6 months with no issues but recently the rate limit has blocked this. i have not changed the code for the modification at all. and its not an issue with more than one instance of the bot, ive tried changing the code but nothing seems to help.
here is my code
private async Task UpdateUserCount(SocketGuildUser arg)
{
try
{
var g = _client.GetGuild(Global.SwissGuildId);
if (g == null)
return;
var users = g.Users;
Global.UserCount = users.Count + 2;
var chan = g.GetVoiceChannel(Global.StatsTotChanID);
if (chan.Name != $"Total Users: {users.Count}")
{
Global.ConsoleLog($"Ucount {users.Count - 20}, usersSCount{users.Count}");
Global.ConsoleLog("Modifying..");
await chan.ModifyAsync(x =>
{
x.Name = $"Total Users: {users.Count}";
}, new RequestOptions() { AuditLogReason = "Update User count." });
Global.ConsoleLog("Completed mod..");
}
}
catch (Exception ex)
{
Console.WriteLine(ex);
}
}
and here is the result of this
ps. the voice channels id is (715943838941970514) which your seeing in the console
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:17 (13 by maintainers)
Top Results From Across the Web
Discord.net 1.0 - How to get Messages to delete?
1) Deleting many messages individually in a loop will cause a very unpleasant rate limit exception. var messages = await msg.Channel.
Read more >Changelog
Guilds utilizing Channel Categories will no longer crash bots on the READY event. [1.0.1] - 2017-07-05. Fixed. #732: Fixed parameter preconditions not being ......
Read more >IPWorks 2022 .NET Edition Reference
The Lightweight Directory Access Protocol (LDAP) Component is used to search, manage, ... MaxTransferRate, The transfer rate limit in bytes per second.
Read more >Rate Limits | Slack
This article gives an overview of the rate limits you're likely to encounter for Slack platform features, and then notes how the limits...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My bot currently updates the channel name every 2 minutes and get rate limits. First it was updating every 30 seconds. I stopped my bot after so many rates I couldn’t do anything, and setting the update interval to 1 minute and still rates. At 2 minutes, rates and guess I will need to delay it even further. I would debug this project, but to busy and lazy to do so. Thanks @quinchs
@LegitSoulja no problem 😕 hopefully they change that