Coverage for cmds/emote.py: 33%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1"""
2emote.py
4contains emote()
5"""
7import client
8import error
10async def emote(*args):
11 """
12 emote()
14 returns the emote
15 """
17 # fix args
18 args = args[1:]
20 # check args
21 if len(args) == 0:
22 raise error.ArgumentRequiredError
24 if len(args) > 1:
25 raise error.UnknownArgumentError
27 # return output
28 return [
29 inner for outer in [
30 guild.emojis for guild in client.client.guilds
31 ] for inner in outer if inner.name == args[0]
32 ][0]