updated pylint
This commit is contained in:
parent
247c94852f
commit
83637385fe
2 changed files with 8 additions and 1 deletions
2
.github/workflows/pylint.yml
vendored
2
.github/workflows/pylint.yml
vendored
|
@ -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')
|
||||
|
|
7
main.py
7
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())
|
||||
asyncio.run(main())
|
||||
|
|
Loading…
Reference in a new issue