change instances of discord.js to discord.py

This commit is contained in:
Omar Kamel 2021-01-06 17:11:34 -05:00 committed by GitHub
parent e6e5c74c22
commit 2b3fe08a30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,7 @@
},
"scripts": {
"installation": {
"script": "#!\/bin\/bash\r\n# Python Bot Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y git make gcc g++ python python-dev libtool\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nif [[ ! \"${USERNAME}\" == \"\" ]]; then\r\n if [[ ! https:\/\/${USERNAME}:${PASSWORD}@github.com\/${INSTALL_REPO}.git = *\\.git ]]; then\r\n INSTALL_REPO=$(echo -e https:\/\/${USERNAME}:${PASSWORD}@github.com\/${INSTALL_REPO}.git | sed 's:\/*$::')\r\n INSTALL_REPO=\"https:\/\/${USERNAME}:${PASSWORD}@github.com\/${INSTALL_REPO}.git\"\r\n fi\r\n \r\n echo -e \"working on installing a discord.js bot from https:\/\/${USERNAME}:${PASSWORD}@github.com\/${INSTALL_REPO}.git\"\r\n \r\n if [ \"${USER_UPLOAD}\" == \"true\" ] || [ \"${USER_UPLOAD}\" == \"1\" ]; then\r\n \techo -e \"assuming user knows what they are doing have a good day.\"\r\n \texit 0\r\n else\r\n \tif [ \"$(ls -A \/mnt\/server)\" ]; then\r\n \t\techo -e \"\/mnt\/server directory is not empty.\"\r\n \t if [ -d .git ]; then\r\n \t\t\techo -e \".git directory exists\" \r\n \t\t\tif [ -f .git\/config ]; then\r\n \t\t\t\techo -e \"loading info from git config\"\r\n \t\t\t\tORIGIN=$(git config --get remote.origin.url)\r\n \t\t\telse\r\n \t\t\t\techo -e \"files found with no git config\"\r\n \t\t\t\techo -e \"closing out without touching things to not break anything\"\r\n \t\t\t\texit 10\r\n \t\t\tfi\r\n \t\tfi\r\n \t\tif [ \"${ORIGIN}\" == \"https:\/\/${USERNAME}:${PASSWORD}@github.com\/${INSTALL_REPO}.git\" ]; then\r\n \t\t\techo \"pulling latest from github\"\r\n \t\t\tgit pull \r\n \t\tfi\r\n \telse\r\n \techo -e \"\/mnt\/server is empty.\\ncloning files into repo\"\r\n \t\tif [ -z ${INSTALL_BRANCH} ]; then\r\n \t\t\techo -e \"assuming master branch\"\r\n \t\t\tINSTALL_BRANCH=master\r\n \t\tfi\r\n \r\n \t\techo -e \"running 'git clone --single-branch --branch ${INSTALL_BRANCH} https:\/\/${USERNAME}:${PASSWORD}@github.com\/${INSTALL_REPO}.git .'\"\r\n \t\tgit clone --single-branch --branch ${INSTALL_BRANCH} https:\/\/${USERNAME}:${PASSWORD}@github.com\/${INSTALL_REPO}.git .\r\n \tfi\r\n fi \r\nelse\r\n if [[ ! ${INSTALL_REPO} = *\\.git ]]; then\r\n INSTALL_REPO=$(echo -e ${INSTALL_REPO} | sed 's:\/*$::')\r\n INSTALL_REPO=\"${INSTALL_REPO}.git\"\r\n fi\r\n \r\n echo -e \"working on installing a discord.js bot from ${INSTALL_REPO}\"\r\n \r\n if [ \"${USER_UPLOAD}\" == \"true\" ] || [ \"${USER_UPLOAD}\" == \"1\" ]; then\r\n \techo -e \"assuming user knows what they are doing have a good day.\"\r\n \texit 0\r\n else\r\n \tif [ \"$(ls -A \/mnt\/server)\" ]; then\r\n \t\techo -e \"\/mnt\/server directory is not empty.\"\r\n \t if [ -d .git ]; then\r\n \t\t\techo -e \".git directory exists\" \r\n \t\t\tif [ -f .git\/config ]; then\r\n \t\t\t\techo -e \"loading info from git config\"\r\n \t\t\t\tORIGIN=$(git config --get remote.origin.url)\r\n \t\t\telse\r\n \t\t\t\techo -e \"files found with no git config\"\r\n \t\t\t\techo -e \"closing out without touching things to not break anything\"\r\n \t\t\t\texit 10\r\n \t\t\tfi\r\n \t\tfi\r\n \t\tif [ \"${ORIGIN}\" == \"${INSTALL_REPO}\" ]; then\r\n \t\t\techo \"pulling latest from github\"\r\n \t\t\tgit pull \r\n \t\tfi\r\n \telse\r\n \techo -e \"\/mnt\/server is empty.\\ncloning files into repo\"\r\n \t\tif [ -z ${INSTALL_BRANCH} ]; then\r\n \t\t\techo -e \"assuming master branch\"\r\n \t\t\tINSTALL_BRANCH=master\r\n \t\tfi\r\n \r\n \t\techo -e \"running 'git clone --single-branch --branch ${INSTALL_BRANCH} ${INSTALL_REPO} .'\"\r\n \t\tgit clone --single-branch --branch ${INSTALL_BRANCH} ${INSTALL_REPO} .\r\n \tfi\r\n fi \r\nfi\r\n\r\necho \"Installing python requirements into folder\"\r\nif [[ ! -z ${PY_PACKAGES} ]]; then\r\n pip install -U --target \/mnt\/server\/ ${PY_PACKAGES}\r\nfi\r\n\r\nif [ -f \/mnt\/server\/requirements.txt ]; then\r\n pip install -U --target \/mnt\/server\/ -r requirements.txt\r\nfi\r\n\r\necho -e \"install complete\"\r\nexit 0",
"script": "#!\/bin\/bash\r\n# Python Bot Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napt update\r\napt install -y git make gcc g++ python python-dev libtool\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nif [[ ! \"${USERNAME}\" == \"\" ]]; then\r\n if [[ ! https:\/\/${USERNAME}:${PASSWORD}@github.com\/${INSTALL_REPO}.git = *\\.git ]]; then\r\n INSTALL_REPO=$(echo -e https:\/\/${USERNAME}:${PASSWORD}@github.com\/${INSTALL_REPO}.git | sed 's:\/*$::')\r\n INSTALL_REPO=\"https:\/\/${USERNAME}:${PASSWORD}@github.com\/${INSTALL_REPO}.git\"\r\n fi\r\n \r\n echo -e \"working on installing a discord.py bot from https:\/\/${USERNAME}:${PASSWORD}@github.com\/${INSTALL_REPO}.git\"\r\n \r\n if [ \"${USER_UPLOAD}\" == \"true\" ] || [ \"${USER_UPLOAD}\" == \"1\" ]; then\r\n \techo -e \"assuming user knows what they are doing have a good day.\"\r\n \texit 0\r\n else\r\n \tif [ \"$(ls -A \/mnt\/server)\" ]; then\r\n \t\techo -e \"\/mnt\/server directory is not empty.\"\r\n \t if [ -d .git ]; then\r\n \t\t\techo -e \".git directory exists\" \r\n \t\t\tif [ -f .git\/config ]; then\r\n \t\t\t\techo -e \"loading info from git config\"\r\n \t\t\t\tORIGIN=$(git config --get remote.origin.url)\r\n \t\t\telse\r\n \t\t\t\techo -e \"files found with no git config\"\r\n \t\t\t\techo -e \"closing out without touching things to not break anything\"\r\n \t\t\t\texit 10\r\n \t\t\tfi\r\n \t\tfi\r\n \t\tif [ \"${ORIGIN}\" == \"https:\/\/${USERNAME}:${PASSWORD}@github.com\/${INSTALL_REPO}.git\" ]; then\r\n \t\t\techo \"pulling latest from github\"\r\n \t\t\tgit pull \r\n \t\tfi\r\n \telse\r\n \techo -e \"\/mnt\/server is empty.\\ncloning files into repo\"\r\n \t\tif [ -z ${INSTALL_BRANCH} ]; then\r\n \t\t\techo -e \"assuming master branch\"\r\n \t\t\tINSTALL_BRANCH=master\r\n \t\tfi\r\n \r\n \t\techo -e \"running 'git clone --single-branch --branch ${INSTALL_BRANCH} https:\/\/${USERNAME}:${PASSWORD}@github.com\/${INSTALL_REPO}.git .'\"\r\n \t\tgit clone --single-branch --branch ${INSTALL_BRANCH} https:\/\/${USERNAME}:${PASSWORD}@github.com\/${INSTALL_REPO}.git .\r\n \tfi\r\n fi \r\nelse\r\n if [[ ! ${INSTALL_REPO} = *\\.git ]]; then\r\n INSTALL_REPO=$(echo -e ${INSTALL_REPO} | sed 's:\/*$::')\r\n INSTALL_REPO=\"${INSTALL_REPO}.git\"\r\n fi\r\n \r\n echo -e \"working on installing a discord.py bot from ${INSTALL_REPO}\"\r\n \r\n if [ \"${USER_UPLOAD}\" == \"true\" ] || [ \"${USER_UPLOAD}\" == \"1\" ]; then\r\n \techo -e \"assuming user knows what they are doing have a good day.\"\r\n \texit 0\r\n else\r\n \tif [ \"$(ls -A \/mnt\/server)\" ]; then\r\n \t\techo -e \"\/mnt\/server directory is not empty.\"\r\n \t if [ -d .git ]; then\r\n \t\t\techo -e \".git directory exists\" \r\n \t\t\tif [ -f .git\/config ]; then\r\n \t\t\t\techo -e \"loading info from git config\"\r\n \t\t\t\tORIGIN=$(git config --get remote.origin.url)\r\n \t\t\telse\r\n \t\t\t\techo -e \"files found with no git config\"\r\n \t\t\t\techo -e \"closing out without touching things to not break anything\"\r\n \t\t\t\texit 10\r\n \t\t\tfi\r\n \t\tfi\r\n \t\tif [ \"${ORIGIN}\" == \"${INSTALL_REPO}\" ]; then\r\n \t\t\techo \"pulling latest from github\"\r\n \t\t\tgit pull \r\n \t\tfi\r\n \telse\r\n \techo -e \"\/mnt\/server is empty.\\ncloning files into repo\"\r\n \t\tif [ -z ${INSTALL_BRANCH} ]; then\r\n \t\t\techo -e \"assuming master branch\"\r\n \t\t\tINSTALL_BRANCH=master\r\n \t\tfi\r\n \r\n \t\techo -e \"running 'git clone --single-branch --branch ${INSTALL_BRANCH} ${INSTALL_REPO} .'\"\r\n \t\tgit clone --single-branch --branch ${INSTALL_BRANCH} ${INSTALL_REPO} .\r\n \tfi\r\n fi \r\nfi\r\n\r\necho \"Installing python requirements into folder\"\r\nif [[ ! -z ${PY_PACKAGES} ]]; then\r\n pip install -U --target \/mnt\/server\/ ${PY_PACKAGES}\r\nfi\r\n\r\nif [ -f \/mnt\/server\/requirements.txt ]; then\r\n pip install -U --target \/mnt\/server\/ -r requirements.txt\r\nfi\r\n\r\necho -e \"install complete\"\r\nexit 0",
"container": "python:3.8-slim",
"entrypoint": "bash"
}