-
-
Notifications
You must be signed in to change notification settings - Fork 655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stuck at messages containing invite links #1103
Comments
Under further testing, it also gets stuck for me on valid invites |
I do get further today. So maybe it is stricter rate limiting on invite link resolving api? I'm still stuck on exporting channel history with many invites (they are all the same invite link). Also I get this exception on master:
|
I see two possible solutions:
|
So it seems real steps to reproduce include exporting the full invite range
|
It does pull invite metadata for each |
The problem is that after getting rate limited once, I can't resolve any discord.gg links anymore. As soon as I get to any message containing such a link the export stops making progress for ever. Even when switching accounts. So probably the IP gets rate limited. |
I solved it for me by removing the code resolving the discord invite link for exporting the days with the spam. Unfortunately that is not a general solution.
Diff to 48eece5
diff --git a/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml b/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml
index 44d8b75..c9491de 100644
--- a/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml
+++ b/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml
@@ -310,49 +310,6 @@
</div>
}
- @{/* Invites */}
- @{
- var inviteCodes = MarkdownParser
- .ExtractLinks(message.Content)
- .Select(l => l.Url)
- .Select(Invite.TryGetCodeFromUrl)
- .WhereNotNull()
- .ToArray();
-
- foreach (var inviteCode in inviteCodes)
- {
- var invite = await Context.Discord.TryGetGuildInviteAsync(inviteCode, CancellationToken);
- if (invite is null)
- {
- continue;
- }
-
- <div class="chatlog__embed">
- <div class="chatlog__embed-invite-container">
- <div class="chatlog__embed-invite-title">@(invite.Channel?.Kind.IsDirect() == true ? "Invite to join a group DM" : "Invite to join a server")</div>
- <div class="chatlog__embed-invite">
- <div class="chatlog__embed-invite-guild-icon-container">
- <img class="chatlog__embed-invite-guild-icon" src="@await ResolveAssetUrlAsync(invite.Channel?.IconUrl ?? invite.Guild.IconUrl)" alt="Guild icon" loading="lazy">
- </div>
- <div class="chatlog__embed-invite-info">
- <div class="chatlog__embed-invite-guild-name">
- <a href="https://discord.gg/@invite.Code">
- @(invite.Guild.Name)
- </a>
- </div>
- <div class="chatlog__embed-invite-channel-name">
- <svg class="chatlog__embed-invite-channel-icon">
- <use href="#channel-icon"></use>
- </svg>
- <span> @(invite.Channel?.Name ?? "Unknown Channel")</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- }
- }
-
@{/* Embeds */}
@foreach (var embed in message.Embeds)
{
|
You can now skip invite links by adding the |
Version
v2.40.0
Flavor
CLI (Command-Line Interface)
Export format
HTML
Details
Exported a channel. Was stuck for >5 hours. When looking at what messages were currently exported, it were spam messages containing a link to an invalid channel invite. (and saw it happen to other links to invalid invites as well, e.g. https://discord.gg/wJuFkEkME9)
Steps to reproduce
The text was updated successfully, but these errors were encountered: