Skip to content

Settings Examples

DRN edited this page Sep 4, 2023 · 17 revisions

IF YOU ARE NOT USING .JSONC MAKE SURE YOU REMOVE ANY // COMMENTS IN THIS DOCUMENTATION.

FOR JSON DO NOT LEAVE COMMAS , AFTER THE LAST ITEM IN A SECTION, IT WILL ERROR.

FOR HELP WITH JSON FORMATTING, SEE BELOW EXAMPLES.


EXAMPLE: Bare Minimum

Minimum requirements for the bot to function. Assumes default values for everything missing.

{
    "credentials": {
        "token": "YOUR_USER_OR_BOT_TOKEN",
        "email": "YOUR_USER_EMAIL_NO_2FA",
        "password": "YOUR_USER_PASSWORD_NO_2FA"
    },

    "admins": [ "YOUR_DISCORD_USER_ID" ],
    "adminChannels": [{ "channel": "DISCORD_CHANNEL_ID_FOR_COMMANDS" }],

    "channels": [
        {
            "channel": "SOURCE_DISCORD_CHANNEL_ID",
            "destination": "files/example-folder"
        }
    ]
}

EXAMPLE: Personal Server

Intended for a genuine bot application you can just invite to your server or friends server to scrape media.

{
    "credentials": {
        "token": "YOUR_USER_OR_BOT_TOKEN",
        "email": "YOUR_USER_EMAIL_NO_2FA",
        "password": "YOUR_USER_PASSWORD_NO_2FA"
    },

    "admins": [ "YOUR_DISCORD_USER_ID" ],
    "adminChannels": [{ "channel": "DISCORD_CHANNEL_ID_FOR_COMMANDS" }],

    "save": true,
    "allowCommands": true,
    "scanEdits": true,
    "ignoreBots": false,

    "sendErrorMessages": true,

    "presenceEnabled": true,
    "presenceStatus": "idle",
    "presenceType": 0,
    "presenceLabel": "{{timeSavedShort}} - {{countShort}} files",
    "presenceDetails": "{{timeSavedLong}}",
    "presenceDetails": "{{count}} files total",

    "reactWhenDownloaded": true,
    "reactWhenDownloadedHistory": true,
    "historyTyping": true,

    "channels": [
        {
            "channel": "SOURCE_DISCORD_CHANNEL_ID",
            "destination": "files/example-folder"
        }
    ]
}

EXAMPLE: Public Servers

Intended for a user account (selfbot) you can stealthily use to scrape public servers without anyone knowing.

{
    "credentials": {
        "token": "YOUR_USER_OR_BOT_TOKEN",
        "email": "YOUR_USER_EMAIL_NO_2FA",
        "password": "YOUR_USER_PASSWORD_NO_2FA"
    },

    "admins": [ "YOUR_DISCORD_USER_ID" ],
    "adminChannels": [{ "channel": "DISCORD_CHANNEL_ID_FOR_COMMANDS" }],

    "save": true,
    "allowCommands": false, // they'll probably kick you otherwise.
    "scanEdits": true,
    "ignoreBots": false,

    "sendErrorMessages": false, // they'll probably kick you otherwise.

    "presenceEnabled": false, // they'll probably kick you otherwise.
    "presenceStatus": "invisible", // or "dnd" or "idle"
    
    "reactWhenDownloaded": false, // they'll probably kick you otherwise.
    "reactWhenDownloadedHistory": false, // they'll probably kick you otherwise.
    "historyTyping": false, // they'll probably kick you otherwise.

    "channels": [
        {
            "channel": "SOURCE_DISCORD_CHANNEL_ID",
            "destination": "files/example-folder"
        }
    ]
}

EXAMPLE: Binding to Categories, Servers, Users

Having the bot listen to categories, servers, or users instead of (or alongside) channels.

{
    "credentials": {
        "token": "YOUR_USER_OR_BOT_TOKEN",
        "email": "YOUR_USER_EMAIL_NO_2FA",
        "password": "YOUR_USER_PASSWORD_NO_2FA"
    },

    "admins": [ "YOUR_DISCORD_USER_ID" ],
    "adminChannels": [{ "channel": "DISCORD_CHANNEL_ID_FOR_COMMANDS" }],

    "categories": [
        {
            "category": "SOURCE_DISCORD_CATEGORY_ID",
            "destination": "files/example-folder"
        }
    ],
    "servers": [
        {
            "server": "SOURCE_DISCORD_SERVER_ID",
            "destination": "files/example-folder-2"
        }
    ],
    "users": [
        {
            "user": "SOURCE_DISCORD_USER_ID",
            "destination": "files/example-folder-3"
        }
    ]
}

