Skip to content
Permalink
Browse files
Added update function
  • Loading branch information
hollan84 committed May 13, 2020
1 parent 7b5f763 commit 97c80d97d8308a09be0935d1006c4a8247d59452
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
@@ -1,2 +1,3 @@
sleep 2
git pull
./start.sh
@@ -1,13 +1,19 @@
import database
import os
import time

def developer_modify(message):
msg = ""
command = message[1]
if command == "deploy":
deploy = True
os.system("./deploy.sh")
exit()
elif command == "start":
start = True
return "This is WIP and currently doesn't work"
elif command == "restart":
os.system("./start.sh")
exit()
if len(message) >= 2:
if command == "data":
if message[2] == "*":
@@ -47,7 +53,7 @@ def developer_modify(message):
def check_message(message, author, guild_id):
message = message.split()
if len(message) == 1:
return "Please specify a command"
return "Please specify a command, use {}prefix for help"(database.read_database("command_prefix", guild_id))
if message[1] == "help":
dev_help = {
"restart" : "Restart all bots",
@@ -59,7 +65,11 @@ def check_message(message, author, guild_id):
}
msg = ""
for i in dev_help:
fw = i.split()
if fw[0] in message:
return "{}{} - {}".format(database.read_database("command_prefix", guild_id), i, dev_help[i])
msg = "{} - {}developers {}\n".format(msg, database.read_database("command_prefix", guild_id), i)
msg = "{}You can use {}developers help [developer command] to get more information on that command".format(msg, database.read_database("command_prefix", guild_id))
return msg
if database.permission_check(message[1], author):
return developer_modify(message)
3 run.py
@@ -2,9 +2,12 @@ def run():

from lib import librarySetup
from lib import databaseSetup
from lib import shell
librarySetup.checkLibraries() #Check and install libraries
databaseSetup.main() #Create database

shell.permissions()

from lib import setup
#from lib import online
import os
@@ -1 +1,2 @@
sleep 5
python3 run.py

0 comments on commit 97c80d9

Please sign in to comment.