feat(error-codes): fix error code explanation and temporarily disable mod applications
This commit is contained in:
parent
151a8285a6
commit
02b68e5c46
3 changed files with 5 additions and 7 deletions
8
build.rs
8
build.rs
|
|
@ -80,7 +80,7 @@ fn main(){
|
|||
code.write_str("\
|
||||
_ => super::CategoryInfo::default()\
|
||||
};\
|
||||
let error_result = match ((category as u32) << 16) | code as u32{\
|
||||
let error_result = match (category, code){\
|
||||
\
|
||||
").expect("unable to write");
|
||||
|
||||
|
|
@ -131,8 +131,6 @@ fn main(){
|
|||
let category_num: u32 = first_category.0.parse().expect("unable to parse category");
|
||||
let error_num: u32 = first_error.0.parse().expect("unable to parse error");
|
||||
|
||||
let search_val: u32 = category_num << 16 | error_num;
|
||||
|
||||
let Value::String(name) = &error["name"] else {
|
||||
panic!("unable to parse error json");
|
||||
};
|
||||
|
|
@ -184,7 +182,7 @@ fn main(){
|
|||
|
||||
code.write_str(
|
||||
&format!("\
|
||||
{} => super::ErrorInfo{{\
|
||||
({},{}) => super::ErrorInfo{{\
|
||||
name: \"{}\",
|
||||
message: \"{}\",
|
||||
short_description: \"{}\",
|
||||
|
|
@ -193,7 +191,7 @@ fn main(){
|
|||
long_solution: \"{}\",
|
||||
support_link: \"{}\",
|
||||
}},\
|
||||
", search_val, name, message, short_description, long_description, short_solution, long_solution, support_link)
|
||||
", category_num, error_num, name, message, short_description, long_description, short_solution, long_solution, support_link)
|
||||
).expect("unable to write");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ fn create_error_explain_message(str_code: &str, expanded: bool) -> Option<EditMe
|
|||
return None;
|
||||
};
|
||||
|
||||
let Ok(error) = str_code[5..].parse() else {
|
||||
let Ok(error) = str_code[4..].parse() else {
|
||||
return None;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ async fn main() {
|
|||
.event_handler(error_codes::ErrorCodeHandler)
|
||||
.event_handler(ayy::AyyHandler)
|
||||
.event_handler(cheeseburger::CheeseburgerHandler)
|
||||
.event_handler(miiverse_mod_application::MiiverseModApplicationHandler::default())
|
||||
//.event_handler(miiverse_mod_application::MiiverseModApplicationHandler::default())
|
||||
.await.expect("unable to create client");
|
||||
|
||||
client.start().await.expect("error running bot");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue