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
MIT License
Bot releases are visible (Hide)
Published by get-got about 3 years ago
adminChannels
to not listen for commands properly"adminChannels"
:
"unlockCommands" (bool)
- Unrestrict admin commands so anyone can use within this admin channel, false
by default.
"filters"
settings group for channels
/servers
/all
:
"blockedPhrases" (list of strings)
- List of phrases to make the bot ignore this message. Will ignore any message containing a blocked phrase UNLESS it also has an allowed phrase. Messages will be processed by default.
"allowedPhrases" (list of strings)
- List of phrases to allow the bot to process the message.
"blockedUsers" (list of strings)
- Will ignore messages from the following users.
"allowedUsers" (list of strings)
- Will ONLY process messages if they were sent from the following users.
"blockedRoles" (list of strings)
- Will ignore messages from users with any of the following roles.
"allowedRoles" (list of strings)
- Will ONLY process messages if they were sent from users with any of the following roles.
"blockedExtensions" (list of strings)
- List of file extensions for the bot to ignore (include periods).
"allowedExtensions" (list of strings)
- Will ONLY process files if they have the following extensions (include periods).
"blockedDomains" (list of strings)
- List of file source domains (websites) for the bot to ignore.
"allowedDomains" (list of strings)
- Will ONLY process files if they were sent from any of the following domains (websites).
"logLinks"
& "logMessages"
settings groups for channels
/servers
/all
:
"destination" (string)
- Filepath for single log file to be stored, or directory path for multiple logs to be stored.
"destinationIsFolder" (bool)
- true
if "destination"
above is for a directory for multiple logs, false
by default.
"divideLogsByServer" (bool)
- ONLY USED IF "destinationIsFolder"
ABOVE IS true
; Separates log files by Server ID, true
by default.
"divideLogsByChannel" (bool)
- ONLY USED IF "destinationIsFolder"
ABOVE IS true
; Separates log files by Channel ID, true
by default.
"divideLogsByUser" (bool)
- ONLY USED IF "destinationIsFolder"
ABOVE IS true
; Separates log files by User ID, false
by default.
"filterDuplicates" (bool)
- Filters out duplicate links (or messages) from being logged if already present in log file.
"prefix" (string)
- Prepend log line with string.
"suffix" (string)
- Append log line with string.
"userData" (bool)
- Include additional data such as SERVER/CHANNEL/USER ID's for logged files/messages. false
by default.
channels
/servers
/all
"extensionBlacklist" (list of strings)
, replaced with "filters"."blockedExtensions"
"domainBlacklist" (list of strings)
, replaced with "filters"."blockedDomains"
"usersAllWhitelisted" (bool)
, unnecessary"userWhitelist" (list of strings)
, replaced with "filters"."allowedUsers"
"userBlacklist" (list of strings)
, replaced with "filters"."blockedUsers"
"saveAllLinksToFile" (bool)
, replaced with "logLinks"
"logStatus"
and "logErrors"
to adminChannels
settings: Bot will send status messages to admin channel(s) upon launch or reconnection and error messages for download failures. Both are optional and true
by default.autorunHistory
issues that made it not account for channels within registered servers and caused crashes"discordLogLevel"
to main settings, for discordgo (0 = Errors, 1 = Warnings, 2 = Info, 3 = Debug)
{{numGuilds}}
renamed to {{numServers}}
, {{numChannels}}
renamed to {{numBoundChannels}}
, {{numBoundServers}}
added"servers"
configurations for downloading based upon server ID(s). Follows same layout as "channels"
section, except uses "server"
instead of "channel"
and "servers"
instead of "channels"
"allChannels"
to "all"
"allBlacklistServers"
"allChannelsBlacklist"
to "allBlacklistChannels"
"[twitter] access token secret"
from discord-image-downloader-go's config.iniddg history
command... Argument/Flag order no longer matters; Adds --since=
and --before=
flags (see README in History section) to limit range by YYYY-MM-DD date or Message ID; Adds stop
as alternative to cancel
ddg info
command for outputting Discord ID'sasyncHistory
(bool, false by default) to run history cataloging asynchronously (simultaneously)checkPermissions
(bool, true by default) setting to disable permission checks if encountering issuessavePossibleDuplicates
to allow duplicate URL downloading.typeWhileProcessing
false by default due to some rare crashing issueall
modifier to history command to process history for all registered channels via single command. (Use as ddg history all
in admin channel).
emojis
command for saving all of a servers emojis. Use as ddg emojis
within registered or admin channels to download from that server, or use as ddg emojis SERVER_ID
/ ddg emojis SERVER_ID_1, SERVER_ID_2, SERVER_ID_3
in an admin channel to download emojis from a different server.ignoreBots
(bool) setting to main settings area to allow bot to ignore messages from other bots. Default is false
.saveAllLinksToFile
not applying to history processingallChannels
setting allows you to let the bot listen to any and every channel it has access to, following the settings in allChannels
(it's the same as channels
settings, just without Channel ID(s)). allChannelsBlacklist
is an optional array of strings that allows you to block specific channels from this (using Channel ID(s)).typeWhileProcessing
(bool)config.ini
from Sekl's project is present it will import into this projects JSON settings.\
with \\
)
autorunHistory
(global) and overwriteAutorunHistory
(channels) for running history cataloging upon program launch/login.numberFormatEuropean
option (bool) for formatting numbers as 123.456,78
rather than 123,456.78
userBot
to the config credentials
section, set to true if using a user bot with 2FA for token login to work properlyscanOwnMessages
so it actually works when cataloging message history.mov
were unintentionally ignoredpresenceStatus
can be set while presenceEnabled
is false
, to just set status (online,idle,invisible) with no additional detailsdivideFoldersByServer
, nests downloads within a subfolder of destination based upon server name of origin.divideFoldersByChannel
, nests downloads within a subfolder of destination based upon channel name of origin.divideFoldersByUser
, nests downloads within a subfolder of destination based upon user who sent content.filterDuplicates
to the main configuration and set it to true
. This will attempt to match images up to each other to prevent duplicates from being saved (even if they've been deepfried or have different filenames). You can adjust the similarity threshold via filterDuplicatesThreshold
(float64; a number with a decimal, see README for info).channels
instead of channel
within each channel configuration to make that configuration apply to an unlimited amount of channels simultaneously, without needing to copy/paste the same thing over and over again.userBlacklist
for channels to block specific users from having their messages checked for files.userWhitelist
and usersAllWhitelisted
for channels to only allow files to be downloaded from specific users.domainBlacklist
for channels to block files from specified domains from being downloaded.saveAllLinksToFile
for channels. Will save all raw links to specified text file, no filtering or parsing whatsoever.Send Messages
permission for channel.blacklistedExtensions
to extensionBlacklist
. If you have a definition for this in your settings you will need to change it.
filenameDateFormat
, rather than having it hard-coded into the filename creation (so you can use an underscore or whatever instead).