update help messages, change .part to be more robust
This commit is contained in:
parent
bf896dfe4e
commit
b9cc5e9603
|
@ -25,6 +25,9 @@ def join(bot, trigger):
|
|||
def part(bot, trigger):
|
||||
"""Part the specified channel. This is an admin-only command."""
|
||||
channel, _, part_msg = trigger.group(2).partition(' ')
|
||||
if not channel.startswith("#"):
|
||||
part_msg = channel
|
||||
channel = ""
|
||||
if not channel:
|
||||
channel = trigger.channel
|
||||
if part_msg:
|
||||
|
|
|
@ -58,10 +58,11 @@ def setup(bot):
|
|||
def seen(bot, trigger):
|
||||
"""
|
||||
Reports when and where the user was last/first seen.
|
||||
--last [-l] reports when the user was last seen. This is the default.
|
||||
--first [-f] reports when the user was first seen.
|
||||
--message [-m] includes the first/last message the user sent.
|
||||
--context [-c] includes irc logs before and after their last message as context. Implies --message.
|
||||
|
||||
-l, --last - reports when the user was last seen. This is the default.
|
||||
-f, --first - reports when the user was first seen.
|
||||
-m, --message - includes the first/last message the user sent.
|
||||
-c, --context - includes irc logs before and after their last message as context. Implies --message.
|
||||
"""
|
||||
if not trigger.group(2):
|
||||
return bot.reply("Seen who?")
|
||||
|
|
|
@ -32,11 +32,16 @@ def translate(text, in_lang='auto', out_lang='en'):
|
|||
|
||||
|
||||
@commands('translate', 'tr')
|
||||
@example('.tr :en :fr my dog', '"mon chien" (en to fr, translate.google.com)')
|
||||
@example('.tr -i en -o fr my dog', '"mon chien" (en to fr, translate.google.com)')
|
||||
@example('.tr היי', '"Hey" (iw to en, translate.google.com)')
|
||||
@example('.tr mon chien', '"my dog" (fr to en, translate.google.com)')
|
||||
def tr2(bot, trigger):
|
||||
"""Translates a phrase, with an optional language hint."""
|
||||
"""
|
||||
Translates a phrase, with an optional language hint.
|
||||
|
||||
-i LANG, --inlang LANG - specifies the assumed input language.
|
||||
-o LANG, --outlang LANG - specifies the desired output language.
|
||||
"""
|
||||
if not trigger.group(2):
|
||||
return bot.reply("Translate what?")
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user