Skip to content

Add Webhook Support#16

Open
Peashooter101 wants to merge 2 commits intomainfrom
dev/main/webhook
Open

Add Webhook Support#16
Peashooter101 wants to merge 2 commits intomainfrom
dev/main/webhook

Conversation

@Peashooter101
Copy link
Member

Addresses #15

Changes

Adds Webhook Support

  • Allows users to modify the entire JSON Body.
  • Specifically made to be used alongside Discord's Webhooks that you can set up in any server: Server Settings > Apps Section > Integration > Webhooks
  • Theoretically can support a POST request to any endpoint that will take the JSON body since we allow modifying the entire JSON body.
    • Not a safety concern for us since this would be managed and controlled solely by the server administrators of both the Discord and Minecraft server.

Off By Default

This will be disabled and has to be turned on by the Minecraft server administrator.

There is a JSON body already provided in the config.yml:

  json-body: |
    {
      "content": "{message}\n-# {sender_display_name} ({sender}) sent {recipient_display_name} ({recipient}) this on <t:{timestamp}>",
      "avatar_url": "https://mc-heads.net/avatar/{sender_uuid}",
      "username": "{sender} > {recipient}"
    }

This JSON body produces this:

image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant