本文整理汇总了Python中bot.Bot.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Bot.__init__方法的具体用法?Python Bot.__init__怎么用?Python Bot.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bot.Bot
的用法示例。
在下文中一共展示了Bot.__init__方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from bot import Bot [as 别名]
# 或者: from bot.Bot import __init__ [as 别名]
def __init__(self, channel, nickname, server, port):
Bot.__init__(self)
self.idle = {}
self.resumeState = {}
self.adapter = TestBot(self, channel, nickname, server, port)
self.adapter.start()
示例2: __init__
# 需要导入模块: from bot import Bot [as 别名]
# 或者: from bot.Bot import __init__ [as 别名]
def __init__(self, canvas=None, namespace=None, vars=None):
'''
Nodebot grammar constructor
:param canvas: Canvas implementation for output.
:param namespace: Optionally specify a dict to inject as namespace
:param vars: Optional dict containing initial values for variables
'''
Bot.__init__(self, canvas, namespace = namespace, vars = vars)
canvas.mode = CORNER
self._ns = self._namespace
示例3: __init__
# 需要导入模块: from bot import Bot [as 别名]
# 或者: from bot.Bot import __init__ [as 别名]
def __init__(self, command_prefixes = CommandBot.DEFAULT_PREFIXES,
name = "CommandBot by HansL"):
Bot.__init__(self, name = name)
self.__prefixes = command_prefixes
示例4: __init__
# 需要导入模块: from bot import Bot [as 别名]
# 或者: from bot.Bot import __init__ [as 别名]
def __init__(self):
Bot.__init__(self)
self.nickname = self.__class__.__name__
self.modules = []
print self.nickname
示例5: __init__
# 需要导入模块: from bot import Bot [as 别名]
# 或者: from bot.Bot import __init__ [as 别名]
def __init__(self):
self.has_raised_street = False
Bot.__init__(self)
示例6: __init__
# 需要导入模块: from bot import Bot [as 别名]
# 或者: from bot.Bot import __init__ [as 别名]
def __init__(self, name, access_token, callback_url='', avatar_url=''):
Bot.__init__(self, name, access_token, callback_url, avatar_url)
self.new_group_id = self.create_group('Rugby Seniors 15/16')
with open(sys.argv[1]) as f:
self.senior_dict = self.get_seniors(f)
示例7: __init__
# 需要导入模块: from bot import Bot [as 别名]
# 或者: from bot.Bot import __init__ [as 别名]
def __init__(self):
self.has_raised_street = False
self.on_button = None
Bot.__init__(self)
示例8: __init__
# 需要导入模块: from bot import Bot [as 别名]
# 或者: from bot.Bot import __init__ [as 别名]
def __init__(self, ws):
self.ws = ws
self.__class__.connected += 1
Bot.__init__(self)
self.atk_log = self.__class__.atk_log
示例9: __init__
# 需要导入模块: from bot import Bot [as 别名]
# 或者: from bot.Bot import __init__ [as 别名]
def __init__(self):
Bot.__init__(self)
self.nickname = self.__class__.__name__
self.modules = [ Logger(bot=self), AutoOp(bot=self), Github(bot=self) ]
示例10: __init__
# 需要导入模块: from bot import Bot [as 别名]
# 或者: from bot.Bot import __init__ [as 别名]
def __init__(self):
""" Initialise bot
"""
Bot.__init__(self, 'TICTACTOE')
self.board = Board()
示例11: __init__
# 需要导入模块: from bot import Bot [as 别名]
# 或者: from bot.Bot import __init__ [as 别名]
def __init__(self, canvas, namespace = None, vars = None):
### TODO - Need to do whole drawbot class
Bot.__init__(self, canvas, namespace = namespace, vars = None)
self._transformmode = CORNER
self._canvas.origin = BOTTOM_LEFT
示例12: __init__
# 需要导入模块: from bot import Bot [as 别名]
# 或者: from bot.Bot import __init__ [as 别名]
def __init__(self, command_prefixes = TO_DEFAULT_PREFIXES,
channel_command_prefixes = CHAN_DEFAULT_PREFIXES,
name = "CommandBot by HansL"):
Bot.__init__(self, name)
self.__prefixes = command_prefixes
self.__channel_prefixes = channel_command_prefixes
示例13: __init__
# 需要导入模块: from bot import Bot [as 别名]
# 或者: from bot.Bot import __init__ [as 别名]
def __init__(self, ws):
self.ws = ws
Bot.__init__(self)
示例14: __init__
# 需要导入模块: from bot import Bot [as 别名]
# 或者: from bot.Bot import __init__ [as 别名]
def __init__(self, token, id):
self.botid = id
self.token = token
Bot.__init__(self)