Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use self.bot.config in Plugin

  • Loading branch information...
commit b87eca60b401f81f1f59cb6dc4acb3869b135ff9 1 parent 814ef78
@barrucadu authored
Showing with 4 additions and 5 deletions.
  1. +4 −5 csbot/__init__.py
View
9 csbot/__init__.py
@@ -264,14 +264,13 @@ class Plugin(object):
"""
def __init__(self, bot, config):
self.bot = bot
- self.config = botconfig
def cfg(self, name):
- if self.config.has_option(self.__class__.NAME, name):
- return self.config.get(self.__class__.NAME, name)
+ if self.bot.config.has_option(self.__class__.NAME, name):
+ return self.bot.config.get(self.__class__.NAME, name)
- if self.config.has_option("DEFAULT", name):
- return self.config.get("DEFAULT", name)
+ if self.bot.config.has_option("DEFAULT", name):
+ return self.bot.config.get("DEFAULT", name)
raise Exception("{} is not a valid option.".format(name))
Please sign in to comment.
Something went wrong with that request. Please try again.