aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kosayoda <[email protected]>2019-09-14 21:00:38 +0800
committerGravatar kosayoda <[email protected]>2019-09-14 21:00:38 +0800
commit6521fcc3727e4b5daba0b68487ef1f3df4ceb27f (patch)
treebe25ed32bdc735167e13bfa4ec637639a7da3321
parentAdd more information to team creation messages (diff)
Remove duplicate members passed into team creation command
-rw-r--r--bot/cogs/jams.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bot/cogs/jams.py b/bot/cogs/jams.py
index 4cf878791..28a84a0c9 100644
--- a/bot/cogs/jams.py
+++ b/bot/cogs/jams.py
@@ -2,6 +2,7 @@ import logging
from discord import Member, PermissionOverwrite, utils
from discord.ext import commands
+from more_itertools import unique_everseen
from bot.constants import Roles
from bot.decorators import with_role
@@ -29,6 +30,8 @@ class CodeJams:
The first user passed will always be the team leader.
"""
+ # Ignore duplicate members
+ members = list(unique_everseen(members))
# We had a little issue during Code Jam 4 here, the greedy converter did it's job
# and ignored anything which wasn't a valid argument which left us with teams of