Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/doitian/discord-export
Export Discord Channel Messages as Markdown
https://github.com/doitian/discord-export
discord markdown
Last synced: about 1 month ago
JSON representation
Export Discord Channel Messages as Markdown
- Host: GitHub
- URL: https://github.com/doitian/discord-export
- Owner: doitian
- License: mit
- Created: 2022-07-26T12:08:36.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-01T16:22:57.000Z (over 1 year ago)
- Last Synced: 2024-04-14T18:13:05.844Z (7 months ago)
- Topics: discord, markdown
- Language: Python
- Homepage:
- Size: 14.6 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Export Discord Channel Messages as Markdown
## Usage
### Get User Token
- Login Discord App in Chrome
- Open Developer Tool. Search `api` in the Network tab. Find any API request having the request header `Authorization`, copy the header value.
- Export the header value in the last step as the environment variable `DISCORD_USER_TOKEN`.### Copy Message Link
Right click any message and copy the link, which looks like `https://discord.com/channels/123456789518408213/123456789047021571/1234567896626376714`.
### Run the Script
First install dependencies.
```
pip install -r requirements.txt
```Then use the script `discord-export.py`.
```
./discord-export.py -h
usage: discord-export.py [-h] [--context {around,after,before}] [--limit N] URLExport Discord Messages
positional arguments:
URL Discord Message URLoptional arguments:
-h, --help show this help message and exit
--context {around,after,before}
How to fetch messages relative to the specified message
--limit N Number of messages to export
```