-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: prepare for adding ytplay command
- Loading branch information
Showing
5 changed files
with
30 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
// src/commands/mod.rs | ||
mod help; | ||
mod ping; | ||
mod youtube; | ||
|
||
pub use help::help; | ||
pub use ping::ping; | ||
pub use ping::ping; | ||
pub use youtube::ytplay; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// src/commands/youtube/mod.rs | ||
pub mod ytplay; | ||
|
||
pub use ytplay::ytplay; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
use crate::Context; | ||
|
||
/// Description of the new function | ||
/// | ||
/// This command allows you to play a YouTube video in VC. | ||
/// ``` | ||
/// ~ytplay | ||
/// ``` | ||
#[poise::command(prefix_command, slash_command)] | ||
pub async fn ytplay(ctx: Context<'_>) -> Result<(), Box<dyn std::error::Error + Send + Sync>> { | ||
ctx.defer().await?; | ||
|
||
// ... | ||
|
||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters