예제 #1
0
 def __init__(self, config):
     Client.__init__(self)
     self.config = config
     self.commands = []
     for k, v in LoggerBot.__dict__.items():
         if hasattr(v, 'command'):
             self.commands.append(k)
예제 #2
0
 def __init__(self, config):
     Client.__init__(self)
     self.config = config
     self.commands = []
     for k, v in LoggerBot.__dict__.items():
         if hasattr(v, 'command'):
             self.commands.append(k)
예제 #3
0
    def __init__(self, prefix, token):
        Client.__init__(self)
        self.prefix = prefix
        self.token = token
        self.plugins = []
        self.playlist = set()

        self.load_plugins()
예제 #4
0
    def __init__(self, prefix, token):
        Client.__init__(self)
        self.prefix = prefix
        self.token = token
        self.plugins = []
        self.playlist = set()

        self.load_plugins()
예제 #5
0
    def __init__(self, command_prefix):
        # Init the normal discord client.
        Client.__init__(self)

        self.command_prefix = command_prefix
        self.plugins = []

        # Load all of our bot extensions.
        self._load_plugins()
예제 #6
0
    def __init__(self, prefix, token, cwd):
        Client.__init__(self)
        self.prefix = prefix
        self.token = token
        self.cwd = cwd

        self.plugin_manager = PluginManager(self, '%s/plugins' % self.cwd)
        self.plugin_manager.load_plugins()

        user_agent = get_resource(self.cwd, 'user_agent')
        self.client_session = ClientSession(headers={'User-Agent': user_agent})
예제 #7
0
    def __init__(self):

        Client.__init__(self)
        self.utils = Utils()
        self.timeout = Timeout()

        self.send = self.utils.send
        self.modules = self.utils.get_modules_info()
        self.config = self.utils.get_config_info()
        self.start_time = self.utils.time_now()
        self.say = self.send_message

        return
예제 #8
0
    def __init__(self, music_cache_path: str = ''):
        if music_cache_path != '':
            path = music_cache_path + '/music_cache' if music_cache_path[-1] != '/' else 'music_cache'
            if not os.path.isdir(music_cache_path + '/music_cache' if music_cache_path[-1] != '/' else 'music_cache'):
                os.mkdir(music_cache_path + '/music_cache' if music_cache_path[-1] != '/' else 'music_cache')

        else:
            path = './music_cache'
            if not os.path.isdir('music_cache'):
                os.mkdir('music_cache')

        Client.__init__(self)
        YoutubeDownloader.__init__(self, path)
        CacheClean.__init__(self, path)
예제 #9
0
 def __init__(self, bots):
     Client.__init__(self)
     self.bots = bots
     operations = [self.send_message, self.send_file, self.delete_message]
     self.operations = {op.__name__:op for op in operations}
예제 #10
0
 def __init__(self):
     Client.__init__(self)
예제 #11
0
 def __init__(self, bots, config):
     Client.__init__(self)
     self.bots = bots
     self.config = config
     operations = [self.send_message, self.send_file, self.delete_message]
     self.operations = {op.__name__:op for op in operations}
예제 #12
0
 def __init__(self: DiscordBot, commands: List[Command]):
     BaseBot.__init__(self, commands)
     Client.__init__(self)
예제 #13
0
파일: connector.py 프로젝트: mental32/ep
 def __post_init__(self):
     Client.__init__(self, loop=self.loop)
예제 #14
0
 def __init__(self):
     Client.__init__(self)
     self.conn = sqlite3.connect("discordData.db")
     self.sourceChannel = None
     self.speak = None