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.
The script takes 2 environment variables into account:
RABBITMQ_URI
: required, defines the rabbitmq connection string (for example,amqp://guest:guest@127.0.0.1
).DEFAULT_WEBHOOK_URI
: optional, is only needed to supply a default webhook link to use when one is not provided.
Definitions can be found in src/interface.rs
. The data is taken as JSON and is expected as follows:
{
"webhook_uri": "<webhook uri>", // optional
"payload": {
"content": "<message content>",
"username": "<username>", // optional
"avatar_url": "<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": "<file name>",
"is_spoiler": true, // optional
"data": [
/* Data as an array of u8 integers */
]
},
]
}
Build with cargo: cargo build
. More info: https://doc.rust-lang.org/cargo/commands/cargo-build.html
Create an issue on the issues tab. Any support/feedback is appreciated.