Перейти к файлу
izzy lyseggen 63077bf016 fix(bot): remove preview img from commit create
prob won't be available in time, so leave it off.
you will still get it on commit update
2021-07-23 15:39:13 +01:00
webhooks_server fix(bot): remove preview img from commit create 2021-07-23 15:39:13 +01:00
.env-example feat: initial commit 2021-07-23 10:22:08 +01:00
.gitignore docs(readme): add another screenshot w preview 2021-07-23 15:01:27 +01:00
README.md docs(readme): add another screenshot w preview 2021-07-23 15:01:27 +01:00
poetry.lock feat: initial commit 2021-07-23 10:22:08 +01:00
pyproject.toml feat: initial commit 2021-07-23 10:22:08 +01:00
run.py feat: initial commit 2021-07-23 10:22:08 +01:00

README.md

speckle-webhooks-example

This is a simple example of what you can do using Speckle Stream Webhooks.

Requests from the Speckle Server are consumed and formatted to then be sent to Discord:

example-messages stream-update-example commit-update-example

Setup

You'll need access to a Speckle Server (or use our public one, speckle.xyz). Create some webhooks on the server to get started.

create-webhook

Fill in your .env file based on the .env-example:

  • SECRET: the secret you used to set up the webhooks. note that it is assumed that all your webhooks have the same secret
  • SPECKLE_TOKEN: (optional) you can generate this from your profile online. this is only used for the commit_created event
  • DISCORD_URL: generate this by going to a discord channel's settings > integrations > webhooks > new webhook

generate discord webhooks url

Developing

Dependencies

This project uses poetry for package management. Follow the docs to install.

If this is your first time using poetry and you're used to creating your virtual environments within the project directory, run $ poetry config virtualenvs.in-project true to configure poetry to do the same.

To bootstrap the project environment run $ poetry install. This will create a new virtual-env for the project and install both the package and dev dependencies.

If you don't want to use poetry, you can roll your own virtual env and install the specified dependencies in the pyproject.toml.

Start

To start up, simply run the run.py file in the root directory.