diff --git a/src/command.rs b/src/command.rs index c3753b4..5e98f0b 100644 --- a/src/command.rs +++ b/src/command.rs @@ -144,7 +144,7 @@ impl Server { async fn walk_channels(all: &mut Vec, cache: impl CacheHttp + Clone, settings: GetMessages) { for channel in all { // get the messages - match channel.this.messages(cache.clone(), settings).await { + match Box::pin(channel.this.messages(cache.clone(), settings)).await { Ok(mesgs) => { // store messages in our server object channel.messages = mesgs; @@ -152,10 +152,12 @@ impl Server { eprintln!("{} was empty - (Or incorrect permissions)", channel.this.name); } }, - Err(_) => todo!(), + Err(e) => { + eprintln!("{}", e); + }, } // Clone *should* be cheap - it's Arc under the hood - walk_channels(&mut channel.children, cache.clone(), settings).await; + Box::pin(walk_channels(&mut channel.children, cache.clone(), settings)).await; } } } @@ -200,7 +202,6 @@ async fn index(map: HashMap) -> Server { server } - // NOTE!!! Make sure these names in quotes are lowercase! #[poise::command(slash_command, rename = "index", guild_only)] pub async fn index_cmd(ctx: Context<'_>) -> Result<(), Error> {