Эх сурвалжийг харах

Modifying plugin generator to update the plugins base module

Kirk Trombley 6 жил өмнө
parent
commit
973a39f1de
1 өөрчлөгдсөн 3 нэмэгдсэн , 2 устгасан
  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!"