Skip to content

A Discord bot program to download and otherwise handle files sent in Discord channels with extensive configuration. Can be used as a genuine Discord Bot or user account / self-bot

License

Notifications You must be signed in to change notification settings

get-got/discord-downloader-go

Repository files navigation

Discord Downloader Go

Maintained since late 2020



Join the Discord


This project is a cross-platform cli executable program to interact with a Discord Bot (genuine bot application or user account, limitations apply to both respectively) to locally download files posted from Discord in real-time as well as a full archive of old messages. It can download any directly sent Discord attachments or linked files and supports fetching highest possible quality files from specific sources (see list below).

It also supports very extensive settings configurations and customization, applicable globally or per-server/category/channel/user. Tailor the bot to your exact needs and runtime environment.

The original project was abandoned, for a list of differences and why I made an independent project, see below


Wiki - Settings

Operating System Architectures ( ? = available but untested )
Windows amd64, arm64 (?), armv7/6/5 (?), 386 (?)
Linux amd64, arm64, armv7/6/5,
risc-v64 (?), mips64/64le (?), s390x (?), 386 (?)
Darwin (Mac) amd64, arm64 (?)
FreeBSD amd64 (?), arm64 (?), armv7/6/5 (?), 386 (?)
OpenBSD amd64 (?), arm64 (?), armv7/6/5 (?), 386 (?)
NetBSD amd64 (?), arm64 (?), armv7/6/5 (?), 386 (?)

⚠️ WARNING! Discord does not allow Automated User Accounts (Self-Bots/User-Bots)

Read more in Discord Trust & Safety Team's Official Statement...

While this project works for user logins, I do not recommend it as you risk account termination. If you can, use a proper Discord Bot user for this program.

NOTE: This only applies to real User Accounts, not Bot users. This program currently works for either.


🤖 Features

Supported Download Sources

  • Direct Links to Files
  • Discord File Attachments
  • Twitter / X (unofficial scraping, requires account login, see config section)
  • Instagram (unofficial scraping, requires account login, see config section)
  • Imgur
  • Streamable
  • Gfycat
  • Tistory
  • Flickr (requires API key, see config section)
  • I'll always welcome requests but some sources can be tricky to parse...

Differences from Seklfreak's discord-image-downloader-go & Why I made this

  • Better command formatting & support
  • Configuration is JSON-based rather than ini to allow more elaborate settings and better organization. With this came many features such as channel-specific settings.
  • Channel-specific control of downloaded filetypes / content types (considers things like .mov as videos as well, rather than ignore them), Optional dividing of content types into separate folders.
  • (Optional) Reactions upon download success.
  • (Optional) Discord messages upon encountered errors.
  • Extensive bot status/presence customization.
  • Consistent Log Formatting, Color-Coded Logging
  • Somewhat different organization than original project; initially created from scratch then components ported over.
  • Various fixes, improvements, and dependency updates that I also contributed to Seklfreak's original project.

I've been a user of Seklfreak's project since ~2018 and it's been great for my uses, but there were certain aspects I wanted to expand upon, one of those being customization of channel configuration, and other features like message reactions upon success, differently formatted statuses, etc. If some aspects are rudimentary or messy, please make a pull request, as this is my first project using Go and I've learned everything from observation & Stack Overflow.


❔ FAQ


  • Q: How do I convert from Seklfreak's discord-image-downloader-go?
  • A: Place your config.ini from that program in the same directory as this program and delete any settings.json file if present. The program will import your settings from the old project and make a new settings.json. It will still re-download files that DIDG already downloaded, as the database layout is different and the old database is not imported.

⚙️ Development