From 01e531cef754638a02335481b2e748e26c2964f4 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Sun, 26 Feb 2023 16:15:36 -0600 Subject: [PATCH] Add Major League role check --- cogs/gameplay.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cogs/gameplay.py b/cogs/gameplay.py index bb99597..94f662e 100644 --- a/cogs/gameplay.py +++ b/cogs/gameplay.py @@ -1028,6 +1028,18 @@ class Gameplay(commands.Cog): if 'Minor' in league: league_name = 'minor-league' elif 'Major' in league: + can_play = False + for x in interaction.user.roles: + if x.name == 'PD - Major League': + can_play = True + + if not can_play: + await interaction.edit_original_response( + content=f'Ope. Looks like you haven\'t received the **PD - Major League** role, yet!\n\n' + f'To play **Major League** games, you need to defeat all 30 MLB teams in the Minor League ' + f'campaign. You can see your progress with `/record`.\n\n' + f'If you have completed the Minor League campaign, go ping Cal to get your new role!') + return league_name = 'major-league' else: await interaction.edit_original_response(