Fixed vscode settings issue with rust analyzer. Testing command errors
parent
7936b24d28
commit
b27134a759
@ -1,19 +1 @@
|
|||||||
# ---> Rust
|
/target
|
||||||
# Generated by Cargo
|
|
||||||
# will have compiled files and executables
|
|
||||||
debug/
|
|
||||||
target/
|
|
||||||
|
|
||||||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
|
|
||||||
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
|
|
||||||
Cargo.lock
|
|
||||||
|
|
||||||
# These are backup files generated by rustfmt
|
|
||||||
**/*.rs.bk
|
|
||||||
|
|
||||||
# MSVC Windows builds of rustc generate these, which store debugging information
|
|
||||||
*.pdb
|
|
||||||
|
|
||||||
|
|
||||||
# SECRETS
|
|
||||||
secrets/
|
|
||||||
|
|||||||
@ -1,6 +1,3 @@
|
|||||||
{
|
{
|
||||||
"rust-analyzer.linkedProjects": [
|
|
||||||
".\\Cargo.toml",
|
|
||||||
".\\Cargo.toml"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
use super::utils;
|
||||||
|
|
||||||
|
use serenity::model::channel::Message;
|
||||||
|
use serenity::prelude::*;
|
||||||
|
|
||||||
|
pub struct Commands;
|
||||||
|
|
||||||
|
impl Commands
|
||||||
|
{
|
||||||
|
pub async fn randomizer(ctx: Context, msg: Message) -> Result<(), String>
|
||||||
|
{
|
||||||
|
let item = utils::get_random_item();
|
||||||
|
//if let Err(why) = msg.channel_id.say(&ctx.http, format!("You found {}!", item)).await
|
||||||
|
// {
|
||||||
|
//return Err(format!("Error sending message: {:?}", why));
|
||||||
|
return Err(format!("Error sending message: {:?}", "TESTING ERROR"));
|
||||||
|
// }
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue