mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-04-24 23:13:48 +00:00
Added JSON
@@ -5,14 +5,14 @@ We'll be using [DiscordChatExporter CLI](https://github.com/Tyrrrz/DiscordChatEx
|
|||||||
```powershell
|
```powershell
|
||||||
# Info: https://github.com/Tyrrrz/DiscordChatExporter/wiki
|
# Info: https://github.com/Tyrrrz/DiscordChatExporter/wiki
|
||||||
|
|
||||||
$TOKEN = "token"
|
$TOKEN = "tokenhere"
|
||||||
$TOKENTYPE = "BOT/USER"
|
$TOKENTYPE = "BOT/USER"
|
||||||
$CHANNEL = "channel"
|
$CHANNEL = "channelhere"
|
||||||
$EXEPATH = "exe"
|
$EXEPATH = "exefolderhere"
|
||||||
$FILENAME = "name"
|
$FILENAME = "filenamehere"
|
||||||
$EXPORTDIRECTORY = "dir"
|
$EXPORTDIRECTORY = "dirhere"
|
||||||
$EXPORTFORMAT = "format"
|
$EXPORTFORMAT = "formathere"
|
||||||
# Available export formats: PlainText, HtmlDark, HtmlLight, Csv
|
# Available export formats: PlainText, HtmlDark, HtmlLight, Json, Csv
|
||||||
|
|
||||||
cd $EXEPATH
|
cd $EXEPATH
|
||||||
|
|
||||||
@@ -20,30 +20,31 @@ If($TOKENTYPE -match "BOT"){$ISBOTYES = "-b"}
|
|||||||
Else{$ISBOTYES = ""}
|
Else{$ISBOTYES = ""}
|
||||||
.\DiscordChatExporter.Cli.exe export -t $TOKEN $ISBOTYES -c $CHANNEL -f $EXPORTFORMAT -o "$FILENAME.tmp"
|
.\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"}
|
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 "HtmlDark"){mv "$FILENAME.tmp" -Destination "$EXPORTDIRECTORY\$FILENAME-$Date.html"}
|
||||||
ElseIf($EXPORTFORMAT -match "HtmlLight"){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"}
|
ElseIf($EXPORTFORMAT -match "Csv"){mv "$FILENAME.tmp" -Destination "$EXPORTDIRECTORY\$FILENAME-$Date.csv"}
|
||||||
exit
|
exit
|
||||||
```
|
```
|
||||||
|
|
||||||
**2.** Replace:
|
**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 (")
|
Make sure not to delete the quotes (")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user