From 7db9a8ea2bee07a76a15cb5de51ab37ddc8dc707 Mon Sep 17 00:00:00 2001 From: dngfx Date: Sat, 1 Sep 2018 11:40:08 +0100 Subject: Move lists out of scope --- modules/8all.py | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'modules/8all.py') diff --git a/modules/8all.py b/modules/8all.py index db5e4d3f..57be2da4 100644 --- a/modules/8all.py +++ b/modules/8all.py @@ -1,5 +1,20 @@ import random +CHOICES = [ + "Definitely", + "Yes", + "Probably", + "Maybe", + "Probably not", + "No", + "Definitely not", + "I don't know", + "Ask again later", + "The answer is unclear", + "Absolutely", + "Dubious at best", + "I'm on a break, ask again later" +] class Module(object): def __init__(self, bot, events): @@ -11,20 +26,4 @@ class Module(object): ) def decide(selfs, event): - choices = [ - "Definitely", - "Yes", - "Probably", - "Maybe", - "Probably not", - "No", - "Definitely not", - "I don't know", - "Ask again later", - "The answer is unclear", - "Absolutely", - "Dubious at best", - "I'm on a break, ask again later" - ] - - event["stdout"].write(random.choice(choices)) + event["stdout"].write(random.choice(CHOICES)) -- cgit v1.3.1-10-gc9f91