From 83637385fef20ae4642c7bde481eeb901d87902e Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh <102361830+SeaswimmerTheFsh@users.noreply.github.com> Date: Mon, 19 Jun 2023 17:11:20 -0400 Subject: [PATCH] updated pylint --- .github/workflows/pylint.yml | 2 ++ main.py | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 963c846..03c5407 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -22,4 +22,6 @@ jobs: pip install python-dotenv - name: Analysing the code with pylint run: | + pylint OPTIONS --generate-rcfile > .pylintrc + pylint OPTIONS --disable=C0114 pylint $(git ls-files '*.py') diff --git a/main.py b/main.py index 7ef1944..85ecebc 100644 --- a/main.py +++ b/main.py @@ -1,3 +1,4 @@ +# Imports import asyncio import os from dotenv import load_dotenv @@ -11,15 +12,18 @@ api_url = os.getenv('API_URL') prefix = os.getenv('PREFIX') class Client(commands.CommandsClient): +# This class contains all of the commands the bot uses. async def get_prefix(self, message: revolt.Message): return prefix @commands.command() async def ping(self, ctx: commands.Context): + # Checks if the bot is running. await ctx.send("Pong!") @commands.command() async def avatar(self, ctx: commands.Context, member: revolt.Member): + # Checks a user's avatar. if not isinstance(member, revolt.Member): await ctx.send("Please provide a member argument!") return @@ -27,8 +31,9 @@ class Client(commands.CommandsClient): await ctx.send(f"{avatar}") async def main(): + # This function logs into the bot user. async with aiohttp.ClientSession() as session: client = Client(session, token, api_url=api_url) await client.start() -asyncio.run(main()) \ No newline at end of file +asyncio.run(main())