fixing pylint errors

This commit is contained in:
SeaswimmerTheFsh 2023-06-19 22:28:30 -04:00
parent d389cb0db0
commit a54cdf40d7

View file

@ -13,7 +13,7 @@ token = os.getenv('TOKEN')
api_url = os.getenv('API_URL') api_url = os.getenv('API_URL')
prefix = os.getenv('PREFIX') prefix = os.getenv('PREFIX')
class client(commands.CommandsClient): class Client(commands.CommandsClient):
# This class contains all of the commands the bot uses. # This class contains all of the commands the bot uses.
async def get_prefix(self, message: revolt.Message, input: str = prefix): async def get_prefix(self, message: revolt.Message, input: str = prefix):
return input return input
@ -51,14 +51,14 @@ class client(commands.CommandsClient):
dotenv.set_key(env, 'PREFIX', new_prefix) dotenv.set_key(env, 'PREFIX', new_prefix)
await ctx.message.reply(f"Prefix has been changed from `{prefix}` to `{new_prefix}`!") await ctx.message.reply(f"Prefix has been changed from `{prefix}` to `{new_prefix}`!")
print(f"Prefix changed: {prefix}{new_prefix}") print(f"Prefix changed: {prefix}{new_prefix}")
await client.get_prefix(ctx.message, new_prefix) await Client.get_prefix(ctx.message, new_prefix)
else: else:
await ctx.message.reply(f"The prefix is currently set to `{prefix}`.") await ctx.message.reply(f"The prefix is currently set to `{prefix}`.")
async def main(): async def main():
# This function logs into the bot user. # This function logs into the bot user.
async with aiohttp.ClientSession() as session: async with aiohttp.ClientSession() as session:
client = client(session, token, api_url=api_url) client = Client(session, token, api_url=api_url)
await client.start() await client.start()
asyncio.run(main()) asyncio.run(main())