updated pylint

This commit is contained in:
SeaswimmerTheFsh 2023-06-19 17:11:20 -04:00
parent 247c94852f
commit 83637385fe
2 changed files with 8 additions and 1 deletions

View file

@ -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')

View file

@ -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,6 +31,7 @@ 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()