diff --git a/websocket-worker/src/main.rs b/websocket-worker/src/main.rs index 74d4798..16b97f8 100644 --- a/websocket-worker/src/main.rs +++ b/websocket-worker/src/main.rs @@ -116,11 +116,12 @@ async fn main() -> Result<(), Box> { async fn send_webhook(msg: GatewayChatMessage, webhook: String) { let http = Http::new(""); let wh = Webhook::from_url(&http, &webhook).await.unwrap(); + wh.execute(&http, false, |w| { w.content(msg.message) .username(&msg.username) .allowed_mentions(|am| am.parse(ParseValue::Users).parse(ParseValue::Roles)) - .avatar_url(&format!("https://mc-heads.net/head/{}", msg.username)) + .avatar_url(&format!("https://mc-heads.net/head/{}", msg.username.split(' ').next().unwrap())) }).await.unwrap(); debug!("send job complete"); } \ No newline at end of file