aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Suhail <[email protected]>2019-03-14 16:41:32 +0000
committerGravatar Suhail <[email protected]>2019-03-14 16:41:32 +0000
commit7ed5c85b8d7a53012ccdc8c157842e3533dc3068 (patch)
tree5d0cd201595a4e97d5a07e5076ef0245d5fd6309
parentPickup Lines (diff)
Requested Changes
-rw-r--r--bot/seasons/valentines/pickuplines.py27
1 files changed, 14 insertions, 13 deletions
diff --git a/bot/seasons/valentines/pickuplines.py b/bot/seasons/valentines/pickuplines.py
index bb4721e9..4462478f 100644
--- a/bot/seasons/valentines/pickuplines.py
+++ b/bot/seasons/valentines/pickuplines.py
@@ -10,6 +10,9 @@ from bot.constants import Colours
log = logging.getLogger(__name__)
+with open(Path('bot', 'resources', 'valentines', 'pickup_lines.json'), 'r', encoding="utf8") as f:
+ pickup_lines = load(f)
+
class PickupLine:
"""
@@ -24,20 +27,18 @@ class PickupLine:
"""
Gives you a random pickup line. Note that most of them are very cheesy!
"""
- with open(Path('bot', 'resources', 'valentines', 'pickup_lines.json'), 'r', encoding="utf8") as f:
- pickup_lines = load(f)
- random_line = random.choice(pickup_lines['lines'])
- embed = discord.Embed(
- title=':cheese: Your pickup line :cheese:',
- description=random_line['line'],
- color=Colours.pink
- )
- embed.set_thumbnail(
- url=random_line.get('image', pickup_lines['placeholder'])
- )
- await ctx.send(embed=embed)
+ random_line = random.choice(pickup_lines['lines'])
+ embed = discord.Embed(
+ title=':cheese: Your pickup line :cheese:',
+ description=random_line['line'],
+ color=Colours.pink
+ )
+ embed.set_thumbnail(
+ url=random_line.get('image', pickup_lines['placeholder'])
+ )
+ await ctx.send(embed=embed)
def setup(bot):
bot.add_cog(PickupLine(bot))
- log.debug('Pickup line cog loaded')
+ log.info('Pickup line cog loaded')