Explorar o código

Modifying plugin generator to update the plugins base module

Kirk Trombley %!s(int64=6) %!d(string=hai) anos
pai
achega
973a39f1de
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      mkplugin.sh

+ 3 - 2
mkplugin.sh

@@ -31,5 +31,6 @@ echo "@as_plugin(\"$1\")" >> $PLUGIN_FILE
 echo "def $1(db, msg):" >> $PLUGIN_FILE
 echo "    return RollbotResponse(msg, txt=\"My first plugin!\")" >> $PLUGIN_FILE
 
-echo "Action required: Insert the following line into the [plugins] section of config/config.toml to activate $1"
-echo "$1 = [ \"$1\" ]"
+echo "import plugins.$1" >> ./src/plugins/__init__.py
+
+echo "Done! Plugin is ready for you to edit at $PLUGIN_FILE, you do not need to modify any configuration!"