Completed
Push — master ( 017312...4b4e7f )
by Matt
01:20
created

_downtime()   A

Complexity

Conditions 3

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 3
dl 0
loc 9
rs 9.6667
1
import time
2
from datetime import datetime, timedelta
3
import random
4
5
from util import commands, parse_line
6
7
@commands(".downtime")
8
def _downtime(bot, message, channel):
9
  drinks = ['a beer', 'a scotch', 'a bloody mary', 'a nice glass of wine', 'FUCKIN FOUR LOKO', 'a crisp cider']
10
  action_string = "\001ACTION "
11
  user = parse_line(message).user
12
  if user.lower() == "george" or "thorogood" in user.lower():
13
    bot.say(channel, action_string + ' gets ' + user + ' one bourbon, one scotch, one beer'+ "\001\n")
14
  else:
15
    bot.say(channel, action_string + ' gets ' + user + ' ' + random.choice(drinks)+ "\001\n")
16
    
17