Skip to content

III. Dependencies

Tucker edited this page Jan 5, 2022 · 9 revisions

These are backend and frontend requirements that must be fulfilled in order for the bot to function. It is assumed that the raw Python code itself is all present and functional.

requirements.txt:

aiohttp==3.7.4.post0
async-timeout==3.0.1
attrs==21.4.0
certifi==2021.10.8
chardet==4.0.0
charset-normalizer==2.0.10
discord==1.7.3
discord.py==1.7.3
docopt==0.6.2
idna==3.3
multidict==5.2.0
pipreqs==0.4.11
requests==2.27.1
typing_extensions==4.0.1
urllib3==1.26.7
yarg==0.1.9
yarl==1.7.2

import statements:

from datetime import datetime
import time
import asyncio
import discord
from discord import channel
from discord.client import Client
from discord.errors import NotFound
from discord.ext import commands
import urllib.request
import urllib.error
import re
import json
import logging
import turtle_json

Several of these are for quality of life additions to the bot, however most are required for the core functionality.

import discord is the most important of all. This imports Discord.py.

import urllib.request and import urllib.error are for checking the user's RSI name and verifying, in the least, that it exists. Although no simple solution can be implemented to verify that the user is giving their true RSI username, this can help cut down on typos and human error.

import turtle_json is the statement to import a custom library that I wrote for this project. Using JSON, it properly reads and writes in a dictionary-convertible format for the Discord API. On top of this, it is customizable for our specific logging purposes for the organization.

import logging is a Discord.py specific module that automates session-by-session logging for the Discord client. It does not make the error log, that is custom. This is only for sessions and wipes after the session, exclusively used for debugging.

The rest are fairly standard Python libraries for simplicity of code and more diverse functionality.

Clone this wiki locally