From 9229b1a16f08abcbb777085b4ce19b62f68aed4a Mon Sep 17 00:00:00 2001 From: williamsandak Date: Wed, 14 Jun 2023 08:31:28 +0000 Subject: [PATCH] Initial commit --- .gitignore | 132 +++++++++++++++++++++++++++++++++++++++++++++++ Procfile | 1 + README.md | 1 + requirements.txt | 1 + runtime.txt | 1 + src/Main.py | 23 +++++++++ 6 files changed, 159 insertions(+) create mode 100644 .gitignore create mode 100644 Procfile create mode 100644 README.md create mode 100644 requirements.txt create mode 100644 runtime.txt create mode 100644 src/Main.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aa8a35c --- /dev/null +++ b/.gitignore @@ -0,0 +1,132 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# Prettier +.prettierrc diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..0149621 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: python3 src/Main.py \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..3a787ec --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2FuhIgnacio%2Fdiscord-railway&envs=TOKEN%2CPREFIX&TOKENDesc=bot+token&PREFIXDesc=bot+prefix&referralCode=igna) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..c1f996d --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +nextcord diff --git a/runtime.txt b/runtime.txt new file mode 100644 index 0000000..946d2ad --- /dev/null +++ b/runtime.txt @@ -0,0 +1 @@ +python-3.8.12 \ No newline at end of file diff --git a/src/Main.py b/src/Main.py new file mode 100644 index 0000000..11fd784 --- /dev/null +++ b/src/Main.py @@ -0,0 +1,23 @@ +import nextcord +import os + +from nextcord.ext import commands + +# Intents +intents = nextcord.Intents.default() + +# Bot +bot = commands.Bot(prefix=os.environ.get('PREFIX'), allowed_mentions=None, ) + +# load cogs +if __name__ == '__main__': + for filename in os.listdir("cogs"): + if filename.endswith(".py"): + bot.load_extension(f"{filename[:-3]}") + + +@bot.event +async def on_ready(): + print(f"{bot.user} | {bot.user.id}") + +bot.run(os.environ('TOKEN'))