Exemplo n.º 1
0
 def reload(self, name='all'):
     '''Reloads the specified plugin. Example: !reload dice'''
     try:
         if name == 'all':
             keys = [x for x in Plugin.library.iterkeys()]
             for module in keys:
                 Plugin.reload(module)
             return 'All plugins were successfully reloaded.'
         else:
             Plugin.reload(name)
             return '{0} were successfully reloaded.'.format(name)
     except KeyError:
         return 'No such plugin is currently loaded. Try !load {0}'.format(name)