diff options
| author | 2019-03-30 10:40:38 -0400 | |
|---|---|---|
| committer | 2019-03-30 10:42:02 -0400 | |
| commit | 095dc1791f147682023edafc59abdc4019074eeb (patch) | |
| tree | 160d7ee160042befbfba778e54507a5eee3bd686 /bot/seasons/valentines/pickuplines.py | |
| parent | Merge branch 'master' into hotfix (diff) | |
| parent | Merge pull request #146 from python-discord/flake8-docstring (diff) | |
Merge branch 'master' into hotfix
Diffstat (limited to 'bot/seasons/valentines/pickuplines.py')
| -rw-r--r-- | bot/seasons/valentines/pickuplines.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/bot/seasons/valentines/pickuplines.py b/bot/seasons/valentines/pickuplines.py index e1abb4e5..193eb788 100644 --- a/bot/seasons/valentines/pickuplines.py +++ b/bot/seasons/valentines/pickuplines.py @@ -14,10 +14,8 @@ with open(Path('bot', 'resources', 'valentines', 'pickup_lines.json'), 'r', enco pickup_lines = load(f) -class PickupLine(commands.Cog): - """ - A cog that gives random cheesy pickup lines. - """ +class PickupLine: + """A cog that gives random cheesy pickup lines.""" def __init__(self, bot): self.bot = bot @@ -25,8 +23,11 @@ class PickupLine(commands.Cog): @commands.command() async def pickupline(self, ctx): """ - Gives you a random pickup line. Note that most of them are very cheesy! + Gives you a random pickup line. + + Note that most of them are very cheesy. """ + random_line = random.choice(pickup_lines['lines']) embed = discord.Embed( title=':cheese: Your pickup line :cheese:', @@ -40,5 +41,7 @@ class PickupLine(commands.Cog): def setup(bot): + """Pickup lines Cog load.""" + bot.add_cog(PickupLine(bot)) log.info('PickupLine cog loaded') |