discord-downloader-go

command module
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2021 License: MIT Imports: 42 Imported by: 0

README

Discord Downloader Go



Join the Discord

DOWNLOAD LATEST RELEASE

This is a program that connects to a Discord Bot or User to locally download files posted in Discord channels in real-time as well as old messages. It can download any directly linked files or Discord attachments, as well as the highest possible quality files from specific sources (see list below). It also supports extensive channel-specific configuration and customization. See Features below for full list!

This project is a fork of Seklfreak's discord-image-downloader-go

For list of differences and why I made an independent project, see below

Sections

Need help? Have suggestions? Join the Discord server!

Features

Supported Download Sources

  • Discord File Attachments
  • Direct Links to Files
  • Twitter (requires API key, see config section)
  • Instagram
  • Reddit
  • Imgur (Single Posts & Albums)
  • Flickr (requires API key, see config section)
  • Google Drive (requires API Credentials, see config section)
  • Mastodon
  • Tistory
  • Streamable
  • Gfycat

Commands

Commands are used as ddg <command> <?arguments?> (unless you've changed the prefix)

Command Arguments? Description
help, commands No Lists all commands.
ping, test No Pings the bot.
info No Displays relevant Discord info.
status No Shows the status of the bot.
stats No Shows channel stats.
history SEE HISTORY SECTION (BOT AND SERVER ADMINS ONLY) Processes history for old messages in channel.
exit, kill, reload No (BOT ADMINS ONLY) Exits the bot (or restarts if using a keep-alive process manager).
emojis Optionally specify server IDs to download emojis from; separate by commas (BOT ADMINS ONLY) Saves all emojis for channel.

WARNING! Discord does not allow Automated User Accounts (Self-Bots/User-Bots)

Read more in Discord Trust & Safety Team's Official Statement...

While this project works for user logins, I do not reccomend it as you risk account termination. If you can, use a proper Discord Bot user for this program.

NOTE: This only applies to real User Accounts, not Bot users. This program currently works for either.

Getting Started

Confused? Try looking at the step-by-step list.

Depending on your purpose for this program, there are various ways you can run it.

You can either create a settings.json following the examples & variables listed below, or have the program create a default file (if it is missing when you run the program, it will make one, and ask you if you want to enter in basic info for the new file).

Getting Started Step-by-Step

  1. Download & put executable within it's own folder.
  2. Configure Main Settings (or run once to have settings generated). (SEE BELOW)
  3. Enter your login credentials in the "credentials" section. (SEE BELOW)
  4. Put your Discord User ID as in the "admins" array of the settings. (SEE BELOW)
  5. Put a Discord Channel ID for a private channel you have access to into the "adminChannels". (SEE BELOW)
  6. Put your desired Discord Channel IDs into the "channels" section. (SEE BELOW)
  • I know it can be confusing if you don't have experience with programming or JSON in general, but this was the ideal setup for extensive configuration like this. Just be careful with comma & quote placement and you should be fine. See examples below for help.

Bot Login Credentials...

  • If using a Bot Application, enter the token into the "token" setting. Remove the lines for "username" and "password" or leave blank (""). To create a Bot User, go to discord.com/developers/applications and create a New Application. Once created, go to Bot and create. The token can be found on the Bot page. To invite to your server(s), go to OAuth2 and check "bot", copy the url, paste into browser and follow prompts for adding to server(s).
  • If using a User Account (Self-Bot), fill out the "username" and "password" settings. Remove the line for "token" or leave blank ("").
  • If using a User Account (Self-Bot) with 2FA (Two-Factor Authentication), enter the token into the "token" setting. Remove the lines for "username" and "password" or leave blank (""). Token can be found from Developer Tools in browser under localStorage.token or in the Discord client Ctrl+Shift+I (Windows)/Cmd+Option+I (Mac) under Application → Local Storage → https://discordapp.com → "token". You must also set userBot within the credentials section of the settings.json to true.

Bot Permissions in Discord...

  • In order to perform basic downloading functions, the bot will need Read Message permissions in the server(s) of your designated channel(s).
  • In order to respond to commands, the bot will need Send Message permissions in the server(s) of your designated channel(s). If executing commands via an Admin Channel, the bot will only need Send Message permissions for that channel, and that permission will not be required for the source channel.
  • In order to process history commands, the bot will need Read Message History permissions in the server(s) of your designated channel(s).

How to Find Discord IDs...

  • Use the info command!
  • Discord Developer Mode: Enable Developer Mode in Discord settings under Appearance.
  • Finding Channel ID: Enable Discord Developer Mode (see above), right click on the channel and Copy ID.
  • Finding User ID: Enable Discord Developer Mode (see above), right click on the user and Copy ID.
  • Finding Emoji ID: Enable Discord Developer Mode (see above), right click on the emoji and Copy ID.
  • Finding DM/PM ID: Inspect Element on the DM icon for the desired user. Look for href="/channels/@me/CHANNEL_ID_HERE". Using this ID in place of a normal channel ID should work perfectly fine.

Differences from Seklfreak's discord-image-downloader-go & Why I made this

  • Better command formatting & support
  • Configuration is JSON-based rather than ini to allow more elaborate settings and better organization. With this came many features such as channel-specific settings.
  • Channel-specific control of downloaded filetypes / content types (considers things like .mov as videos as well, rather than ignore them), Optional dividing of content types into separate folders.
  • Download Support for Reddit & Mastodon.
  • (Optional) Reactions upon download success.
  • (Optional) Discord messages upon encountered errors.
  • Extensive bot status/presence customization.
  • Consistent Log Formatting, Color-Coded Logging
  • Somewhat different organization than original project; initially created from scratch then components ported over.
  • Various fixes, improvements, and dependency updates that I also contributed to Seklfreak's original project.

I've been a user of Seklfreak's project since ~2018 and it's been great for my uses, but there were certain aspects I wanted to expand upon, one of those being customization of channel configuration, and other features like message reactions upon success, differently formatted statuses, etc. If some aspects are rudimentary or messy, please make a pull request, as this is my first project using Go and I've learned everything from observation & Stack Overflow.

Guide: Downloading History (Old Messages)

This guide is to show you how to make the bot go through all old messages in a channel and catalog them as though they were being sent right now, in order to download them all.

Command Arguments

If no channel IDs are specified, it will try and use the channel ID for the channel you're using the command in.

Argument / Flag Details
channel ID(s) One or more channel IDs, separated by commas if multiple.
all Use all available registered channels.
cancel or stop Stop downloading history for specified channel(s).
--since=YYYY-MM-DD Will process messages sent after this date.
--since=message_id Will process messages sent after this message.
--before=YYYY-MM-DD Will process messages sent before this date.
--before=message_id Will process messages sent before this message.

Order of arguments does not matter.

Examples

  • ddg history
  • ddg history cancel
  • ddg history all
  • ddg history stop all
  • ddg history 000111000111000
  • ddg history 000111000111000, 000222000222000
  • ddg history 000111000111000,000222000222000,000333000333000
  • ddg history 000111000111000, 000333000333000 cancel
  • ddg history 000111000111000 --before=000555000555000
  • ddg history 000111000111000 --since=2020-01-02
  • ddg history 000111000111000 --since=2020-10-12 --before=2021-05-06
  • ddg history 000111000111000 --since=000555000555000 --before=2021-05-06

Guide: Settings / Configuration

I tried to make the configuration as user friendly as possible, though you still need to follow proper JSON syntax (watch those commas). All settings specified below labeled [DEFAULTS] will use default values if missing from the settings file, and those labeled [OPTIONAL] will not be used if missing from the settings file.

When initially launching the bot it will create a default settings file if you do not create your own settings.json manually. All JSON settings follow camelCase format.

If you have a config.ini from Seklfreak's discord-image-downloader-go, it will import settings if it's in the same folder as the program.

Settings Examples

The following example is for a Bot Application (using a token), bound to 1 channel.

This setup exempts many options so they will use default values (see below). It shows the bare minimum required settings for the bot to function.

Example - Barebones settings.json:

{
    "credentials": {
        "token": "YOUR_TOKEN"
    },
    "channels": [
        {
            "channel": "DISCORD_CHANNEL_ID_TO_DOWNLOAD_FROM",
            "destination": "FOLDER_LOCATION_TO_DOWNLOAD_TO"
        }
    ]
}

Example - Selfbot settings.json:

{
    "credentials": {
        "email": "REPLACE_WITH_YOUR_EMAIL",
        "password": "REPLACE_WITH_YOUR_PASSWORD"
    },
    "scanOwnMessages": true,
    "presenceEnabled": false,
    "channels": [
        {
            "channel": "DISCORD_CHANNEL_ID_TO_DOWNLOAD_FROM",
            "destination": "FOLDER_LOCATION_TO_DOWNLOAD_TO",
            "allowCommands": false,
            "errorMessages": false,
            "reactWhenDownloaded": false
        }
    ]
}

Example - Advanced settings.json:

{
    "credentials": {
        "token": "YOUR_TOKEN",
        "twitterAccessToken": "aaa",
        "twitterAccessTokenSecret": "bbb",
        "twitterConsumerKey": "ccc",
        "twitterConsumerSecret": "ddd"
    },
    "admins": [ "YOUR_DISCORD_USER_ID", "YOUR_FRIENDS_DISCORD_USER_ID" ],
    "adminChannels": [
        {
            "channel": "CHANNEL_ID_FOR_ADMIN_CONTROL"
        }
    ],
    "debugOutput": true,
    "commandPrefix": "downloader_",
    "allowSkipping": true,
    "allowGlobalCommands": true,
    "asyncHistory": true,
    "downloadRetryMax": 5,
    "downloadTimeout": 120,
    "githubUpdateChecking": true,
    "filterDuplicateImages": true,
    "filterDuplicateImagesThreshold": 75,
    "presenceEnabled": true,
    "presenceStatus": "dnd",
    "presenceType": 3,
    "presenceOverwrite": "{{count}} files",
    "filenameDateFormat": "2006.01.02-15.04.05 ",
    "embedColor": "#EE22CC",
    "inflateCount": 12345,
    "channels": [
        {
            "channel": "THIS_CHANNEL_ONLY_DOWNLOADS_MEDIA",
            "destination": "media",
            "overwriteAllowSkipping": false,
            "saveImages": true,
            "saveVideos": true,
            "saveAudioFiles": true,
            "saveTextFiles": false,
            "saveOtherFiles": false
        },
        {
            "channel": "THIS_CHANNEL_IS_STEALTHY",
            "destination": "stealthy",
            "allowCommands": false,
            "errorMessages": false,
            "updatePresence": false,
            "reactWhenDownloaded": false
        },
        {
            "channels": [ "CHANNEL_1", "CHANNEL_2", "CHANNEL_3", "CHANNEL_4", "CHANNEL_5" ],
            "destination": "stuff",
            "allowCommands": false,
            "errorMessages": false,
            "updatePresence": false,
            "reactWhenDownloaded": false
        }
    ]
}

Example - Pretty Much Every Setting settings.json:

{
    "credentials": {
        "token": "YOUR_TOKEN",
        "userBot": true,
        "twitterAccessToken": "aaa",
        "twitterAccessTokenSecret": "bbb",
        "twitterConsumerKey": "ccc",
        "twitterConsumerSecret": "ddd",
        "flickrApiKey": "eee",
        "googleDriveCredentialsJSON": "googleDriveCreds.json"
    },
    "admins": [ "YOUR_DISCORD_USER_ID", "YOUR_FRIENDS_DISCORD_USER_ID" ],
    "adminChannels": [
        {
            "channel": "CHANNEL_IN_MY_SERVER"
        },
        {
            "channel": "CHANNEL_IN_FRIENDS_SERVER"
        }
    ],
    "debugOutput": true,
    "commandPrefix": "d_",
    "allowSkipping": true,
    "scanOwnMessages": true,
    "checkPermissions": false,
    "allowGlobalCommands": false,
    "autorunHistory": true,
    "asyncHistory": true,
    "downloadRetryMax": 5,
    "downloadTimeout": 120,
    "githubUpdateChecking": false,
    "filterDuplicateImages": true,
    "filterDuplicateImagesThreshold": 50,
    "presenceEnabled": true,
    "presenceStatus": "idle",
    "presenceType": 3,
    "presenceOverwrite": "{{count}} things",
    "presenceOverwriteDetails": "these are my details",
    "presenceOverwriteState": "this is my state",
    "filenameDateFormat": "2006.01.02_15.04.05_",
    "embedColor": "#FF0000",
    "inflateCount": 69,
    "numberFormatEuropean": true,
    "allChannels": {
        "destination": "X:/Discord Downloads/Unregistered",
        "allowCommands": false,
        "errorMessages": false,
        "scanEdits": true,
        "ignoreBots": true,
        "overwriteAutorunHistory": false,
        "updatePresence": false,
        "reactWhenDownloaded": false,
        "typeWhileProcessing": false,
        "divideFoldersByServer": true,
        "divideFoldersByChannel": true,
        "divideFoldersByUser": false,
        "divideFoldersByType": false,
        "saveImages": true,
        "saveVideos": true,
        "saveAudioFiles": true,
        "saveTextFiles": false,
        "saveOtherFiles": true,
        "savePossibleDuplicates": true,
        "extensionBlacklist": [
            ".htm",
            ".html",
            ".php"
        ],
        "saveAllLinksToFile": "X:/Discord Downloads/Unregistered/Log.txt"
    },
    "allChannelsBlacklist": [ "CHANNEL_I_DONT_LIKE", "OTHER_CHANNEL_I_DONT_LIKE" ],
    "allChannelsServerBlacklist": [ "SERVER_I_DONT_LIKE", "OTHER_SERVER_I_DONT_LIKE" ],
    "channels": [
        {
            "channel": "THIS_CHANNEL_ONLY_DOWNLOADS_MEDIA",
            "destination": "X:/Discord Downloads/Media",
            "overwriteAllowSkipping": false,
            "saveImages": true,
            "saveVideos": true,
            "saveAudioFiles": true,
            "saveTextFiles": false,
            "saveOtherFiles": false
        },
        {
            "channel": "THIS_CHANNEL_IS_STEALTHY",
            "destination": "X:/Discord Downloads/XXX",
            "allowCommands": false,
            "errorMessages": false,
            "updatePresence": false,
            "reactWhenDownloaded": false
        },
        {
            "channels": [ "CHANNEL_1", "CHANNEL_2", "CHANNEL_3", "CHANNEL_4", "CHANNEL_5" ],
            "destination": "X:/Discord Downloads/Public Discord Memes",
            "allowCommands": false,
            "errorMessages": false,
            "updatePresence": false,
            "reactWhenDownloaded": false
        }
    ]
}

List of Settings

  • "credentials" [key/value object]
    • "token" [string]
      • Required for Bot Login or User Login with 2FA, don't include if using User Login without 2FA.
    • "email" [string]
      • Required for User Login without 2FA, don't include if using Bot Login.
    • "password" [string]
      • Required for User Login without 2FA, don't include if using Bot Login.
    • [DEFAULTS] "userBot" [bool]
      • Default: false
      • Set to true for a User Login with 2FA, keep as false if using a normal Bot.
    • [OPTIONAL] "twitterAccessToken" [string]
      • Won't use Twitter API for fetching media from tweets if credentials are missing.
    • [OPTIONAL] "twitterAccessTokenSecret" [string]
      • Won't use Twitter API for fetching media from tweets if credentials are missing.
    • [OPTIONAL] "twitterConsumerKey" [string]
      • Won't use Twitter API for fetching media from tweets if credentials are missing.
    • [OPTIONAL] "twitterConsumerSecret" [string]
      • Won't use Twitter API for fetching media from tweets if credentials are missing.
    • [OPTIONAL] "flickrApiKey" [string]
      • Won't use Flickr API for fetching media from posts/albums if credentials are missing.
    • [OPTIONAL] "googleDriveCredentialsJSON" [string]
      • Path for Google Drive API credentials JSON file.
      • Won't use Google Drive API for fetching files if credentials are missing.
  • [OPTIONAL] "admins" [array of strings]
    • Array of User ID strings for users allowed to use admin commands
  • [OPTIONAL] "adminChannels" [array of key/value objects]
    • channel [string]
  • [DEFAULTS] "debugOutput" [bool]
    • Default: false
    • Output debugging information.
  • [DEFAULTS] "commandPrefix" [string]
    • Default: "ddg "
  • [DEFAULTS] "allowSkipping" [bool]
    • Default: true
    • Allow scanning for keywords to skip content downloading.
    • "skip", "ignore", "don't save", "no save"
  • [DEFAULTS] "scanOwnMessages" [bool]
    • Default: false
    • Scans the bots own messages for content to download, only useful if using as a selfbot.
  • [DEFAULTS] "checkPermissions" [bool]
    • Default: true
    • Checks Discord permissions before attempting requests/actions.
  • [DEFAULTS] "allowGlobalCommands" [bool]
    • Default: true
    • Allow certain commands to be used even if not registered in channels or adminChannels.
  • [OPTIONAL] "autorunHistory" [bool]
    • Autorun history for all registered channels in background upon launch.
    • This can take anywhere between 2 minutes and 2 hours. It depends on how many channels your bot monitors and how many messages it has to go through. It can help to disable it by-channel for channels that don't require it (see overwriteAutorunHistory in channel options).
  • [OPTIONAL] "asyncHistory" [bool]
    • Default: false
    • Runs history commands simultaneously rather than one after the other.
      • NOTE: May result in Discord API Rate Limiting, difficulty troubleshooting, exploding CPUs, melted RAM.
  • [DEFAULTS] "downloadRetryMax" [int]
    • Default: 3
  • [DEFAULTS] "downloadTimeout" [int]
    • Default: 60
  • [DEFAULTS] "githubUpdateChecking" [bool]
    • Default: true
    • Check for updates from this repo.
  • [DEFAULTS] "filterDuplicateImages" [bool]
    • Default: false
    • Experimental feature to filter out images that are too similar to other cached images.
    • Caching of image data is stored via a database file; it will not read all pre-existing images.
  • [DEFAULTS] "filterDuplicateImagesThreshold" [float64]
    • Default: 0
    • Threshold for what the bot considers too similar of an image comparison score. Lower = more similar (lowest is around -109.7), Higher = less similar (does not really have a maximum, would require your own testing).
  • [DEFAULTS] "presenceEnabled" [bool]
    • Default: true
  • [DEFAULTS] "presenceStatus" [string]
    • Default: "idle"
    • Presence status type.
    • "online", "idle", "dnd", "invisible", "offline"
  • [DEFAULTS] "presenceType" [int]
    • Default: 0
    • Presence label type. ("Playing <activity>", "Listening to <activity>", etc)
    • Game = 0, Streaming = 1, Listening = 2, Watching = 3, Custom = 4
      • If Bot User, Streaming & Custom won't work properly.
  • [OPTIONAL] "presenceOverwrite" [string]
  • [OPTIONAL] "presenceOverwriteDetails" [string]
  • [OPTIONAL] "presenceOverwriteState" [string]
  • [DEFAULTS] "filenameDateFormat" [string]
  • [OPTIONAL] "embedColor" [string]
    • Unused by Default
    • Supports random/rand, role/user, or RGB in hex or int format (ex: #FF0000 or 16711680).
  • [OPTIONAL] "inflateCount" [int]
    • Unused by Default
    • Inflates the count of total files downloaded by the bot. I only added this for my own personal use to represent an accurate total amount of files downloaded by previous bots I used.
  • [DEFAULTS] "numberFormatEuropean" [bool]
    • Default: false
    • Formats numbers as 123.456,78/123.46k rather than 123,456.78/123,46k.
  • "all" [key/value objects]
    • Follow channels below for variables, except channel & server ID(s) are not used.
    • If a pre-existing config for the channel or server is not found, it will download from any and every channel it has access to using your specified settings.
  • "allBlacklistServers" [array of strings]
    • Unused by Default
    • Blacklists servers (by ID) from all.
  • "allBlacklistChannels" [array of strings]
    • Unused by Default
    • Blacklists channels (by ID) from all.
  • [THIS OR CHANNELS] "servers" [array of key/value objects]
    • [THIS OR BELOW] "server" [string]
      • Server ID to monitor.
    • [THIS OR ABOVE] "servers" [array of strings]
      • Server IDs to monitor, for if you want the same configuration for multiple servers.
    • ALL OTHER VARIABLES ARE SAME AS "channels" BELOW
  • [THIS OR SERVER] "channels" [array of key/value objects]
    • [THIS OR BELOW] "channel" [string]
      • Channel ID to monitor.
    • [THIS OR ABOVE] "channels" [array of strings]
      • Channel IDs to monitor, for if you want the same configuration for multiple channels.
    • "destination" [string]
      • Folder path for saving files, can be full path or local subfolder.
    • [DEFAULTS] "enabled" [bool]
      • Default: true
      • Toggles bot functionality for channel.
    • [DEFAULTS] "allowCommands" [bool]
      • Default: true
      • Allow use of commands like ping, help, etc.
    • [DEFAULTS] "errorMessages" [bool]
      • Default: true
      • Send response messages when downloads fail or other download-related errors are encountered.
    • [DEFAULTS] "scanEdits" [bool]
      • Default: true
      • Check edits for un-downloaded media.
    • [DEFAULTS] "ignoreBots" [bool]
      • Default: false
      • Ignores messages from Bot users.
    • [OPTIONAL] overwriteAutorunHistory [bool]
      • Overwrite global setting for autorunning history for all registered channels in background upon launch.
    • [DEFAULTS] "updatePresence" [bool]
      • Default: true
      • Update Discord Presence when download succeeds within this channel.
    • [DEFAULTS] "reactWhenDownloaded" [bool]
      • Default: true
      • Confirmation reaction that file(s) successfully downloaded.
    • [OPTIONAL] "reactWhenDownloadedEmoji" [string]
      • Unused by Default
      • Uses specified emoji rather than random server emojis. Simply pasting a standard emoji will work, for custom Discord emojis use "name:ID" format.
    • [DEFAULTS] "blacklistReactEmojis" [array of strings]
      • Unused by Default
      • Block specific emojis from being used for reacts. Simply pasting a standard emoji will work, for custom Discord emojis use "name:ID" format.
    • [DEFAULTS] "typeWhileProcessing" [bool]
      • Default: false
      • Shows " is typing..." while processing things that aren't processed instantly, like history cataloging.
    • [OPTIONAL] "overwriteFilenameDateFormat" [string]
    • [OPTIONAL] "overwriteAllowSkipping" [bool]
      • Unused by Default
      • Allow scanning for keywords to skip content downloading.
      • "skip", "ignore", "don't save", "no save"
    • [OPTIONAL] "overwriteEmbedColor" [string]
      • Unused by Default
      • Supports random/rand, role/user, or RGB in hex or int format (ex: #FF0000 or 16711680).
    • [DEFAULTS] "usersAllWhitelisted" [bool]
      • Default: true
      • Allow messages from all users to be handled. Set to false if you wish to use userWhitelist to only permit specific users messages to be handled.
    • [OPTIONAL] "userWhitelist" [array of strings]
      • Use with usersAllWhitelisted as false to only permit specific users to have their messages handled by the bot. Only accepts User ID's in the array.
    • [OPTIONAL] "userBlacklist" [array of strings]
      • Use with usersAllWhitelisted as the default true to block certain users messages from being handled by the bot. Only accepts User ID's in the array.
    • [DEFAULTS] "divideFoldersByServer" [bool]
      • Default: false
      • Separate files into subfolders by server of origin (e.g. "My Server", "My Friends Server")
    • [DEFAULTS] "divideFoldersByChannel" [bool]
      • Default: false
      • Separate files into subfolders by channel of origin (e.g. "my-channel", "my-other-channel")
    • [DEFAULTS] "divideFoldersByUser" [bool]
      • Default: false
      • Separate files into subfolders by user who sent (e.g. "Me#1234", "My Friend#0000")
    • [DEFAULTS] "divideFoldersByType" [bool]
      • Default: true
      • Separate files into subfolders by type (e.g. "images", "video", "audio", "text", "other")
    • [DEFAULTS] "saveImages" [bool]
      • Default: true
    • [DEFAULTS] "saveVideos" [bool]
      • Default: true
    • [DEFAULTS] "saveAudioFiles" [bool]
      • Default: false
    • [DEFAULTS] "saveTextFiles" [bool]
      • Default: false
    • [DEFAULTS] "saveOtherFiles" [bool]
      • Default: false
    • [DEFAULTS] "savePossibleDuplicates" [bool]
      • Default: false
      • Save file even if exact filename already exists or exact URL is already recorded in database.
    • [DEFAULTS] "extensionBlacklist" [array of strings]
      • Default: [ ".htm", ".html", ".php", ".exe", ".dll", ".bin", ".cmd", ".sh", ".py", ".jar" ]
      • Ignores files containing specified extensions. Ensure you use proper formatting.
    • [OPTIONAL] "domainBlacklist" [array of strings]
      • Ignores files from specified domains. Ensure you use proper formatting.
    • [OPTIONAL] "saveAllLinksToFile" [string]
      • Saves all sent links to file, does not account for any filetypes or duplicates, it just simply appends every raw link sent in the channel to the specified file.

Presence Placeholders

For presenceOverwrite, presenceOverwriteDetails, presenceOverwriteState

Key Description
{{dgVersion}} discord-go version
{{ddgVersion}} Project version
{{apiVersion}} Discord API version
{{countNoCommas}} Raw total count of downloads (without comma formatting)
{{count}} Raw total count of downloads
{{countShort}} Shortened total count of downloads
{{numGuilds}} Number of guilds bot is a member of
{{numChannels}} Number of bound channels
{{numAdminChannels}} Number of admin channels
{{numAdmins}} Number of designated admins
{{timeSavedShort}} Last save time formatted as 3:04pm
{{timeSavedShortTZ}} Last save time formatted as 3:04pm MST
{{timeSavedMid}} Last save time formatted as 3:04pm MST 1/2/2006
{{timeSavedLong}} Last save time formatted as 3:04:05pm MST - January 2, 2006
{{timeSavedShort24}} Last save time formatted as 15:04
{{timeSavedShortTZ24}} Last save time formatted as 15:04 MST
{{timeSavedMid24}} Last save time formatted as 15:04 MST 2/1/2006
{{timeSavedLong24}} Last save time formatted as 15:04:05 MST - 2 January, 2006
{{timeNowShort}} Current time formatted as 3:04pm
{{timeNowShortTZ}} Current time formatted as 3:04pm MST
{{timeNowMid}} Current time formatted as 3:04pm MST 1/2/2006
{{timeNowLong}} Current time formatted as 3:04:05pm MST - January 2, 2006
{{timeNowShort24}} Current time formatted as 15:04
{{timeNowShortTZ24}} Current time formatted as 15:04 MST
{{timeNowMid24}} Current time formatted as 15:04 MST 2/1/2006
{{timeNowLong24}} Current time formatted as 15:04:05 MST - 2 January, 2006
{{uptime}} Shortened duration of bot uptime

Development

  • I'm a complete amateur with Golang. If anything's bad please make a pull request.
  • Versioning is [MAJOR].[MINOR].[PATCH]

Credits & Dependencies

Core Dependencies

Other Dependencies

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL