serenity
serenity copied to clipboard
e14_slash_commands errors on startup
When running example e14_slash_commands, it compiles but throws this error on startup:
thread 'main' panicked at 'The `framework`-feature is enabled (it's on by default), but no framework was provided.
If you don't want to use the command framework, disable default features and specify all features you want to use.', src\client\mod.rs:361:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\e14_slash_commands.exe` (exit code: 101)
I have the DISCORD_TOKEN environment variable set, so its not an issue with that I don't think. I'm on x64 windows 10.
Make sure you're running the example with default-features = false for serenity, so that only the necessary features are enabled. For reference, see the included Cargo.toml in e14_slash_commands
I'm running the example directly. default-features = false is set in the example's Cargo.toml
I'm running the example directly.
So you're running cargo run inside the serenity/examples/e14_slash_commands/ folder? Because that should work (I just tested too)
Sorry for taking so long to respond to this, I didn't realize that it was waiting on me until now. I think this was just an issue on my side. I don't remember the exact command I used, but I think the command was cargo run --example e14_slash_commands. Currently the command doesn't run the example anymore (it just gives something like error: no example target named e14_slash_commands., so maybe this isn't an issue people run into anymore.
By running the example directly, I meant that I was cloning the repo and trying to run it, without having touched anything. Doing cargo run inside the example works fine for me (and probably would've been fine the first time).