diff options
Diffstat (limited to '')
| -rw-r--r-- | bot/exts/holidays/valentines/be_my_valentine.py | 6 | ||||
| -rw-r--r-- | bot/exts/holidays/valentines/lovecalculator.py | 6 | 
2 files changed, 6 insertions, 6 deletions
diff --git a/bot/exts/holidays/valentines/be_my_valentine.py b/bot/exts/holidays/valentines/be_my_valentine.py index 5ffd14e6..3a2beef3 100644 --- a/bot/exts/holidays/valentines/be_my_valentine.py +++ b/bot/exts/holidays/valentines/be_my_valentine.py @@ -7,7 +7,7 @@ import discord  from discord.ext import commands  from bot.bot import Bot -from bot.constants import Channels, Colours, Lovefest, Month, PYTHON_PREFIX +from bot.constants import Channels, Colours, Month, PYTHON_PREFIX, Roles  from bot.utils.decorators import in_month  from bot.utils.exceptions import MovedCommandError @@ -60,7 +60,7 @@ class BeMyValentine(commands.Cog):              # This command should only be used in the server              raise commands.UserInputError("You are supposed to use this command in the server.") -        if Lovefest.role_id not in [role.id for role in user.roles]: +        if Roles.lovefest not in [role.id for role in user.roles]:              raise commands.UserInputError(                  f"You cannot send a valentine to {user} as they do not have the lovefest role!"              ) @@ -95,7 +95,7 @@ class BeMyValentine(commands.Cog):          example : .bemyvalentine secret Iceman#6508 Hey I love you, wanna hang around ? (sends the custom message to          Iceman in DM making you anonymous)          """ -        if Lovefest.role_id not in [role.id for role in user.roles]: +        if Roles.lovefest not in [role.id for role in user.roles]:              await ctx.message.delete()              raise commands.UserInputError(                  f"You cannot send a valentine to {user} as they do not have the lovefest role!" diff --git a/bot/exts/holidays/valentines/lovecalculator.py b/bot/exts/holidays/valentines/lovecalculator.py index c212e833..eab3d083 100644 --- a/bot/exts/holidays/valentines/lovecalculator.py +++ b/bot/exts/holidays/valentines/lovecalculator.py @@ -12,7 +12,7 @@ from discord.ext import commands  from discord.ext.commands import BadArgument, Cog, clean_content  from bot.bot import Bot -from bot.constants import Channels, Lovefest, Month, PYTHON_PREFIX +from bot.constants import Channels, Month, PYTHON_PREFIX, Roles  from bot.utils.decorators import in_month  log = logging.getLogger(__name__) @@ -45,8 +45,8 @@ class LoveCalculator(Cog):            Running .love @chrisjl#2655 @joe#6000 will yield the same result as before.          """          if ( -            Lovefest.role_id not in [role.id for role in who.roles] -            or (whom is not None and Lovefest.role_id not in [role.id for role in whom.roles]) +            Roles.lovefest not in [role.id for role in who.roles] +            or (whom is not None and Roles.lovefest not in [role.id for role in whom.roles])          ):              raise BadArgument(                  "This command can only be ran against members with the lovefest role! "  |