diff options
| author | 2021-03-19 15:19:23 +0100 | |
|---|---|---|
| committer | 2021-03-19 15:19:23 +0100 | |
| commit | 25b2e4c8412cceffe1ec528a9894586599f5f25d (patch) | |
| tree | e3387dc9441445184947c88b214406a3b4f9aaa7 /bot/exts/valentines/lovecalculator.py | |
| parent | First pass of easy to produce errors (diff) | |
| parent | Merge pull request #631 from python-discord/dependabot/pip/pillow-8.1.1 (diff) | |
Merge branch 'main' into Handle-DMChannels
Diffstat (limited to 'bot/exts/valentines/lovecalculator.py')
| -rw-r--r-- | bot/exts/valentines/lovecalculator.py | 11 | 
1 files changed, 3 insertions, 8 deletions
diff --git a/bot/exts/valentines/lovecalculator.py b/bot/exts/valentines/lovecalculator.py index c75ea6cf..966acc82 100644 --- a/bot/exts/valentines/lovecalculator.py +++ b/bot/exts/valentines/lovecalculator.py @@ -4,15 +4,13 @@ import json  import logging  import random  from pathlib import Path -from typing import Union +from typing import Coroutine, Union  import discord  from discord import Member  from discord.ext import commands  from discord.ext.commands import BadArgument, Cog, clean_content -from bot.constants import Roles -  log = logging.getLogger(__name__)  with Path("bot/resources/valentines/love_matches.json").open(encoding="utf8") as file: @@ -46,14 +44,11 @@ class LoveCalculator(Cog):          If you want to use multiple words for one argument, you must include quotes.            .love "Zes Vappa" "morning coffee" - -        If only one argument is provided, the subject will become one of the helpers at random.          """          if whom is None: -            staff = ctx.guild.get_role(Roles.helpers).members -            whom = random.choice(staff) +            whom = ctx.author -        def normalize(arg: Union[Member, str]) -> str: +        def normalize(arg: Union[Member, str]) -> Coroutine:              if isinstance(arg, Member):                  # If we are given a member, return name#discrim without any extra changes                  arg = str(arg)  |