Replies: 1 comment
-
|
Ive been looking for a way to get all the hidden DMs. I am not much of a coder.. can you help me figure out how you to implement this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The following approaches were vibe coded (though I am a SWE, so im not running blind on it). I did a bit of poking to figure these out so im sharing back to help anyone else who wants to put in their own version.
The following is an AI summary.
I am posting now since I successfully grabbed all the private convo data that was available to me based on this effort.
Kudos.
Server & Relationship Export
Commands Added
API Endpoints Used
/users/@me/guilds/users/@me/relationshipsApproach
GetJsonResponseAsyncwith rate limiting viaResponseResiliencePipelineDefaultJsonTypeInfoResolver(.NET 10 requirement)Files Added/Modified
DiscordChatExporter.Core/Discord/Data/Guild.cs- Added metadata fieldsDiscordChatExporter.Core/Discord/Data/Relationship.cs- New data modelDiscordChatExporter.Core/Discord/Data/RelationshipKind.cs- Enum (Friend, Blocked, etc.)DiscordChatExporter.Cli/Commands/ExportServersCommand.cs- New commandDiscordChatExporter.Cli/Commands/DumpFriendsCommand.cs- New commandDiscordChatExporter.Cli/Commands/DumpBlockedCommand.cs- New commandDiscordChatExporter.Core/Discord/Data/Common/ImageCdn.cs- Added CDN URL helpersHidden DM Discovery & Export
Commands Added/Enhanced
API Endpoints Used
/users/@me/channels/users/@me/channels/channels/{id}Hidden DM Detection Algorithm
/users/@me/relationships(type=1)/users/@me/channels(GET)/users/@me/channelswith{"recipient_id": "..."}→ returns channel objectlast_message_idis not null → hidden DM with message history!/channels/{id}to re-hide after accessKey Implementation Details
ResponseResiliencePipelinefor automatic retries on rate limits (code 1015, 429)ObjectDisposedExceptionchannel.idequals therecipient.user.id(used for matching friends to DMs)Code Organization
HiddenDmDiscoveryHelper: Shared discovery logic reused bydiscoverdmandexportdm*.jsonfiles matching channel ID or name patternFiles Added/Modified
DiscordChatExporter.Cli/Commands/DiscoverDmsCommand.cs- New commandDiscordChatExporter.Cli/Commands/Helpers/HiddenDmDiscoveryHelper.cs- Shared discovery utilityDiscordChatExporter.Cli/Commands/ExportDirectMessagesCommand.cs- Enhanced with discovery supportDiscordChatExporter.Core/Discord/DiscordClient.cs- Added POST/DELETE methods with rate limitingDiscord Client API Methods Added
PostResponseAsync(url, content)PostJsonResponseAsync(url, JsonElement)CreateDirectMessageChannelAsync(recipientId)DeleteDirectMessageChannelAsync(channelId)All methods use Polly resilience pipeline for automatic retry on rate limits and transient errors.
Rate Limiting Strategy
The existing
ResponseResiliencePipeline(defined inDiscordChatExporter.Core/Utils/Http.cs) handles:Retry-Afterheader from Discord responses when availableBeta Was this translation helpful? Give feedback.
All reactions