コード例 #1
0
ファイル: bot.py プロジェクト: Hornwitser/DiscordLogger
 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
ファイル: bot.py プロジェクト: billyprice1old/DiscordLogger
 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
ファイル: useless_bot.py プロジェクト: Theoretical/UselessBot
    def __init__(self, prefix, token):
        Client.__init__(self)
        self.prefix = prefix
        self.token = token
        self.plugins = []
        self.playlist = set()

        self.load_plugins()
コード例 #4
0
ファイル: useless_bot.py プロジェクト: Theoretical/UselessBot
    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
ファイル: main.py プロジェクト: AudioVisuaali/AudioBot-2
    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
ファイル: bots.py プロジェクト: menzac/custom-discord-bot
 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