Skip to content

Instantly share code, notes, and snippets.

@Aareon
Last active September 17, 2017 13:48
Show Gist options
  • Select an option

  • Save Aareon/0684e2dcee74e2a579873a9eeed3e748 to your computer and use it in GitHub Desktop.

Select an option

Save Aareon/0684e2dcee74e2a579873a9eeed3e748 to your computer and use it in GitHub Desktop.

CONFIG General Config Manual

Synopsis

The config is used to pre-define values that DOT will utilize after execution. You may define these values from within the config file, via command-line arguments, or via cog. It is recommended to define values from within the config file, and in-fact, it is enforced for many options without modifying the source to bypass this restriction.

Example Config

{
    "bot": {
        "token": "Your Token Here",
        "prefix": ".o",
        "activity": 0
    },
    "logging": {
        "logging": true,
        "all_servers": false,
        "server_whitelist": [""],
        "server_blacklist": [""],
        "channel_blacklist": [""],
        "sqlite3": true,
        "format": "%d %u %s %mi %m %sn %sid %cn %cid",
        "location": "./logs
    }
}

Bot Dictionary

    token - A string in which the bot is to use to connect to the service. This can be retrieved via the
            developer tools from within the Discord application.
            
    prefix - The prefix that a user will use within a message to trigger the bot and a command.
    
    activity - Sets the activity of the connected user to a specific activity level.
            0: Online
            1: Idle
            2: Do Not Disturb
            3: Invisible

Logging Dictionary

    all_servers - Log all servers; true or false.
    
    server_whitelist - Ignored if "all_servers" is true. List of servers to log.
    
    server_blacklist - List of servers to not log
    
    channel_blacklist - List of channels to not log
    
    sqlite3 - Default method of logging. If false, logging output will be made in raw text in the format provided in "format"
    
    format - Used to define order of rows within the sqlite3 database, or the format of text if "sqlite3" is false
            %datetime: A datetime string of the time a message was received
                    Aliases: %d, %dt
                    
            %username: The message sender's username
                    Aliases: %u, %un, %user, %name
                    
            %snowflake: The message sender's unique ID
                    Aliases: %s, %sf
                    
            %messageid: The unique ID of a message
                    Aliases: %mi, %mid
                    
            %message: The content of a message
                    Aliases: %m, %msg
                    
            %servername: The name of the server in which a message was received
                    Aliases: %sn, %server
                    
            %serverid: The unique ID of the server in which a message was received
                    Aliases: %sid, %servid
                    
            %channelname: The name of the channel in which a message was received
                    Aliases: %channel, %cn, %c
                    
            %channelid: The unique ID of the channel in which a message was received
                    Aliases: $cid, %chanid
    
    location - The location (relative or absolute) to store log files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment