aboutsummaryrefslogtreecommitdiff
path: root/src/commands/mod.rs
diff options
context:
space:
mode:
authorNathan Perry <avaglir@gmail.com>2019-02-16 14:52:54 -0500
committerNathan Perry <avaglir@gmail.com>2019-02-16 14:52:54 -0500
commit966a4934552a43d2a1de0e314bacd7bada0a6845 (patch)
tree44a895eb5859ff0390f1008f2beed2de4b18e548 /src/commands/mod.rs
parent978945e16046fb28b2351ee637fd267c38df93ac (diff)
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`.
Diffstat (limited to 'src/commands/mod.rs')
-rw-r--r--src/commands/mod.rs11
1 files changed, 5 insertions, 6 deletions
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<A: AsRef<str>>(channel: ChannelId, text: A, tts: bool) -> Result<()> {
+pub(crate) fn send<A: AsRef<str>>(channel: ChannelId, text: A, tts: bool) -> Result<()> {
channel.send_message(|m| m.content(text.as_ref()).tts(tts))?;
Ok(())
}
-