From e0dc0e6b78aa04c5d7352308053126dbc43a37b8 Mon Sep 17 00:00:00 2001 From: c0de Date: Mon, 24 Oct 2022 20:22:04 -0500 Subject: [PATCH] Fix linting issues with client --- GhostBallBot/discord_client/client.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/GhostBallBot/discord_client/client.py b/GhostBallBot/discord_client/client.py index 6364431..5423744 100644 --- a/GhostBallBot/discord_client/client.py +++ b/GhostBallBot/discord_client/client.py @@ -2,6 +2,16 @@ # Copyright 2022 - c0de # Licensed under the MIT License (https://opensource.org/licenses/MIT) +# pylint: disable=wrong-import-position + +""" + A discord bot that hosts Ghostball/Braveball. + + A discord game where players guess the pitch speed + from a fantasy baseball pitcher, and whoever is + closer gets more points +""" + import sys import discord @@ -12,16 +22,24 @@ import game class GhostBallClient(discord.Client): + """ + Implementation of a Discord client that will monitor + a channel for messages, and if it recieves a message + defined in the Game object, and pass it along + """ + def __init__(self, *args, **kwargs): - super(GhostBallClient, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) with game.Game() as self.game: self.game.discord = self async def on_ready(self): + """Method called when connected to Discord""" print("Logged on as", self.user) async def on_message(self, message): + """Method called when a message is recieved""" # Don't respond to ourself if message.author == self.user: return