EXAMPLE: Multi-Channel, Multi-Category, Multi-Server, Multi-User

Assigning one configuration to multiple channels, categories, servers, and/or users.

{
    "credentials": {
        "token": "YOUR_USER_OR_BOT_TOKEN",
        "email": "YOUR_USER_EMAIL_NO_2FA",
        "password": "YOUR_USER_PASSWORD_NO_2FA"
    },

    "admins": [ "YOUR_DISCORD_USER_ID" ],
    "adminChannels": [{ "channel": "DISCORD_CHANNEL_ID_FOR_COMMANDS" }],

    "channels": [
        {
            // Simply swap "channel" for "channels" and use an array of strings instead of one single string.
            "channels": [ "SOURCE_DISCORD_CHAN_ID_1", "SOURCE_DISCORD_CHAN_ID_2", "SOURCE_DISCORD_CHAN_ID_3" ],
            "destination": "files/example-folder"
        }
    ],

    "categories": [
        {
            // Simply swap "category" for "categories" and use an array of strings instead of one single string.
            "categories": [ "SOURCE_DISCORD_CAT_ID_1", "SOURCE_DISCORD_CAT_ID_2", "SOURCE_DISCORD_CAT_ID_3" ],
            "destination": "files/example-folder"
        }
    ],

    "servers": [
        {
            // Simply swap "server" for "servers" and use an array of strings instead of one single string.
            "servers": [ "SOURCE_DISCORD_SERV_ID_1", "SOURCE_DISCORD_SERV_ID_2", "SOURCE_DISCORD_SERV_ID_3" ],
            "destination": "files/example-folder"
        }
    ],

    "users": [
        {
            // Simply swap "user" for "users" and use an array of strings instead of one single string.
            "users": [ "SOURCE_DISCORD_USER_ID_1", "SOURCE_DISCORD_USER_ID_2", "SOURCE_DISCORD_USER_ID_3" ],
            "destination": "files/example-folder"
        }
    ]
}

EXAMPLE: YAML

credentials:
    token: REPLACE_WITH_YOUR_TOKEN_OR_DELETE_LINE
    email: REPLACE_WITH_YOUR_EMAIL_OR_DELETE_LINE
    password: REPLACE_WITH_YOUR_PASSWORD_OR_DELETE_LINE
admins:
    - "YOUR_DISCORD_USER_ID"
adminChannels:
    - channel: "DISCORD_ID_FOR_CHANNEL_FOR_COMMANDS"
      logProgram: false
      logStatus: true
      logErrors: true
      unlockCommands: false
logOutput: log.txt
logIndent: true
processLimit: 32
debug: true
backupDatabaseOnStart: false
watchSettings: false
settingsOutput: true
messageOutput: true
messageOutputHistory: false
discordLogLevel: 0
discordTimeout: 180
downloadTimeout: 60
downloadRetryMax: 2
exitOnBadConnection: false
githubUpdateChecking: true
commandPrefix: 'ddg '
commandTagging: true
scanOwnMessages: false
allowGeneralCommands: true
historyManagerRate: 5
checkupRate: 30
connectionCheckRate: 5
presenceRefreshRate: 3
save: true
allowCommands: true
scanEdits: true
ignoreBots: true
sendErrorMessages: false
filenameDateFormat: 2006-01-02_15-04-05
filenameFormat: '{{date}} {{file}}'
reactWhenDownloaded: false
reactWhenDownloadedHistory: false
historyMaxJobs: 3
sendHistoryStatus: true
divideByYear: false
divideByMonth: false
divideByDay: false
divideByHour: false
divideByServer: false
divideByChannel: false
divideByUser: false
divideByType: true
divideFoldersUseID: false
saveImages: true
saveVideos: true
saveAudioFiles: true
saveTextFiles: false
saveOtherFiles: false
savePossibleDuplicates: false
filters:
    blockedExtensions:
        - .htm
        - .html
        - .php
        - .exe
        - .dll
        - .bin
        - .cmd
        - .sh
        - .py
        - .jar
channels:
    - channel: "TEST_CHANNEL_ID"
      destination: ddg-test
Clone this wiki locally