You are browsing as a guest. Sign up (or log in) to start making projects!

dsc.archive

  • 4 Devlogs
  • 24 Total hours

A library designed for creating Discord channel transcripts that lets you easily fetch, filter, and process large amounts of Discord messages. Support for exporting the fetched data to JSON and generating HTML and TXT transcripts is planned for future releases.

Ship #1 Changes requested

The main function of the library, fetchMessages(), is now complete. It allows you to easily fetch large amounts of Discord messages.
It allows you to filter messages so that only the fields you need are returned. You can also choose whether to include additional data such as guild, channel, message authors (authors), interaction authors (interactions), and webhooks, making them easier to access. When enabled, authors, interactions, and webhooks store all the message authors in these maps along with an array of the IDs of the messages they sent (if the id field was selected), making it easy to access all the messages related to a specific author or webhook.
To make handling large amounts of data easier, I added several methods and properties such as .get("ID") for messages, even if it’s an array, .first(NUMBER) and .last(NUMBER) for messages, authors, interactions, and webhooks, allowing you to get multiple objects from the array/map.
To improve readability in the console, if messages, authors, interactions and webhooks contain more than five entries, they will be replaced by [Messages], [Authors], [Interactions], and [Webhooks]. You can access the entire array or map via the .raw property.

Try project → See source code →
Open comments for this post

4h 25m 20s logged

A few things have changed since the last devlog. dsc.archive has now reached v0.2.1 on npm:

  • renamed fetchedTimestamp to fetchTimestamp to avoid cofusion;
  • moved fetchTimestamp to the end of the FetchedMessages object, instead of after messages;
  • if now authors, interactions and webhooks are empty maps, they will be returned as null in the result;
  • added new types in index.d.ts, such as DefaultFields and DefaultOptions, to better show the default values;
  • added comments on almost every property in index.d.ts, to better explain what each one does;
  • updated the README.md with the new documentation for the changes made.
0
0
9
Open comments for this post

10h 1m 20s logged

I spent a lot of time rewriting the output of fetchMessages(). Now, in addition to messages, it returns:

  • fetchedTimestamp, a timestamp that shows when the fetch was performed;
  • you can select whether to return:
    • the guild where the channel is located;
    • the channel;
    • the message authors, divided into:
      • authors (those who sent at least one normal message);
      • interactions (those who sent at least one message linked to an interaction);
      • webhooks.
        For each message author, if you select the message id in the fields, an array containing all the messages they sent will be displayed.

I also added some functions to better handle large fetches:

  • get(id) for messages, even though it’s an array (this can be useful in certain cases);
  • for both message authors and messages:
    • raw which returns the original array/map without the custom wrapper;
    • first(number?) and last(number?) functions, to return the first or last message(s).

In the next devlog I’ll finish updating index.d.ts and the README.md, then I’ll release v0.2.0 on npm.

0
0
5
Open comments for this post

2h 10m 40s logged

v0.1.2

  • Now if fields contains only objects, it will be treated as a whitelist, showing only the selected properties of those objects.
  • Now fetchMessages() also accepts a Promise as the channel parameter and waits for it to resolve before continuing.
  • Added support for all discord.js v14 versions.
  • Added a quick setup guide to the README.md and updated the documentation for the changes made by this release.
0
0
2
Open comments for this post

7h 51m 43s logged

v0.1.0

FetchMessages()

I created the first part of the library, the fetchMessages function, which allows you to fetch a number of (integer) messages between 1 and Infinity within a channel, filtering which message fields you want to include in the result. For more information, see the README.

v0.1.1

I added the GitHub Actions workflow for publishing to npm and updated the README to v0.1.1

0
0
19

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…