zaanposni / discord-masz

MASZ is a selfhostable highly sophisticated moderation bot for Discord. Includes a web dashboard and a discord bot.
https://discord.gg/5zjpzw6h3S
Other
71 stars 17 forks source link

invite tracking bugged #499

Closed zaanposni closed 2 years ago

zaanposni commented 2 years ago
[2022-02-11 10:53:50] [E] DNet.Client[0]: A UserJoined handler has thrown an unhandled exception.
Value cannot be null. (Parameter 'inviteId')
   at Discord.API.DiscordRestApiClient.GetInviteAsync(String inviteId, RequestOptions options)
   at Discord.Rest.GuildHelper.GetVanityInviteAsync(IGuild guild, BaseDiscordClient client, RequestOptions options)
   at Discord.WebSocket.SocketGuild.Discord.IGuild.GetVanityInviteAsync(RequestOptions options)
   at MASZ.Services.DiscordBot.FetchInvites(IGuild guild) in /app/MASZ/Services/DiscordBot.cs:line 375
   at MASZ.Services.DiscordBot.GuildMemberAddedHandler(SocketGuildUser member) in /app/MASZ/Services/DiscordBot.cs:line 434
   at Discord.EventExtensions.InvokeAsync[T](AsyncEvent`1 eventHandler, T arg)
   at Discord.WebSocket.DiscordSocketClient.TimeoutWrap(String name, Func`1 action)

most likely a new dnet version should be used, seems like discords model changed

zaanposni commented 2 years ago

fixed in v2.7.0 branch