https://github.com/raclettes/rmq-discord-transport
Rust consumer for RabbitMQ that forwards data to webhooks
https://github.com/raclettes/rmq-discord-transport
discord rabbit rabbitmq rmq rmq-discord-transport rust rust-lang
Last synced: 4 months ago
JSON representation
Rust consumer for RabbitMQ that forwards data to webhooks
- Host: GitHub
- URL: https://github.com/raclettes/rmq-discord-transport
- Owner: raclettes
- License: gpl-3.0
- Created: 2021-04-17T14:05:56.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-04-18T16:33:08.000Z (about 4 years ago)
- Last Synced: 2024-11-17T10:45:50.815Z (6 months ago)
- Topics: discord, rabbit, rabbitmq, rmq, rmq-discord-transport, rust, rust-lang
- Language: Rust
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://forthebadge.com)
# RMQ Discord Transport
`rmq-discord-transport` is a simple consumer for RabbitMQ that relays information to Discord, in a situation where the result is unimportant, or an isolated worker is instead wanted.## Configuration
The script takes 2 environment variables into account:
- `RABBITMQ_URI`: required, defines the rabbitmq connection string (for example, `amqp://guest:[email protected]`).
- `DEFAULT_WEBHOOK_URI`: optional, is only needed to supply a default webhook link to use when one is not provided.## Data format
Definitions can be found in [`src/interface.rs`](src/interface.rs). The data is taken as JSON and is expected as follows:```jsonc
{
"webhook_uri": "", // optional
"payload": {
"content": "",
"username": "", // optional
"avatar_url": "", // optional
"tts": true, // optional
"embeds": {
// See https://birdie0.github.io/discord-webhooks-guide/structure/embeds.html
// These are not internally parsed, so there is no verification of their validity.
// Any incorrect embeds will simply not be handled.
}
},
"files": [
{
"filename": "",
"is_spoiler": true, // optional
"data": [
/* Data as an array of u8 integers */
]
},
]
}
```## Build
Build with cargo: `cargo build`. More info: https://doc.rust-lang.org/cargo/commands/cargo-build.html## Issues
Create an issue on the [issues tab](https://github.com/starsflower/rmq-discord-transport/issues). Any support/feedback is appreciated.