@@ -31,7 +31,7 @@ def start_command(self, bot, chat):
3131 message .append ("" )
3232 message .append (bot ._ ("Use /help to get a list of all the commands." ))
3333
34- chat .send ("\n " .join (message ))
34+ chat .send ("\n " .join (message ), syntax = "html" )
3535
3636 @decorators .help_message_for (start_command )
3737 def _start_command_help (bot ):
@@ -45,19 +45,20 @@ def _start_command_help(bot):
4545 def help_command (self , bot , chat , args ):
4646 commands = bot ._get_commands ()
4747 if len (args ) > 1 :
48- message = [bot ._ ("* Error!* The ` /help` command allows up to one "
49- "argument." )]
48+ message = [bot ._ ("<b> Error!</b> The <code> /help</code> command "
49+ "allows up to one argument." )]
5050 elif len (args ) == 1 :
5151 if args [0 ] in commands :
5252 message = self ._help_command_message (bot , commands , args [0 ])
5353 else :
54- message = [bot ._ ("*Unknown command:* `/%(name)s`" ,
54+ message = [bot ._ ("<b>Unknown command:</b> "
55+ "<code>/%(name)s</code>" ,
5556 name = args [0 ]),
5657 bot ._ ("Use /help to get a list of the commands." )]
5758 else :
5859 message = self ._help_generic_message (bot , commands )
5960
60- chat .send ("\n " .join (message ))
61+ chat .send ("\n " .join (message ), syntax = "html" )
6162
6263 def _help_generic_message (self , bot , commands ):
6364 """Generate an help message"""
@@ -74,7 +75,7 @@ def _help_generic_message(self, bot, commands):
7475
7576 # Show help on commands
7677 if len (commands ) > 0 :
77- message .append (bot ._ ("* This bot supports those commands:* " ))
78+ message .append (bot ._ ("<b> This bot supports those commands:</b> " ))
7879 for name in sorted (commands .keys ()):
7980 # Allow to hide commands in the help message
8081 if name in bot .hide_commands :
@@ -83,12 +84,13 @@ def _help_generic_message(self, bot, commands):
8384 func = commands [name ]
8485 docstring = utils .docstring_of (func , bot , format = True ) \
8586 .split ("\n " , 1 )[0 ]
86- message .append ("/%s `-` %s" % (name , docstring ))
87+ message .append ("/%s <code>-</code> %s" % (name , docstring ))
8788 message .append ("" )
88- message .append (bot ._ ("You can also use `/help <command>` to get "
89- "help about a specific command." ))
89+ message .append (bot ._ ("You can also use <code>/help <command>"
90+ "</code> to get help about a specific "
91+ "command." ))
9092 else :
91- message .append (bot ._ ("_This bot has no commands._ " ))
93+ message .append (bot ._ ("<i>This bot has no commands.</i> " ))
9294
9395 if len (bot .after_help ):
9496 message .append ("" )
@@ -109,7 +111,7 @@ def _help_command_message(self, bot, commands, command):
109111
110112 func = commands [command ]
111113 docstring = utils .docstring_of (func , bot , format = True )
112- message .append ("/%s `-` %s" % (command , docstring ))
114+ message .append ("/%s <code>-</code> %s" % (command , docstring ))
113115
114116 # Show the owner informations
115117 if bot .owner :
@@ -125,8 +127,8 @@ def _help_command_help(bot):
125127 """Get the help message of this command"""
126128 return "\n " .join ([
127129 bot ._ ("Show this help message." ),
128- bot ._ ("You can also use ` /help < command>` to get help about a "
129- "specific command." ),
130+ bot ._ ("You can also use <code> /help < command></code> to get "
131+ "help about a specific command." ),
130132 ])
131133
132134 # An hook which displays "Command not found" if needed
@@ -148,7 +150,8 @@ def no_commands_hook(self, bot, chat, message):
148150 single_user = chat .type == "private"
149151 if mentioned or single_user :
150152 chat .send ("\n " .join ([
151- bot ._ ("*Unknown command:* `/%(name)s`" , name = command ),
153+ bot ._ ("<b>Unknown command:</b> <code>/%(name)s</code>" ,
154+ name = command ),
152155 bot ._ ("Use /help to get a list of the commands." ),
153- ]))
156+ ]), syntax = "html" )
154157 return True
0 commit comments