Fix actions
This commit is contained in:
parent
dacbf44d44
commit
3dd02bb94d
56
bot/dope.py
56
bot/dope.py
@ -68,6 +68,27 @@ class Dope(Plugin):
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ACTIONS = {
|
||||||
|
'joint': [
|
||||||
|
('passes', 'to'),
|
||||||
|
('rolls', 'for'),
|
||||||
|
('lights', 'for'),
|
||||||
|
],
|
||||||
|
'bong': [
|
||||||
|
('passes', 'to'),
|
||||||
|
('preps', 'for'),
|
||||||
|
('lights', 'for'),
|
||||||
|
],
|
||||||
|
'vape': [
|
||||||
|
('passes', 'to'),
|
||||||
|
],
|
||||||
|
'blunt': [
|
||||||
|
('passes', 'to'),
|
||||||
|
('rolls', 'for'),
|
||||||
|
('lights', 'for'),
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def dope(self, mask: IrcString, target: IrcString, args: Dict):
|
def dope(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Smoke weed everyday
|
"""Smoke weed everyday
|
||||||
@ -79,37 +100,14 @@ class Dope(Plugin):
|
|||||||
strain_type = random.choice(strain_types)
|
strain_type = random.choice(strain_types)
|
||||||
strain = random.choice(self.STRAINS[strain_type])
|
strain = random.choice(self.STRAINS[strain_type])
|
||||||
|
|
||||||
actions = {
|
consume_type = random.choice(list(self.ACTIONS.keys()))
|
||||||
'joint': [
|
action = random.choice(self.ACTIONS[consume_type])
|
||||||
'passes',
|
|
||||||
'rolls',
|
|
||||||
'lights',
|
|
||||||
],
|
|
||||||
'bong': [
|
|
||||||
'passes',
|
|
||||||
'preps',
|
|
||||||
'lights',
|
|
||||||
],
|
|
||||||
'vape': [
|
|
||||||
'passes',
|
|
||||||
],
|
|
||||||
'blunt': [
|
|
||||||
'passes',
|
|
||||||
'rolls',
|
|
||||||
'lights',
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
|
||||||
consume_type = random.choice(list(actions.keys()))
|
nick = args.get('<nick>', mask.nick)
|
||||||
action = random.choice(actions[consume_type])
|
|
||||||
|
|
||||||
if args['<nick>']:
|
self.bot.action(target, '{action0} a {consume_type} of the finest {strain_type} "{strain}" {action1} {nick}'.format(
|
||||||
nick = args['<nick>']
|
action0=action[0],
|
||||||
else:
|
action1=action[1],
|
||||||
nick = mask.nick
|
|
||||||
|
|
||||||
self.bot.action(target, '{action} a {consume_type} of the finest {strain_type} "{strain}" to {nick}'.format(
|
|
||||||
action=action,
|
|
||||||
consume_type=consume_type,
|
consume_type=consume_type,
|
||||||
strain_type=strain_type,
|
strain_type=strain_type,
|
||||||
strain=strain,
|
strain=strain,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user