Skip to content

Xzya/discord-logs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord logs

Download all your Discord messages locally in json files.

Installation

  • Install the dependencies
$ npm install

Running the project

$ DATA_PATH=<PATH> TOKEN=<TOKEN> npm start
Variable Description Required
DATA_PATH Path to the directory where the messages will be stored. true
TOKEN User's authorization token. Used for the API calls when getting the messages. true
SYNC_GUILDS Optional. If you also want to synchronize the messages of a guild, you can include the ids separated by comma, e.g. id1,id2,id3. false
INTERVAL Optional. You can specity the interval, in miliseconds, when the messages should be synchronized, e.g. every 10 minutes. If not specified, the script will exit after synchronizing once. false

You can also build the project if you don't want to rely on ts-node.

$ npm run build
$ DATA_PATH=<PATH> TOKEN=<TOKEN> node dist/index.js

Elasticsearch

If you want to index the messages in Elasticsearch, you can find an example Logstash config in logstash.conf.

Note: The example config uses the Prune plugin which doesn't come installed by default. To install it, run from the Logstash installation folder:

./bin/logstash-plugin install logstash-filter-prune

More details here.

License

Open sourced under the MIT license.

Releases

No releases published

Packages

No packages published