diff --git a/Scheduling-exports-on-Windows.md b/Scheduling-exports-on-Windows.md index 77aaa07..fcff7a7 100644 --- a/Scheduling-exports-on-Windows.md +++ b/Scheduling-exports-on-Windows.md @@ -5,14 +5,14 @@ We'll be using [DiscordChatExporter CLI](https://github.com/Tyrrrz/DiscordChatEx ```powershell # Info: https://github.com/Tyrrrz/DiscordChatExporter/wiki -$TOKEN = "token" +$TOKEN = "tokenhere" $TOKENTYPE = "BOT/USER" -$CHANNEL = "channel" -$EXEPATH = "exe" -$FILENAME = "name" -$EXPORTDIRECTORY = "dir" -$EXPORTFORMAT = "format" -# Available export formats: PlainText, HtmlDark, HtmlLight, Csv +$CHANNEL = "channelhere" +$EXEPATH = "exefolderhere" +$FILENAME = "filenamehere" +$EXPORTDIRECTORY = "dirhere" +$EXPORTFORMAT = "formathere" +# Available export formats: PlainText, HtmlDark, HtmlLight, Json, Csv cd $EXEPATH @@ -20,30 +20,31 @@ If($TOKENTYPE -match "BOT"){$ISBOTYES = "-b"} Else{$ISBOTYES = ""} .\DiscordChatExporter.Cli.exe export -t $TOKEN $ISBOTYES -c $CHANNEL -f $EXPORTFORMAT -o "$FILENAME.tmp" -$Date = Get-Date -Format "yyyy-MM-dd HH-mm" +$Date = Get-Date -Format "yyyy-MM-dd-HH-mm" If($EXPORTFORMAT -match "PlainText"){mv "$FILENAME.tmp" -Destination "$EXPORTDIRECTORY\$FILENAME-$Date.txt"} ElseIf($EXPORTFORMAT -match "HtmlDark"){mv "$FILENAME.tmp" -Destination "$EXPORTDIRECTORY\$FILENAME-$Date.html"} ElseIf($EXPORTFORMAT -match "HtmlLight"){mv "$FILENAME.tmp" -Destination "$EXPORTDIRECTORY\$FILENAME-$Date.html"} +ElseIf($EXPORTFORMAT -match "Json"){mv "$FILENAME.tmp" -Destination "$EXPORTDIRECTORY\$FILENAME-$Date.json"} ElseIf($EXPORTFORMAT -match "Csv"){mv "$FILENAME.tmp" -Destination "$EXPORTDIRECTORY\$FILENAME-$Date.csv"} exit ``` **2.** Replace: - `token` with your [Token](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Obtaining-Token-and-Channel-IDs) + `tokenhere` with your [Token](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Obtaining-Token-and-Channel-IDs) - `BOT/USER` If the Token is from a bot replace it with `BOT`, if it's from a user, `USER` + `BOT/USER` If the Token is from a bot replace it with `BOT`. If it's from a user, `USER` - `channel` with a [Channel ID](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Obtaining-Token-and-Channel-IDs) + `channelhere` with a [Channel ID](https://github.com/Tyrrrz/DiscordChatExporter/wiki/Obtaining-Token-and-Channel-IDs) - `exe` with the .exe **directory's path** (e.g. C:\Users\User\Desktop\DiscordChatExporter) + `exefolderhere` with the .exe **directory's path** (e.g. C:\Users\User\Desktop\DiscordChatExporter) - `name` with a filename without spaces + `filenamehere` with a filename without spaces - `dir` with the export directory (e.g. C:\Users\User\Documents\Exports) + `dirhere` with the export directory (e.g. C:\Users\User\Documents\Exports) - `format` with one of the available export formats + `formathere` with one of the available export formats Make sure not to delete the quotes (")