From 966a4934552a43d2a1de0e314bacd7bada0a6845 Mon Sep 17 00:00:00 2001 From: Nathan Perry Date: Sat, 16 Feb 2019 14:52:54 -0500 Subject: clean up project structure - Move audio-related code into its own top-level module, separating out playback commands into their own file in `commands`. - Rename `sound` commands module to `sound_levels`. --- src/commands/mod.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/commands/mod.rs') diff --git a/src/commands/mod.rs b/src/commands/mod.rs index b73faef..b991c18 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -8,11 +8,11 @@ use crate::Result; #[cfg(feature = "diesel")] pub use self::meme::*; pub use self::playback::*; -pub use self::sound::*; +pub use self::sound_levels::*; -mod playback; -mod sound; -mod roll; +pub(crate) mod playback; +pub(crate) mod sound_levels; +pub(crate) mod roll; pub fn register_commands(f: StandardFramework) -> StandardFramework { let f: StandardFramework = register_db(f); @@ -114,8 +114,7 @@ fn register_db(f: StandardFramework) -> StandardFramework { f } -fn send>(channel: ChannelId, text: A, tts: bool) -> Result<()> { +pub(crate) fn send>(channel: ChannelId, text: A, tts: bool) -> Result<()> { channel.send_message(|m| m.content(text.as_ref()).tts(tts))?; Ok(()) } - -- cgit v1.3.1