It doesn't build.
~/git/random-cat-bot main ?4 ▓▒░ cargo run ░▒▓ 101 х 19s
Blocking waiting for file lock on build directory
Compiling scopeguard v1.1.0
Compiling smallvec v1.10.0
Compiling slashy v0.1.1
error[E0432]: unresolved imports `serenity::model::interactions::ApplicationCommandInteractionDataOption`, `serenity::model::interactions::InteractionData`
--> /home/alejandra/.cargo/registry/src/github.com-1ecc6299db9ec823/slashy-0.1.1/src/argument.rs:3:87
|
3 | use serenity::{client::Cache, model::{id::{ChannelId, RoleId, UserId}, interactions::{ApplicationCommandInteractionDataOption as InteractionOption, Interaction, InteractionData}}};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ no `InteractionData` in `model::interactions`
| |
| no `ApplicationCommandInteractionDataOption` in `model::interactions`
|
= help: consider importing this struct instead:
serenity::model::prelude::application_command::ApplicationCommandInteractionDataOption
help: a similar name exists in the module
|
3 | use serenity::{client::Cache, model::{id::{ChannelId, RoleId, UserId}, interactions::{ApplicationCommandInteraction as InteractionOption, Interaction, InteractionData}}};
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: a similar name exists in the module
|
3 | use serenity::{client::Cache, model::{id::{ChannelId, RoleId, UserId}, interactions::{ApplicationCommandInteractionDataOption as InteractionOption, Interaction, Interaction}}};
| ~~~~~~~~~~~
error[E0432]: unresolved import `serenity::model::interactions::InteractionData`
--> /home/alejandra/.cargo/registry/src/github.com-1ecc6299db9ec823/slashy-0.1.1/src/framework.rs:17:182
|
17 | ...GuildId, MessageId, RoleId, UserId}, interactions::{Interaction, InteractionData, InteractionResponseType, InteractionType}, prelude::{CurrentUser, Presence, Ready, User, VoiceState}}};
| ^^^^^^^^^^^^^^^
| |
| no `InteractionData` in `model::interactions`
| help: a similar name exists in the module: `Interaction`
Compiling lock_api v0.4.9
Compiling parking_lot_core v0.9.6
error[E0599]: no method named `create_interaction_response` found for reference `&Interaction` in the current scope
--> /home/alejandra/.cargo/registry/src/github.com-1ecc6299db9ec823/slashy-0.1.1/src/framework.rs:465:19
|
465 | i.create_interaction_response(&self.ctx, |c| {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `&Interaction`
error[E0599]: no method named `create_interaction_response` found for reference `&Interaction` in the current scope
--> /home/alejandra/.cargo/registry/src/github.com-1ecc6299db9ec823/slashy-0.1.1/src/framework.rs:500:19
|
500 | i.create_interaction_response(&self.ctx, |c| {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `&Interaction`
error[E0609]: no field `channel_id` on type `&Interaction`
--> /home/alejandra/.cargo/registry/src/github.com-1ecc6299db9ec823/slashy-0.1.1/src/framework.rs:528:48
|
528 | CommandSource::Interaction(i) => i.channel_id.unwrap().send_message(&self.ctx, f).await,
| ^^^^^^^^^^
error[E0609]: no field `member` on type `&Interaction`
--> /home/alejandra/.cargo/registry/src/github.com-1ecc6299db9ec823/slashy-0.1.1/src/framework.rs:536:48
|
536 | CommandSource::Interaction(i) => i.member.clone().ok_or(serenity::Error::Other("No member on interaction")),
| ^^^^^^
error[E0609]: no field `guild_id` on type `&Interaction`
--> /home/alejandra/.cargo/registry/src/github.com-1ecc6299db9ec823/slashy-0.1.1/src/framework.rs:544:54
|
544 | CommandSource::Interaction(i) => match i.guild_id {
| ^^^^^^^^
error[E0609]: no field `channel_id` on type `&Interaction`
--> /home/alejandra/.cargo/registry/src/github.com-1ecc6299db9ec823/slashy-0.1.1/src/framework.rs:566:48
|
566 | CommandSource::Interaction(i) => i.channel_id.unwrap().to_channel(&self.ctx).await,
| ^^^^^^^^^^
error[E0609]: no field `data` on type `&Interaction`
--> /home/alejandra/.cargo/registry/src/github.com-1ecc6299db9ec823/slashy-0.1.1/src/argument.rs:210:38
|
210 | let data = match interaction.data.clone().unwrap() {
| ^^^^
Compiling dashmap v5.4.0
Compiling parking_lot v0.12.1
error[E0615]: attempted to take value of method `kind` on type `Interaction`
--> /home/alejandra/.cargo/registry/src/github.com-1ecc6299db9ec823/slashy-0.1.1/src/framework.rs:323:24
|
323 | if interaction.kind != InteractionType::ApplicationCommand {
| ^^^^ method, not a field
|
help: use parentheses to call the method
|
323 | if interaction.kind() != InteractionType::ApplicationCommand {
| ++
error[E0609]: no field `data` on type `Interaction`
--> /home/alejandra/.cargo/registry/src/github.com-1ecc6299db9ec823/slashy-0.1.1/src/framework.rs:327:39
|
327 | let name = match &interaction.data {
| ^^^^
error[E0609]: no field `channel_id` on type `Interaction`
--> /home/alejandra/.cargo/registry/src/github.com-1ecc6299db9ec823/slashy-0.1.1/src/framework.rs:358:38
|
358 | ... .channel_id
| ^^^^^^^^^^
error[E0609]: no field `channel_id` on type `Interaction`
--> /home/alejandra/.cargo/registry/src/github.com-1ecc6299db9ec823/slashy-0.1.1/src/framework.rs:370:30
|
370 | ... .channel_id
| ^^^^^^^^^^
error[E0609]: no field `member` on type `&Interaction`
--> /home/alejandra/.cargo/registry/src/github.com-1ecc6299db9ec823/slashy-0.1.1/src/framework.rs:456:48
|
456 | CommandSource::Interaction(i) => i.member.clone().map(|m| m.user),
| ^^^^^^
error[E0609]: no field `guild_id` on type `&Interaction`
--> /home/alejandra/.cargo/registry/src/github.com-1ecc6299db9ec823/slashy-0.1.1/src/framework.rs:558:48
|
558 | CommandSource::Interaction(i) => i.guild_id,
| ^^^^^^^^