Skip to content

Commit

Permalink
Restrict previously public binary functions to crate
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinegb committed Jul 18, 2024
1 parent cb3ed74 commit 6e6db2b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/commands/anon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use crate::{
required_bot_permissions = "MANAGE_WEBHOOKS|SEND_MESSAGES|USE_EXTERNAL_EMOJIS",
ephemeral
)]
pub async fn anon(
pub(crate) async fn anon(
ctx: Context<'_>,
#[description = "Message to send anonymously"] message: String,
) -> Result<(), Error> {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use crate::{config::get_config_key, emoji::*, Context, Error};

/// Commands to aid in development of the bot
#[command(slash_command, subcommands("error", "delete_config"))]
pub async fn debug(_ctx: Context<'_>) -> Result<(), Error> {
pub(crate) async fn debug(_ctx: Context<'_>) -> Result<(), Error> {
unreachable!();
}

Expand Down
2 changes: 1 addition & 1 deletion src/commands/rock_paper_scissors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use crate::{emoji::*, Context, Error};
interaction_context = "Guild|BotDm|PrivateChannel",
required_bot_permissions = "USE_EXTERNAL_EMOJIS"
)]
pub async fn rock_paper_scissors(
pub(crate) async fn rock_paper_scissors(
ctx: Context<'_>,
#[description = "Person you want to play with"] user: UserId,
) -> Result<(), Error> {
Expand Down
2 changes: 1 addition & 1 deletion src/commands/silly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ macro_rules! silly_command {
interaction_context = "Guild|BotDm|PrivateChannel",
required_bot_permissions = "USE_EXTERNAL_EMOJIS"
)]
pub async fn $name(
pub(crate) async fn $name(
ctx: Context<'_>,
#[description = $user_description] user: UserId,
) -> Result<(), Error> {
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct Data {
type Error = anyhow::Error;
type Context<'a> = poise::Context<'a, Data, Error>;

pub async fn on_error<U: Debug, E: std::fmt::Display + std::fmt::Debug>(
async fn on_error<U: Debug, E: std::fmt::Display + std::fmt::Debug>(
error: FrameworkError<'_, U, E>,
) -> Result<(), serenity_prelude::Error> {
match error {
Expand Down

0 comments on commit 6e6db2b

Please sign in to comment.