mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-10-23 00:42:56 +00:00
Maintain order in role related functions.
This commit is contained in:
@@ -137,6 +137,11 @@ def get(iterable, **attrs):
|
||||
return find(predicate, iterable)
|
||||
|
||||
|
||||
def _unique(iterable):
|
||||
seen = set()
|
||||
adder = seen.add
|
||||
return [x for x in iterable if not (x in seen or adder(x))]
|
||||
|
||||
def _null_event(*args, **kwargs):
|
||||
pass
|
||||
|
||||
|
Reference in New Issue
Block a user