Exemple #1
0
 async def cbb(self,*team:str):
     """display score of team's cfb game"""
     delta = None
     if len(team) > 0:
         if team[-1].startswith('-') or team[-1].startswith('+'):
             delta = team[-1]
             if len(team) > 1:
                 t = ' '.join(team[:-1])
             else:
                 t = None
         else:
             t = ' '.join(team)
     else:
         t = None
         
     if delta is None:
         await self.bot.say(cbbgame.get_game(t))
     else:
         await self.bot.say(cbbgame.get_game(t,delta=int(delta)))
Exemple #2
0
 async def cbb(self, ctx, *team: str):
     """display score of team's cbb game"""
     delta = None
     liveonly = False
     if len(team) > 0:
         if team[-1].startswith('-') or team[-1].startswith('+'):
             delta = team[-1]
             if len(team) > 1:
                 t = ' '.join(team[:-1])
             else:
                 t = None
         else:
             t = ' '.join(team)
     else:
         t = None
     if t == 'live':
         liveonly = True
         t = None
     if delta is None:
         await ctx.send(cbbgame.get_game(t, liveonly=liveonly))
     else:
         await ctx.send(cbbgame.get_game(t, delta=int(delta)))