Coder Social home page Coder Social logo

bd202009 / discord-attachment-downloader Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 69 KB

Download attachments from a specified Discord chat or channel.

License: MIT License

Python 94.09% Batchfile 5.91%
attachment-extractor beta-release discord-bot python-script

discord-attachment-downloader's Introduction

Discord Attachment Downloader v1.0.0

About

Download attachments from a specified Discord chat or channel. Files will be saved in the format (yyyyMMdd_HHmmss_originalFileName). Additionally, pertinent information such as the message text and sender will be stored in a corresponding txt file.

Setup

On a Windows Computer

Install Dependencies

(1. Install Visual Studio Community 2022 or a later version. 2. Install the Python development workload, including the optional Python native development tools, in Visual Studio Community.) not necessary? To be tested.

  1. Install Python 3.12 or a later version.

No longer needed, as dependencies will be automatically installed.

  • Install the 'discord.py' library using:
pip install discord.py

Setup a Discord Bot

  1. Open https://discord.com/developers/.
  2. Navigate to 'Applications' on the left-hand menu and click 'New Application' to add a new application.
  3. Name your application (e.g., 'attachment_downloader') and click 'Create.'
  4. Choose 'Bot' from the left-hand menu.
  5. Click 'Add Bot' and confirm adding a bot to your application by clicking 'Yes, do it!'. Your bot is created now.
  6. Click 'Copy' next to the bot icon to copy/note down the bot token. If the 'Copy' button is not visible, click 'Regenerate' first to generate a new bot token. Do not share the Token!

To use the bot for channels within your server:

  1. Navigate to 'OAuth2' and 'URL Generator' via the left-hand menu to generate a permission link.
  2. On the following screen, select 'bot' under 'SCOPES' and choose 'Administrator' under 'BOT PERMISSIONS.'
  3. Copy and open the 'GENERATED URL' in a new browser window.
  4. Choose the server to which the bot should be linked from the drop-down list 'ADD TO SERVER' and click 'Continue.'
  5. Click 'Authorize' to confirm the bot's permissions.

Run the script

  1. Clone or download this repository and place it in any folder of your choice on your computer.
  2. Run the script by opening either the 'start.py' or 'start.bat' file.
  3. During the first run, input your Bot Token; it will be permanently stored in the configuration file.
  4. Enter the Discord Server Channel ID from which you want to download attachments. You can confirm or change the Channel ID in each script run.
  5. Specify the start and end dates for the attachments. Press 'Enter' to receive all files without date filtering.
  6. The script will proceed to download all attachments. If an attachment already exists in the output folder, it will be automatically overwritten.
  7. In the output folder, you will find the attachments and corresponding txt-files with the creator's name and message text.

License

This project is licensed under the [MIT License] - see the LICENSE file for details.

End

discord-attachment-downloader's People

Contributors

bd202009 avatar

Watchers

 avatar

discord-attachment-downloader's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.