Skip to content

Discord Binding V1 Schema

Schema

  • Message ID
  • "message_id"
  • Message Contents
  • "content"
  • User
  • "author" json { "author" : { "id" : "432981598818903585", "name" : "dentropy", "discriminator" : "8658", "nickname" : "Paul", "color" : "#2ECC71", "isBot" : false, "avatarUrl" : "https://cdn.discordapp.com/avatars/............" } }
  • Channel
  • "channel_id"
  • Guild
  • "guild_id"
  • User Mentions
  • "mentions"
  • Replied
  • Reactions
  • "reactions"

Diagrams

wiki.software.list.Elasticsearch.Fielddata

PUT discord*/_mapping
{
  "properties": {
    "message_id": { 
      "type":     "text",
      "fielddata": true
    },
    "content": { 
      "type":     "text",
      "fielddata": true
    },
    "author.id": { 
      "type":     "text",
      "fielddata": true
    },
    "author.name": { 
      "type":     "text",
      "fielddata": true
    },
    "author.nickname": { 
      "type":     "text",
      "fielddata": true
    },
    "channel_id": { 
      "type":     "text",
      "fielddata": true
    },
    "guild_id": { 
      "type":     "text",
      "fielddata": true
    }
  }
}
curl --header "Content-Type: application/json" \
  -u $ELASTIC_USER:$ELASTIC_PASS \
  --request PUT \
--data '
{
  "properties": {
    "message_id": { 
      "type":     "text",
      "fielddata": true
    },
    "content": { 
      "type":     "text",
      "fielddata": true
    },
    "author.id": { 
      "type":     "text",
      "fielddata": true
    },
    "author.name": { 
      "type":     "text",
      "fielddata": true
    },
    "author.nickname": { 
      "type":     "text",
      "fielddata": true
    },
    "channel_id": { 
      "type":     "text",
      "fielddata": true
    },
    "guild_id": { 
      "type":     "text",
      "fielddata": true
    }
  }
} ' "$ELASTIC_NODE/discord-*/_mapping"