/DataHoarder

Mirror bot for Discord.

Primary LanguageJavaScript

Data Hoarder

A bot for hoarding any data from Discord.

Deploy to Heroku Run on Repl.it

Commands

  • /mirror <url> [destpath] - download any URL to a remote destination.
  • /download <url> [destpath] - mirror a direct link.
  • /fshare <url> [destpath] - mirror a file on Fshare.vn.
  • /ytdl <url> - mirror a YouTube video.
  • /list <query> - search for files matching the query.

Getting Started

  • Install Node.js v14+ (for discord.js@13 that uses optional chaining)
  • Set up a bot on Discord.
  • Add the bot to your server.
  • Clone the repo.
  • Create a .env file with the following variables:
    • For Discord and the bot:
      • DISCORD_TOKEN: The token of the bot retrieved from Discord.
      • COMMAND_PREFIX: (optional) custom prefix for the commands. Default to /.
      • COMMAND_SUFFIX: (optional) custom suffix for the commands. Default to empty string.
      • COMMAND_MIRROR_ALIASES: (optional) Space-separated list of aliases for mirror command.
      • MAX_JOBS: (optional) maximum number of jobs to run in parallel. Default to 4.
    • For Rclone:
      • RCLONE_DRIVE_CLIENT_ID: (optional) Google's client ID for rclone.
      • RCLONE_DRIVE_CLIENT_SECRET: (optional) Google's client secret for rclone.
      • RCLONE_CONFIG_TARGET_TEAM_DRIVE: The ID of the shared drive to upload file to.
      • RCLONE_CONFIG_TARGET_ROOT_FOLDER_ID: (optional) The ID of the folder to upload file to.
      • RCLONE_CONFIG_TARGET_TOKEN: (optional) access token to the target folder.
      • RCLONE_CONFIG_TARGET_SERVICE_ACCOUNT_FILE: (optional) path to service account file with access to the target folder.
    • For FShare:
      • FSHARE_USER_EMAIL: VIP email to login.
      • FSHARE_PASSWORD: VIP password to login.
    • For Usenet:
      • USENET_POST_HOST: Hostname of the news-server to post to.
      • USENET_POST_PORT: Port of the news-server to post to.
      • USENET_POST_USER
      • USENET_POST_PASSWORD
      • USENET_POST_FROM: The name and email of the poster. Default to "{Discord display name} <{Discord discriminator}@{Guild's name}>"
      • USENET_POST_GROUPS: Comma-separated group names to post to. Default to "alt.binaries.test".
  • Inside the project, npm install to install dependencies.
  • npm start to start the bot.

DataHoarder should appear on your Discord's roster.