Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 3
0
    def __init__(self, prefix, token):
        Client.__init__(self)
        self.prefix = prefix
        self.token = token
        self.plugins = []
        self.playlist = set()

        self.load_plugins()
Exemplo n.º 4
0
    def __init__(self, prefix, token):
        Client.__init__(self)
        self.prefix = prefix
        self.token = token
        self.plugins = []
        self.playlist = set()

        self.load_plugins()
Exemplo n.º 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()
Exemplo n.º 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})
Exemplo n.º 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
Exemplo n.º 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)
Exemplo n.º 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}
Exemplo n.º 10
0
 def __init__(self):
     Client.__init__(self)
Exemplo n.º 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}
Exemplo n.º 12
0
 def __init__(self: DiscordBot, commands: List[Command]):
     BaseBot.__init__(self, commands)
     Client.__init__(self)
Exemplo n.º 13
0
 def __post_init__(self):
     Client.__init__(self, loop=self.loop)
Exemplo n.º 14
0
 def __init__(self):
     Client.__init__(self)
     self.conn = sqlite3.connect("discordData.db")
     self.sourceChannel = None
     self.speak = None