Skip to content

DiscordChatExporter

Docker usage instructions · Tyrrrz/DiscordChatExporter Wiki

Tyrrrz/DiscordChatExporter: Exports Discord chat logs to a file

Social Media Message Format Tweet

Guild and Channel Data

  "guild": {
    "id": "834499078434979890",
    "name": "BanklessDAO",
    "iconUrl": "BanklessDAO - ┌───  \uD83E\uDD1DWelcome  ───┐ - workshop [976269336232726578].json_Files/6323d481455575549e0be8ac41a2deca-F67D2.png"
  },
  "channel": {
    "id": "976269336232726578",
    "type": "GuildVoiceChat",
    "categoryId": "834499078434979891",
    "category": "┌───  \uD83E\uDD1DWelcome  ───┐",
    "name": "workshop",
    "topic": null
  },
  "dateRange": {
    "after": null,
    "before": null
  },
  "exportedAt": "2024-01-14T14:39:06.2104439+00:00",
  "messageCount": 131

Individual Messages

    {
      "id": "988961449529454592",
      "type": "Default",
      "timestamp": "2022-06-22T00:19:43.583+00:00",
      "timestampEdited": null,
      "callEndedTimestamp": null,
      "isPinned": false,
      "content": "How is the anonymisation guaranteed when playing the transaction back to the underlying blockchain?",
      "author": {
        "id": "397760541940121600",
        "name": "barwig",
        "discriminator": "0000",
        "nickname": "Barwig",
        "color": "#F1C40F",
        "isBot": false,
        "roles": [
          {
            "id": "843924063591727195",
            "name": "Developer's Guild",
            "color": "#F1C40F",
            "position": 214
          },
          {
            "id": "846412889061195809",
            "name": "Research Guild",
            "color": "#F1C40F",
            "position": 213
          },
          {
            "id": "842549911768924181",
            "name": "Writers Guild",
            "color": "#F1C40F",
            "position": 206
          },
          {
            "id": "846796122907475978",
            "name": "Analytics Guild",
            "color": "#F1C40F",
            "position": 204
          },
          {
            "id": "851888073330655233",
            "name": "Treasury Department",
            "color": "#F1C40F",
            "position": 201
          },
          {
            "id": "867168413222305812",
            "name": "First Quests Welcome",
            "color": "#206694",
            "position": 194
          },
          {
            "id": "897922810297593866",
            "name": "BA Project",
            "color": null,
            "position": 172
          },
          {
            "id": "897925145220485210",
            "name": "Fight Club Project",
            "color": null,
            "position": 171
          }
        ],
        "avatarUrl": "BanklessDAO - ┌───  \uD83E\uDD1DWelcome  ───┐ - workshop [976269336232726578].json_Files/32877b6eef5d57ebbf33aad3ee695929-1C452.png"
      },
  • Recursive Parts

* .messages
    * .messages[#].author 
        * .messages[#].author.roles[#]
    * .messages[#].attachments[#]
    * .messages[#].embeds[#]
    * .messages[#].stickers[#]
    * .messages[#].reactions[#]
    * .messages[#].mentions[#]
    * .messages[#].reference[#]
* .channel
* .guild
* .exportedAt
* .messageCount

What do we store as CID?

  • GuildCID
  • ChannelCID
  • Author
  • Roles
  • AuthorRoles
  • Attachments
  • Embeds
  • Stickers
  • MentionDID + CID
  • MessageCID for Reply
  • AvatarCID

Steps

  1. Get GuildCID
  2. Get ChannelCID
  3. Create Author Dict
  4. Loop Messages in Reverse
    1. Get
      1. Content
      2. Timestamp
      3. Author
        1. Is Bot
      4. Nickname