Formattings dopes code and renaming the module
This commit is contained in:
parent
eefae51ad2
commit
90035a8249
@ -1,15 +1,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import random
|
||||
|
||||
import irc3
|
||||
from docopt import Dict
|
||||
from irc3.plugins.command import command
|
||||
from irc3.utils import IrcString
|
||||
|
||||
from . import Plugin
|
||||
|
||||
class Dope(Plugin):
|
||||
|
||||
class Drugs(Plugin):
|
||||
# All strains from https://www.leafly.com/explore
|
||||
STRAINS = {
|
||||
'sativa': [
|
||||
@ -67,7 +66,6 @@ class Dope(Plugin):
|
||||
'Agent Orange',
|
||||
],
|
||||
}
|
||||
|
||||
ACTIONS = {
|
||||
'joint': [
|
||||
('passes', 'to'),
|
||||
@ -95,20 +93,16 @@ class Dope(Plugin):
|
||||
|
||||
%%dope [<nick>]
|
||||
"""
|
||||
|
||||
strain_types = list(self.STRAINS.keys())
|
||||
strain_type = random.choice(strain_types)
|
||||
strain = random.choice(self.STRAINS[strain_type])
|
||||
|
||||
consume_type = random.choice(list(self.ACTIONS.keys()))
|
||||
action = random.choice(self.ACTIONS[consume_type])
|
||||
|
||||
nick = args.get('<nick>', mask.nick)
|
||||
|
||||
self.bot.action(target, '{action0} a {consume_type} of the finest {strain_type} "{strain}" {action1} {nick}'.format(
|
||||
self.bot.action(target, '{action0} a {consume} of the finest {type} "{strain}" {action1} {nick}'.format(
|
||||
action0=action[0],
|
||||
action1=action[1],
|
||||
consume_type=consume_type,
|
||||
strain_type=strain_type,
|
||||
strain=strain,
|
||||
nick=nick))
|
||||
consume=consume_type,
|
||||
strain=random.choice(self.STRAINS[strain_type]),
|
||||
nick=args.get('<nick>', mask.nick),
|
||||
type=strain_type,
|
||||
))
|
@ -14,6 +14,7 @@
|
||||
"bot.admin",
|
||||
"bot.coins",
|
||||
"bot.ctcp",
|
||||
"bot.drugs",
|
||||
"bot.isup",
|
||||
"bot.linux",
|
||||
"bot.mcmaniac",
|
||||
|
Loading…
x
Reference in New Issue
Block a user