Updated command to 'tw' from 't'. Added Help

This patch changes the command name from 't' to 'tw' to
help with conflicts from other plugins.

Also added help
This commit is contained in:
Hemna 2021-10-25 14:48:00 -04:00
parent e82d01ae01
commit 7a590c5581

View File

@ -10,13 +10,20 @@ LOG = logging.getLogger("APRSD")
class SendTweetPlugin(plugin.APRSDRegexCommandPluginBase): class SendTweetPlugin(plugin.APRSDRegexCommandPluginBase):
version = "1.0" version = "1.0"
# Look for any command that starts with w or W # Look for any command that starts with tw or tW or TW or Tw
command_regex = "^[tT]" command_regex = "^[tT][wW]"
# the command is for ? # the command is for ?
command_name = "tweet" command_name = "tweet"
enabled = False enabled = False
def help(self):
_help = [
"twitter: Send a Tweet!!",
"twitter: Format 'tw <message>'",
]
return _help
def setup(self): def setup(self):
# Do some checks here? # Do some checks here?
self.enabled = True self.enabled = True