1
0
Fork 0
mirror of https://github.com/icewind1991/RGBot synced 2026-06-03 20:14:10 +02:00

bumb dependencies

This commit is contained in:
Robin Appelman 2019-11-27 18:48:09 +01:00
commit d952551e27
3 changed files with 505 additions and 263 deletions

756
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -5,10 +5,10 @@ authors = ["Robin Appelman <robin@icewind.nl>"]
edition = "2018"
[dependencies]
serenity = { version = "0.6", features = ["cache"] }
regex = "1.1"
err-derive = "0.1"
env_logger = "0.4"
log = "0.3"
serenity = { version = "0.7.1", features = ["cache"] }
regex = { version = "1.3", default-features = false, features = ["std", "perf"] }
err-derive = "0.2"
env_logger = "0.7"
log = "0.4"
contrast = "0.1"
rgb = "0.8"

View file

@ -21,13 +21,7 @@ enum BotError {
#[error(display = "missing \"colors\" base role")]
NoColorRole,
#[error(display = "discord error: {}", _0)]
DiscordError(#[error(cause)] DiscordError),
}
impl From<DiscordError> for BotError {
fn from(f: DiscordError) -> Self {
BotError::DiscordError(f)
}
DiscordError(#[error(source)] DiscordError),
}
fn background_contrast(color: Colour) -> f32 {
@ -168,7 +162,7 @@ impl EventHandler for Handler {
}
fn main() {
env_logger::init().expect("Unable to init env_logger");
env_logger::init();
let token = env::var("DISCORD_TOKEN").expect("Expected a token in the environment");
let min_contrast: f32 = env::var("MIN_CONTRAST")