File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,12 @@ async def duck(self, ctx):
6767 """ Posts a random duck """
6868 await self .randomimageapi (ctx , 'https://random-d.uk/api/v1/random' , 'url' )
6969
70+ @commands .command ()
71+ @commands .cooldown (rate = 1 , per = 1.5 , type = commands .BucketType .user )
72+ async def coffee (self , ctx ):
73+ """ Posts a random coffee """
74+ await self .randomimageapi (ctx , 'https://coffee.alexflipnote.dev/random.json' , 'file' )
75+
7076 @commands .command (aliases = ['flip' , 'coin' ])
7177 async def coinflip (self , ctx ):
7278 """ Coinflip! """
Original file line number Diff line number Diff line change 1818 name = file [:- 3 ]
1919 bot .load_extension (f"cogs.{ name } " )
2020
21- bot .run (config .token )
21+ try :
22+ bot .run (config .token )
23+ except Exception as e :
24+ print (f'Error when logging in: { e } ' )
You can’t perform that action at this time.
0 commit comments