diff --git a/README.md b/README.md index 335372de..af999fa2 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# Starboard-4 -A feature-rich and reliable Starboard bot, trusted by thousands of servers. +# starboard-4 +A pretty good starboard bot. - - [Invite Starboard](https://discord.com/api/oauth2/authorize?client_id=700796664276844612&permissions=275683339328&scope=applications.commands%20bot) - - [Get Support](https://discord.gg/3gK8mSA) - - [Documentation](https://starboard.best) + - [invite](https://discord.com/api/oauth2/authorize?client_id=700796664276844612&permissions=275683339328&scope=applications.commands%20bot) + - [support](https://discord.gg/3gK8mSA) + - [docs](https://starboard.best) ## Features - Multiple starboards per server diff --git a/compose.yml b/compose.yml index 40ac365c..3f7998b3 100644 --- a/compose.yml +++ b/compose.yml @@ -29,7 +29,6 @@ services: environment: SB_DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB} restart: unless-stopped - depends_on: [postgres] volumes: postgres-data: diff --git a/src/constants.rs b/src/constants.rs index 2fd548dc..a471ef73 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -17,8 +17,6 @@ pub const INVITE_URL: &str = "https://discord.com/api/oauth2/authorize?client_id pub const SUPPORT_URL: &str = "https://discord.gg/3gK8mSA"; pub const SOURCE_URL: &str = "https://github.com/CircuitSacul/Starboard-4"; pub const PATREON_URL: &str = "https://patreon.com/CircuitSacul"; -pub const VOTE_URL: &str = "https://top.gg/bot/700796664276844612/vote"; -pub const REVIEW_URL: &str = "https://top.gg/bot/700796664276844612#reviews"; // Docs pub const DOCS_URL: &str = "https://docs.starboard.best"; diff --git a/src/core/emoji.rs b/src/core/emoji.rs index ebd1d2b5..347f1729 100644 --- a/src/core/emoji.rs +++ b/src/core/emoji.rs @@ -25,7 +25,7 @@ pub fn qualify_emoji(target: &str) -> &str { } pub fn compare_unicode_emojis(left: &str, right: &str) -> bool { - qualify_emoji(left) == qualify_emoji(right) + remove_v16(qualify_emoji(left)) == remove_v16(qualify_emoji(right)) } #[derive(Clone)] @@ -106,7 +106,7 @@ impl SimpleEmoji { } } else { RequestReactionType::Unicode { - name: remove_v16(qualify_emoji(&self.raw)), + name: qualify_emoji(&self.raw), } } } diff --git a/src/database/validation/name.rs b/src/database/validation/name.rs index effa483b..b614b468 100644 --- a/src/database/validation/name.rs +++ b/src/database/validation/name.rs @@ -15,8 +15,11 @@ pub fn validate_name(name: &str) -> Result { .filter(|c| c.is_ascii_digit() || c.is_ascii_lowercase() || *c == '_' || *c == '-') .collect(); - if filtered.len() < 3 { - Err("The name must be at least 3 characters (special characters are excluded).".to_string()) + if filtered.len() < constants::MIN_NAME_LENGTH as usize { + Err(format!( + "The name must be at least {} characters (special characters are excluded).", + constants::MIN_NAME_LENGTH + )) } else { Ok(filtered) } diff --git a/src/interactions/commands/chat/help.rs b/src/interactions/commands/chat/help.rs index 4a863cee..b6dc7238 100644 --- a/src/interactions/commands/chat/help.rs +++ b/src/interactions/commands/chat/help.rs @@ -47,20 +47,22 @@ pub struct Help; impl Help { pub async fn callback(self, mut ctx: CommandCtx) -> StarboardResult<()> { let emb = embed::build() - .title("Starboard - The Best Discord Starboard") - .description("Starboard is a reliable and feature-rich starboard bot for Discord.") + .title("Starboard") + .description("A pretty good starboard bot.") .field(EmbedFieldBuilder::new( - "Useful Commands", + "Getting Started", concat!( - "`/starboards view`: View all of your starboards.\n", - "`/starboards create`: Create a new starboard.\n", - "`/starboards edit`: Edit the configuration for a starboard.\n", + "Get started by running `/starboards create` to create a starboard, and\n", + "then `/starboards edit requirements` to change requirement settings.\n", + "- `required`: how many upvotes a message needs\n", + "- `upvote-emojis`: what emojis count as upvotes\n", + "- `self-vote`: whether you can vote on your own messages\n\n", + "All other commands and settings are available in the docs." ), )) .field(EmbedFieldBuilder::new( - "Starboard's Features", + "Features", concat!( - "Starboard's key free features are:\n", "- Multiple starboards\n", "- Custom avatar/username for starboards (via webhooks)\n", "- Autostar channels\n", @@ -68,16 +70,6 @@ impl Help { "- Limited per-role starboard configuration\n", ), )) - .field(EmbedFieldBuilder::new( - "Support Starboard", - concat_format!( - "If you like Starboard and want to support it, you can do "; - "so by [voting]({}) or " <- constants::VOTE_URL; - "[leaving a review]({}) " <- constants::REVIEW_URL; - "on Top.GG.\n\nIf you really want, you can also get Starboard Premium "; - "by [becoming a patron]({})." <- constants::PATREON_URL; - ), - )) .field(EmbedFieldBuilder::new( "Starboard Premium", concat_format!(