diff --git a/.gitignore b/.gitignore index 7ff6907..1b9cd34 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,4 @@ .env /venv .cargo -assets -out.json /.idea diff --git a/README.md b/README.md index 6c02ab5..a06e573 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,6 @@ You'll need rustc and cargo for compilation. To run, you'll need Python 3 still 6. Run migrations: `sqlx migrate run`. 7. Set environment variables: * `DATABASE_URL` - the URL of your MySQL database (`mysql://user[:password]@domain/database`) - * `WEBHOOK_AVATAR` - accepts the name of an image file located in `$CARGO_MANIFEST_DIR/assets/` to be used as the avatar when creating webhooks. **IMPORTANT: image file must be 128x128 or smaller in size** 8. Build: `cargo build --release` ### Compiling for other target diff --git a/assets/webhook.jpg b/assets/webhook.jpg new file mode 100644 index 0000000..ee26098 Binary files /dev/null and b/assets/webhook.jpg differ diff --git a/src/consts.rs b/src/consts.rs index 2bb0bd8..2cfa0b3 100644 --- a/src/consts.rs +++ b/src/consts.rs @@ -17,12 +17,8 @@ use regex::Regex; lazy_static! { pub static ref DEFAULT_AVATAR: AttachmentType<'static> = ( - include_bytes!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/assets/", - env!("WEBHOOK_AVATAR", "WEBHOOK_AVATAR not provided for compilation") - )) as &[u8], - env!("WEBHOOK_AVATAR"), + include_bytes!(concat!(env!("CARGO_MANIFEST_DIR"), "/assets/webhook.jpg")) as &[u8], + "webhook.jpg", ) .into(); pub static ref REGEX_CHANNEL_USER: Regex = Regex::new(r#"\s*<(#|@)(?:!)?(\d+)>\s*"#).unwrap();