last_called -> _last_called
This commit is contained in:
parent
dd0ab3211e
commit
fc643cc87a
1 changed files with 3 additions and 3 deletions
|
@ -11,7 +11,7 @@ RANDOM_DELAY_SECONDS = 3
|
||||||
class Module(object):
|
class Module(object):
|
||||||
def __init__(self, bot, events, exports):
|
def __init__(self, bot, events, exports):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
self.last_called = 0
|
self._last_called = 0
|
||||||
self.events = events
|
self.events = events
|
||||||
|
|
||||||
events.on("received.command.define").hook(self.define,
|
events.on("received.command.define").hook(self.define,
|
||||||
|
@ -47,9 +47,9 @@ class Module(object):
|
||||||
event["stderr"].write("Failed to load results")
|
event["stderr"].write("Failed to load results")
|
||||||
|
|
||||||
def random_word(self, event):
|
def random_word(self, event):
|
||||||
if not self.last_called or (time.time()-self.last_called >=
|
if not self._last_called or (time.time()-self._last_called >=
|
||||||
RANDOM_DELAY_SECONDS):
|
RANDOM_DELAY_SECONDS):
|
||||||
self.last_called = time.time()
|
self._last_called = time.time()
|
||||||
|
|
||||||
page = Utils.get_url(URL_WORDNIK_RANDOM, get_params={
|
page = Utils.get_url(URL_WORDNIK_RANDOM, get_params={
|
||||||
"api_key":self.bot.config["wordnik-api-key"],
|
"api_key":self.bot.config["wordnik-api-key"],
|
||||||
|
|
Loading…
Reference in a new issue