Skip to content

Andres9890/ia-Uploading-Discord-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

107 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IA Uploading Discord Bot

License Button Discord Button

IA Uploading is a Discord bot that allows users to upload files directly to Archive.org (using the internetarchive python library) via a slash command in Discord, It handles file attachments, generates unique identifiers for uploads, and also creates metadata for each uploaded file with support for custom metadata fields


Features

  • Uploads files to Archive.org with a /upload command
  • Supports 10 file attachments in a single command
  • Supports adding your own metadata to uploads
  • Automatically makes metadata for each upload, including:
    • A unique identifier
    • Descriptions based on the uploader's username and file names
    • User custom metadata fields
  • Cleans up uploaded files after uploads

What to install

Installing Git

Windows:

  1. Download the Git installer from git-scm.com
  2. Run the installer and follow the prompts
  • Note: make sure to install it in PATH

macOS:

  1. Install using Homebrew:
    brew install git
    

Linux (Ubuntu/Debian):

sudo apt update
sudo apt install git

Installing Python

Windows:

  1. Download the latest Python installer from python.org
  2. Run the installer
  • Note: make sure to install it in PATH

macOS:

  1. Install using Homebrew:
    brew install python
    

Linux (Ubuntu/Debian):

sudo apt update
sudo apt install python3 python3-pip

How to Set Up the Bot

  1. Clone this repo:
    git clone https://github.com/Andres9890/ia-Uploading-Discord-Bot.git
    cd ia-Uploading-Discord-Bot
    
  2. Install the required packages (pip install -r requirements.txt)
  3. Configure your IA account:
    • Run ia configure in your terminal
    • It will prompt you to enter your Archive.org email and password
  4. Set up your Discord bot token:
    • Create a .env file in the same directory as the bot.py file
    • Add your Discord bot token to the file like this:
      DISCORD_BOT_TOKEN=discord token here
      
    • Make sure to keep your .env file private and don't share it
  5. Run the bot with python bot.py

Requirements

Make sure you have the following installed before running the bot:

  • An IA account
  • Python 3.8 and up
  • Required python packages (requirements.txt)

Usage

  • /upload <file(s)> - Upload up to 10 files to IA
  • /ping - Test the bot's response time

Custom Metadata

You can add custom metadata to your uploads using the custom_metadata parameter in the /upload command, Metadata should be provided in meta=data format, with multiple fields separated by commas

Format:

meta=data,meta2=data2,meta3=data3

Example:

/upload file:myfile.pdf custom_metadata:creator=Someone,subject=Images,collection=somecollection

License

This project is licensed under the MIT License, see the LICENSE file for more details

About

A discord bot that uploads files from discord to the internet archive

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages