From 54e351186a289ba0325f4352ad2c1d3ad804be37 Mon Sep 17 00:00:00 2001 From: Ethan Ruszanowski Date: Tue, 31 Jan 2023 19:25:10 -0500 Subject: [PATCH] Remove crate from pub mod elements --- src/commands/mod.rs | 4 ++-- src/commands/slur.rs | 2 +- src/commands/team.rs | 2 +- src/main.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 274c4ad..2a105ac 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -1,3 +1,3 @@ // Group all commands for registration -pub(crate) mod slur; -pub(crate) mod team; +pub mod slur; +pub mod team; diff --git a/src/commands/slur.rs b/src/commands/slur.rs index 0174687..68e225b 100644 --- a/src/commands/slur.rs +++ b/src/commands/slur.rs @@ -8,7 +8,7 @@ use std::{ /// Basically a ping command #[poise::command(slash_command, prefix_command)] -pub(crate) async fn slur(ctx: Context<'_>) -> Result<(), Error> { +pub async fn slur(ctx: Context<'_>) -> Result<(), Error> { let file = File::open("quotes.txt").unwrap_or_else(|_e| panic!("Quote file missing.")); // Open the quotes file let file = BufReader::new(file); // Read the quotes file let quotes = file.lines().map(|res| res.expect("Failed to read line.")); diff --git a/src/commands/team.rs b/src/commands/team.rs index 5eaea26..f403e5b 100644 --- a/src/commands/team.rs +++ b/src/commands/team.rs @@ -18,7 +18,7 @@ fn team_to_ping(team: &[&String]) -> String { /// Splits up players for custom matches #[poise::command(slash_command)] -pub(crate) async fn team( +pub async fn team( ctx: Context<'_>, #[description = "Your order voice channel"] #[rename = "order"] diff --git a/src/main.rs b/src/main.rs index df2bb9a..5485a97 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,7 +2,7 @@ use poise::serenity_prelude as serenity; mod commands; -struct Data {} +pub struct Data {} type Error = Box; type Context<'a> = poise::Context<'a, Data, Error>;