Browse Source

Merge pull request #48 from MrCakeSlayer/patch-3

Fix error message typo when creating slash commands
pull/1923/head
Quin Lynch GitHub 4 years ago
parent
commit
272af70019
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Discord.Net.Core/Entities/Interactions/SlashCommandBuilder.cs

+ 1
- 1
src/Discord.Net.Core/Entities/Interactions/SlashCommandBuilder.cs View File

@@ -43,7 +43,7 @@ namespace Discord
// Discord updated the docs, this regex prevents special characters like @!$%(... etc,
// https://discord.com/developers/docs/interactions/slash-commands#applicationcommand
if (!Regex.IsMatch(value, @"^[\w-]{3,32}$"))
throw new ArgumentException("Command name cannot contian any special characters or whitespaces!");
throw new ArgumentException("Command name cannot contain any special characters or whitespaces!");

_name = value;
}


Loading…
Cancel
Save