From fc56cf776e9e20234c62b6ee2e124d081250e3cb Mon Sep 17 00:00:00 2001 From: Alastair Holland Date: Sun, 3 May 2020 16:49:49 +0100 Subject: [PATCH] Added custom file template --- lib/__pycache__/setup.cpython-36.pyc | Bin 3904 -> 3927 bytes lib/setup.py | 1 + templates/customTemplate.py | 17 ++++++++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/__pycache__/setup.cpython-36.pyc b/lib/__pycache__/setup.cpython-36.pyc index a0f63a4faca478f02be274f3a164ab5519a6c035..bf559593728e7cac84462972ef502825784301f1 100755 GIT binary patch delta 915 zcmZ9K%Wl&^6ox&%towp>aJDVIXoAc5Ec0)#5WVuX+@1z~&9#f*aL z7YOnT@Bj!2x_|`>mb?KhD^v-@5;iPY@Xy$))GU&7Jo^9doH=JcdtW_s-LlL-Ki)pJ zTCdFO#C~_XPlgSq_$BJP3eU@|g{&BvjQDw~$AmgfB_>SY$&E;`8)>v16K*n-)^}8# z?9mQ42c~pR!)aztW6b#;P7lr!D`n14w988aGbgPll7FN72g84idcyiqDWSi z&I?w!J;bLiK8QjIx9I|Rc5gC=E}*a)yrGMJj@c+yOIu(yX?q=&S&g0qzRv2t!>ZE1 z#2sdf*>QWMzIggTK@-ceiL@P|7uR%HL$oA3EV-psYlF3MWzyGXhbw#{oAN14c_N!~ z{@9eYU=QOsjSeT-q#OsL9ETP@L6(j~?C=aUP1cl~(1MrrEN>19IA0a#S)FsJ)6D7= zl5bjd_zQ|PD5ltyq$6hZFGutPXx5=|nVZpn((~LsqPrRW0_bi=FCM#v9&Ccq2cyMW zvJRrCb7!Q7t4PH)^q@~yczdAJ4g9Ci?;?=x3~7!bp8<oMzUQw{10qN@Pz;X delta 811 zcmZuvJ#W)c6!o)Rr##0YAEb`sG;JEv&{DoqNcbqFY)DLi1PiJd?&M0Auno#^A050g z1zF+;Ffk#O?x;V2xiF!sVrFDQi0hZ9N+1UN9$lSt&w2N~FYSXiUw0h7`u)T9k@tpg zF>CMsklp2|1vYq|CJG5h78Jlt8B|;?WoYhL6BdPu0nL;NjvQ(`I(5e23m#6Dt?V=N zci$6do;Wtzit`cL!d9FGnr^G<)?d?&s7%U5QWmion5mXmaB`RU2cZ%nBWhAc7U1S zyiA*Q)n;e^+3XQOw!Dcpw&^D5c`=PpDb<*k%)qVem)W~>NN7Xek@iS~+oFRVnT)DR n_LI;w+3%#9YbjgKrEg_(|JlrfzW=(gXR+gKqcqB1l#c%ZlDpZ$ diff --git a/lib/setup.py b/lib/setup.py index c37ceec..4c4cbca 100755 --- a/lib/setup.py +++ b/lib/setup.py @@ -33,6 +33,7 @@ def environment(): externalIP = serverIP else: serverIP = os.environ['SERVER'] + externalIP = os.environ['EXTSERVER'] if str(settingList.index("Port")+1) in settingsChoice: port = input("Input your bot port here (If you don't know it, leave blank) > ") if port == "": diff --git a/templates/customTemplate.py b/templates/customTemplate.py index 018bd18..47b29f8 100755 --- a/templates/customTemplate.py +++ b/templates/customTemplate.py @@ -1 +1,16 @@ -#Test \ No newline at end of file +def customCode(inputMessage): + prefix = os.environ['PREFIX'] #This gets the prefix + if not inputMessage[:len(prefix)]: #Checks to see if the prefix is at the start of the message + return #If it isn't, ignore the rest of the code + '''Do not modify any code above this''' + + + if message == "example": + message = "This is an example of the custom code you can write" + elif message == "example2" + message = "This is also an example of the custom code you can write" + + + + '''Do not modify any code below this''' + return message #Send the message back to the main program \ No newline at end of file