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

10 statements  

1""" 

2invite.py 

3 

4contains invite() 

5""" 

6 

7from database import get 

8import error 

9 

10async def invite(*args): 

11 """ 

12 invite() 

13 

14 returns the invite link to the bot or the server 

15 """ 

16 

17 # fix args 

18 args = args[1:] 

19 

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 

28 

29 # check for extra args 

30 if len(args) > 1: 

31 raise error.UnknownArgumentError 

32 

33 # get invite link 

34 return get("invites", args[0])[0]