Skip to content
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

[discord] add support #6836

Merged
merged 20 commits into from
Feb 18, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
removed unnecessary dict unpacking
zWolfrost committed Jan 24, 2025
commit 2575b66f253b72cd411502f444abce4bbe51e4a9
14 changes: 6 additions & 8 deletions gallery_dl/extractor/discord.py
Original file line number Diff line number Diff line change
@@ -146,23 +146,21 @@ def parse_channel(self, channel_id):
parent_channel_metadata = (
self.all_channels_metadata[channel_metadata["parent_id"]]
)
channel_metadata = {
**channel_metadata,
channel_metadata.update({
"parent": parent_channel_metadata["channel"],
"parent_type": parent_channel_metadata["channel_type"]
}
})

if channel_metadata["channel_type"] in (1, 3):
channel_metadata = {
**channel_metadata,
channel_metadata.update({
"channel": "DMs",
"recipients": (
[user["username"] for user in channel["recipients"]]
),
"recipients_id": (
[user["id"] for user in channel["recipients"]]
),
"channel": "DMs"
}
)
})

self.all_channels_metadata[channel_id] = {
**self.server_metadata,