@@ -97,6 +97,10 @@ pub fn load_english_messages(dict: &mut ErrorDictionary) {
9797 DictionaryMessage :: new ( "Failed to create thread" )
9898 . with_description ( "An error occurred while creating the support thread" ) ,
9999 ) ;
100+ dict. messages . insert (
101+ "snippet.already_exist" . to_string ( ) ,
102+ DictionaryMessage :: new ( "The snippet with key '{key}' already exists." ) ,
103+ ) ;
100104 dict. messages . insert (
101105 "thread.user_still_in_server" . to_string ( ) ,
102106 DictionaryMessage :: new ( "User still in the server." )
@@ -722,6 +726,10 @@ pub fn load_english_messages(dict: &mut ErrorDictionary) {
722726 "slash_command.reply_message_argument_description" . to_string ( ) ,
723727 DictionaryMessage :: new ( "The content of the message to send to the user" ) ,
724728 ) ;
729+ dict. messages . insert (
730+ "slash_command.reply_snippet_argument_description" . to_string ( ) ,
731+ DictionaryMessage :: new ( "Use a snippet instead of typing a message" ) ,
732+ ) ;
725733 dict. messages . insert (
726734 "slash_command.reply_attachment_argument_description" . to_string ( ) ,
727735 DictionaryMessage :: new ( "An optional attachment to send to the user" ) ,
@@ -952,11 +960,25 @@ pub fn load_english_messages(dict: &mut ErrorDictionary) {
952960 DictionaryMessage :: new ( "## Latency\n \n Gateway latency: **{gateway_latency}** ms\n Minimal REST latency (GET /gateway): **{api_latency}** ms\n REST latency (message send): **{message_latency}** ms" ) ,
953961 ) ;
954962
955- // Snippet commands
956963 dict. messages . insert (
957964 "slash_command.snippet_command_description" . to_string ( ) ,
958965 DictionaryMessage :: new ( "Manage message snippets/templates" ) ,
959966 ) ;
967+ dict. messages . insert (
968+ "slash_command.snippet_command_help" . to_string ( ) ,
969+ DictionaryMessage :: new (
970+ "Manage message snippets/templates\n \n \
971+ **Subcommands:**\n \
972+ • `/snippet create <key> <content>` - Create a new snippet\n \
973+ • `/snippet list` - List all available snippets\n \
974+ • `/snippet show <key>` - Display a specific snippet's content\n \
975+ • `/snippet edit <key> <content>` - Update an existing snippet\n \
976+ • `/snippet delete <key>` - Delete a snippet\n \n \
977+ **Usage:**\n \
978+ • Slash command: `/reply snippet:<key>`\n \
979+ • Text command: `!reply {{key}}`",
980+ ) ,
981+ ) ;
960982 dict. messages . insert (
961983 "slash_command.snippet_create_description" . to_string ( ) ,
962984 DictionaryMessage :: new ( "Create a new snippet" ) ,
@@ -992,7 +1014,9 @@ pub fn load_english_messages(dict: &mut ErrorDictionary) {
9921014
9931015 dict. messages . insert (
9941016 "snippet.invalid_key_format" . to_string ( ) ,
995- DictionaryMessage :: new ( "Snippet key must contain only alphanumeric characters, dashes, and underscores." ) ,
1017+ DictionaryMessage :: new (
1018+ "Snippet key must contain only alphanumeric characters, dashes, and underscores." ,
1019+ ) ,
9961020 ) ;
9971021 dict. messages . insert (
9981022 "snippet.content_too_long" . to_string ( ) ,
@@ -1030,6 +1054,10 @@ pub fn load_english_messages(dict: &mut ErrorDictionary) {
10301054 "snippet.list_empty" . to_string ( ) ,
10311055 DictionaryMessage :: new ( "No snippets found." ) ,
10321056 ) ;
1057+ dict. messages . insert (
1058+ "snippet.no_snippets_found" . to_string ( ) ,
1059+ DictionaryMessage :: new ( "No snippets found." ) ,
1060+ ) ;
10331061 dict. messages . insert (
10341062 "snippet.list_title" . to_string ( ) ,
10351063 DictionaryMessage :: new ( "📝 Available Snippets" ) ,
@@ -1076,6 +1104,8 @@ pub fn load_english_messages(dict: &mut ErrorDictionary) {
10761104 ) ;
10771105 dict. messages . insert (
10781106 "snippet.unknown_text_subcommand" . to_string ( ) ,
1079- DictionaryMessage :: new ( "Unknown subcommand. Use: `create`, `list`, `show`, `edit`, or `delete`" ) ,
1107+ DictionaryMessage :: new (
1108+ "Unknown subcommand. Use: `create`, `list`, `show`, `edit`, or `delete`" ,
1109+ ) ,
10801110 ) ;
10811111}
0 commit comments