mirror of
https://github.com/icewind1991/RGBot
synced 2026-06-04 04:24:09 +02:00
bumb dependencies
This commit is contained in:
parent
7cf6a0b195
commit
d952551e27
3 changed files with 505 additions and 263 deletions
756
Cargo.lock
generated
756
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
10
Cargo.toml
10
Cargo.toml
|
|
@ -5,10 +5,10 @@ authors = ["Robin Appelman <robin@icewind.nl>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serenity = { version = "0.6", features = ["cache"] }
|
serenity = { version = "0.7.1", features = ["cache"] }
|
||||||
regex = "1.1"
|
regex = { version = "1.3", default-features = false, features = ["std", "perf"] }
|
||||||
err-derive = "0.1"
|
err-derive = "0.2"
|
||||||
env_logger = "0.4"
|
env_logger = "0.7"
|
||||||
log = "0.3"
|
log = "0.4"
|
||||||
contrast = "0.1"
|
contrast = "0.1"
|
||||||
rgb = "0.8"
|
rgb = "0.8"
|
||||||
10
src/main.rs
10
src/main.rs
|
|
@ -21,13 +21,7 @@ enum BotError {
|
||||||
#[error(display = "missing \"colors\" base role")]
|
#[error(display = "missing \"colors\" base role")]
|
||||||
NoColorRole,
|
NoColorRole,
|
||||||
#[error(display = "discord error: {}", _0)]
|
#[error(display = "discord error: {}", _0)]
|
||||||
DiscordError(#[error(cause)] DiscordError),
|
DiscordError(#[error(source)] DiscordError),
|
||||||
}
|
|
||||||
|
|
||||||
impl From<DiscordError> for BotError {
|
|
||||||
fn from(f: DiscordError) -> Self {
|
|
||||||
BotError::DiscordError(f)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn background_contrast(color: Colour) -> f32 {
|
fn background_contrast(color: Colour) -> f32 {
|
||||||
|
|
@ -168,7 +162,7 @@ impl EventHandler for Handler {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
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 token = env::var("DISCORD_TOKEN").expect("Expected a token in the environment");
|
||||||
let min_contrast: f32 = env::var("MIN_CONTRAST")
|
let min_contrast: f32 = env::var("MIN_CONTRAST")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue