first_char

This commit is contained in:
missing 2022-06-15 13:03:52 -05:00
parent d6bd657d5e
commit 0ea6e18475

View file

@ -93,8 +93,8 @@ async fn create_prefix(msg: &Message, is_reply: bool, http: impl CacheHttp) -> (
_ => Cow::Borrowed(&msg.author.name),
};
let byte = nick.bytes().next().unwrap();
let colour_index = (byte as usize + nick.len()) % 12;
let first_char = nick.chars().next().unwrap();
let colour_index = (first_char as usize + nick.len()) % 12;
let mut first_char = 1;
loop {