diff --git a/Cargo.lock b/Cargo.lock index c1ac89c..0626f9a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -735,9 +735,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.108" +version = "0.2.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8521a1b57e76b1ec69af7599e75e38e7b7fad6610f037db8c79b127201b5d119" +checksum = "f98a04dce437184842841303488f70d0188c5f51437d2a834dc097eafa909a01" [[package]] name = "linked-hash-map" @@ -777,9 +777,9 @@ checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" [[package]] name = "memoffset" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ "autocfg", ] @@ -1072,9 +1072,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.32" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +checksum = "fb37d2df5df740e582f28f8560cf425f52bb267d872fe58358eadb554909f07a" dependencies = [ "unicode-xid", ] @@ -1457,7 +1457,7 @@ dependencies = [ [[package]] name = "serenity" version = "0.10.9" -source = "git+https://github.com/serenity-rs/serenity.git#a8b4e2f9ef8bee24f967944f184d77789b4a9be8" +source = "git+https://github.com/serenity-rs/serenity.git#fe946df80ed725784ed5b6d5ee233fe82b896861" dependencies = [ "async-trait", "async-tungstenite", diff --git a/geoffrey_bot/src/bot/commands/add_location.rs b/geoffrey_bot/src/bot/commands/add_location.rs index 65b5799..8eba808 100644 --- a/geoffrey_bot/src/bot/commands/add_location.rs +++ b/geoffrey_bot/src/bot/commands/add_location.rs @@ -98,8 +98,8 @@ impl BotCommand for AddLocationCommand { command_interaction: ApplicationCommandInteraction, ) -> Result { let options = command_interaction.data.options; - let name = option_to_string(options.get(0), "name")?; - let loc_type = option_to_loc_type(options.get(1), "loc_type")?; + let loc_type = option_to_loc_type(options.get(0), "loc_type")?; + let name = option_to_string(options.get(1), "name")?; let x = option_to_i64(options.get(2), "x")?; let y = option_to_i64(options.get(3), "y")?; let z = option_to_i64(options.get(4), "z")?; diff --git a/geoffrey_bot/src/bot/commands/find.rs b/geoffrey_bot/src/bot/commands/find.rs index d1e3e69..a87d403 100644 --- a/geoffrey_bot/src/bot/commands/find.rs +++ b/geoffrey_bot/src/bot/commands/find.rs @@ -62,7 +62,7 @@ impl BotCommand for FindCommand { let mut resp_str = String::new(); writeln!(resp_str, "The following locations match:").unwrap(); for loc in resp { - writeln!(display_loc(loc)).unwrap(); + writeln!(resp_str, "{}", display_loc(loc)).unwrap(); } resp_str } diff --git a/geoffrey_bot/src/bot/commands/mod.rs b/geoffrey_bot/src/bot/commands/mod.rs index a353d57..deff298 100644 --- a/geoffrey_bot/src/bot/commands/mod.rs +++ b/geoffrey_bot/src/bot/commands/mod.rs @@ -124,7 +124,7 @@ pub trait BotCommand { } }, _ => { - println!("GeoffreyBot an unhandled error: {}", err); + println!("GeoffreyBot got an unhandled error: {}", err); format!("OOPSIE WOOPSIE!! Uwu We made a fucky wucky!! A wittle fucko boingo! The admins at our \ headquarters are working VEWY HAWD to fix this! (Error in command {})", Self::command_name()) } diff --git a/geoffrey_bot/src/bot/mod.rs b/geoffrey_bot/src/bot/mod.rs index 291bdb7..039a894 100644 --- a/geoffrey_bot/src/bot/mod.rs +++ b/geoffrey_bot/src/bot/mod.rs @@ -14,10 +14,6 @@ pub mod formatters; pub async fn create_commands(ctx: &Context) -> Result, CommandError> { let mut commands: Vec = Vec::new(); - for command in ApplicationCommand::get_global_application_commands(&ctx.http).await? { - ApplicationCommand::delete_global_application_command(&ctx.http, command.id).await?; - } - commands.push(FindCommand::create_app_command(ctx).await?); commands.push(SellingCommand::create_app_command(ctx).await?); commands.push(AddLocationCommand::create_app_command(ctx).await?); diff --git a/geoffrey_models/src/models/mod.rs b/geoffrey_models/src/models/mod.rs index ab343fe..805b431 100644 --- a/geoffrey_models/src/models/mod.rs +++ b/geoffrey_models/src/models/mod.rs @@ -86,7 +86,7 @@ impl Position { impl Display for Position { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - write!(f, "(x={}, y={}, z={}) in {} ", self.x, self.y, self.z, self.dimension) + write!(f, "(x={}, y={}, z={}) {} ", self.x, self.y, self.z, self.dimension) } }