Prechádzať zdrojové kódy

Nothing impressive, just need to move PC. Catching more errors, updated requirements & readme

MaH 3 rokov pred
rodič
commit
a0b0b19792
3 zmenil súbory, kde vykonal 8 pridanie a 4 odobranie
  1. 2 2
      README.md
  2. 4 1
      bot/main.py
  3. 2 1
      requirements.txt

+ 2 - 2
README.md

@@ -4,11 +4,11 @@ A Discord robot for the Angels Discord written in Python.
 ## Requirements
 1. Clone the git repository
 1. Change into the repo directory
-1. `virtualenv --python=python3 .`
+1. `virtualenv --python=python3 .` || `python3 -m venv .`
 1. `source bin/activate`
 1. `pip3 install -r requirements.txt`
 
 ## Run
 1. Change into the repo directory
 1. `source bin/activate`
-1. `python3 rotbot.py`
+1. `python3 rotbot.py`

+ 4 - 1
bot/main.py

@@ -74,4 +74,7 @@ for ext in default_extensions:
 try:
     bot.run(settings.DISCORD_TOKEN)
 except AttributeError:
-    missing_config()
+    missing_config()
+except discord.errors.LoginFailure:
+    print("Invalid discord token.")
+    quit()

+ 2 - 1
requirements.txt

@@ -1 +1,2 @@
-discord.py==1.7.3
+discord.py==1.7.3
+asyncpg==0.26.0