i get this and i dont know what to do
thread 'main' panicked at src/main.rs:21:9:
Error getting token
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `targetdebugprimul.exe` (exit code: 101)
tried
set RUST_BACKTRACE=1
but still i get
thread 'main' panicked at src/main.rs:21:9:
Error getting token
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `targetdebugprimul.exe` (exit code: 101)
edit: also this is my code
use simple_home_dir::*;
use stealcord::get_token;
#[tokio::main]
async fn main () {
// Set path to Discord token storage
let path = home_dir().unwrap().join(if cfg!(target_os = "linux") {
// Linux
".config/discord/Local Storage/leveldb/"
} else {
// Windows
"\AppData\Roaming\Discord\Local Storage\leveldb"
});
// Get only token
if let Ok(token) = get_token(path.clone()) {
// Print token
println!("{token}")
} else {
// Print error message
panic!("Error getting token")
}
}
puttin extra text bcs of stackoverflow, first time(:
WHY IS RUST SO HARD
LOW LEVEL CODING
IS ANNOYING
New contributor
Squidisk Squid is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.