diff --git a/docs/USING_WRAP b/docs/USING_WRAP index 8d0e85469..55d057d03 100644 --- a/docs/USING_WRAP +++ b/docs/USING_WRAP @@ -32,7 +32,7 @@ the following import line: This will allow you to access the wrap command (and it allows you to do it without the commands prefix. Note that this line is added to the imports of -plugin templates generated by the supybot-newplugin script. +plugin templates generated by the supybot-plugin-create script. Let's write a quickie command that uses wrap to get a feel for how it makes our lives better. Let's write a command that repeats a string of text a given @@ -41,7 +41,7 @@ Not a very useful command, but it will serve our purpose just fine. Here's how it would be done without wrap: def repeat(self, irc, msg, args): - """ + """ Repeats times. """ @@ -50,10 +50,9 @@ it would be done without wrap: num = int(num) except ValueError: raise callbacks.ArgumentError - return irc.reply(num * text) -Note that all of the argument validation and parsing takes up 6 of the 7 lines +Note that all of the argument validation and parsing takes up 5 of the 6 lines (and you should have seen it before we had privmsg.getArgs!). Now, here's what our command will look like with wrap applied: @@ -194,7 +193,7 @@ optional, the default value is shown. "now" Simply returns the current timestamp as an arg, does not reference or - modify the argument list. + modify the argument list. "url" Checks for a valid URL.