Coverage for cmds/invite.py: 100%
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"""
2invite.py
4contains invite()
5"""
7from database import get
8import error
10async def invite(*args):
11 """
12 invite()
14 returns the invite link to the bot or the server
15 """
17 # fix args
18 args = args[1:]
20 # check if args are empty
21 if len(args) == 0:
22 link = '\n'.join([
23 "https://discordapp.com/api/oauth2/"
24 "authorize?client_id=681294773629485071&permissions=8&scope=bot",
25 "https://github.com/zwang20/deployment-bot-6"
26 ])
27 return link
29 # check for extra args
30 if len(args) > 1:
31 raise error.UnknownArgumentError
33 # get invite link
34 return get("invites", args[0])[0]