Have Context.Guild.GetBanAsync not throw an Discord.Net.HttpException when user is not banned
See original GitHub issueWhat I must do right now
Discord.Rest.RestBan guildUsers = null;
try {
guildUsers = await Context.Guild.GetBanAsync(banMember);
} catch { }
if(guildUsers != null) // Do some code shenangans
What I think should be done
Discord.Rest.RestBan guildUsers = await Context.Guild.GetBanAsync(banMember);
if(guildUsers != null) // Do some code shenangans
Is there a reason why this hasn’t been done?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
discord.net ban having a value of null
1 Answer 1 ... Guild.GetBansAsync() returns a list of user who are banned on this server, not the list of users that the...
Read more >Changelog
#2711 Fixed modifying guild resets preferred locale (12c50f2) · #2713 Fixed some ReplyAsync methods missing MessageFlags parameter. · #2714 Fixed disconnecting ...
Read more >Class SocketGuild
This property retrieves all users found within this guild. warning. This property may not always return all the members for large guilds (i.e....
Read more >Discord.Net.HttpException: - Developer Community
i did code a bot for discord and i get error 401 idk what to do i watched giude how to fix this...
Read more >Opcodes and Status Codes - Developer Portal
This table explains what the application defined close codes for the gateway are, and which close codes you should not attempt to reconnect....
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
Well the issue hasn’t been fixed yet, so I would leave it open for posterity.
I had no idea the
when
keyword was a thing, interesting! I already have a fix made, but I’m glad you offered one to everyone else who might’ve been having the same issue. Should I keep this issue open to raise awareness, or should I close it?