From 4b6743a51f29578c894d40991606df2999d16d37 Mon Sep 17 00:00:00 2001 From: Stijn De Clercq Date: Sat, 19 Jun 2021 22:05:31 +0200 Subject: [PATCH] Fix requirements.txt (hopefully) & add some info to FAQ, fixes #47 --- backend/server.py | 3 +-- faq.md | 15 ++++++++++++--- readme.md | 3 +++ requirements.txt | 8 ++++++-- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/backend/server.py b/backend/server.py index 67cb8e9..3f76518 100644 --- a/backend/server.py +++ b/backend/server.py @@ -1,7 +1,6 @@ -import json - from discord.ext import ipc from functions.database import custom_commands +import json from quart import Quart, jsonify, request from quart_cors import cors from time import time diff --git a/faq.md b/faq.md index c7ba0a2..e906dbd 100644 --- a/faq.md +++ b/faq.md @@ -1,5 +1,14 @@ # FAQ -Answers to Frequently Asked Questions. +Answers to Frequently Asked Questions and solutions to issues that may arise. -### Table of Contents -A list of all questions (in order) so you can easily find what you're looking for. +## Issues installing dotenv + +The name of this package is `python-dotenv`, as listed in `requirements.txt`. The _name_ of the package, however, is just `dotenv`. This confuses PyCharm, which will tell you that you don't have `dotenv` installed as it can't link those two together. You can just click `ignore this requirement` if you don't like the warning. + +## Issues installing psycopg2 + +The `psychopg2` and `psychopg2-binary` packages might cause you some headaches when trying to install them, especially when using PyCharm to install dependencies. The reason for this is because these are `PSQL` packages, and as a result they require you to have `PSQL` installed on your system to function properly. + +## Package is not listed in project requirements + +This is the exact same case as [Issues installing dotenv](#issues-installing-dotenv), and occurs for packages such as `Quart`. The names of the modules differ from the name used to install it from `pip`. Once again, you can ignore this message. \ No newline at end of file diff --git a/readme.md b/readme.md index 5155cb9..76e5796 100644 --- a/readme.md +++ b/readme.md @@ -51,13 +51,16 @@ When creating a new Didier command, you can add it to a `Category` by adding a d ```python from decorators import help +from discord.ext import commands from enums.help_categories import Category +from functions import checks @commands.command(name="Command Name", aliases=["Cn"]) @commands.check(checks.allowedChannels) @help.Category(Category.Currency) async def command_name(self, ctx): # Command code + await ctx.send("Command response") ``` This allows commands across multiple Cogs to be classified under the same category in the help page. diff --git a/requirements.txt b/requirements.txt index 5ee8d28..2980dd3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,8 @@ python-dotenv==0.14.0 beautifulsoup4==4.9.1 -discord.py==1.7.0 +discord.py==1.7.3 +git+https://github.com/Rapptz/discord-ext-menus@master +discord-ext-ipc==2.0.0 psycopg2==2.8.5 psycopg2-binary==2.8.5 python-dateutil==2.6.1 @@ -10,4 +12,6 @@ requests-unixsocket==0.1.5 tabulate==0.8.7 yarl==1.4.2 feedparser==6.0.2 -googletrans==4.0.0rc1 \ No newline at end of file +googletrans==4.0.0rc1 +quart==0.6.15 +Quart-CORS==0.1.3 \ No newline at end of file