 import Bot
 import Sugar
 import Foundation
+
+import Redbird
 
 enum KarmaAction {
     case Add

    }
    private func adjustKarma(of user: User, action: KarmaAction, storage: Storage) {
        do {
            let count: Int = storage.get(.in("Karma"), key: user.id, or: 0)
            
            
//            this line fails vvv
//            try storage.set(.in("Karma"), key: user.id, value: action.operation(count, 1))
//            break it down and see what the failure is
//            also try a simple storage.set(.shared, key: "foo", value: "bar")
            try storage.set(.shared, key: "foo", value: "bar")
            
        } catch let error {
            print("Unable to update Karma: \(error)")

final class KarmaBot: SlackMessageService {
    //MARK: - Private Properties
    private let options: KarmaBotOptions
    private let config: Config
    
    //MARK: - Lifecycle
    init(options: KarmaBotOptions) {
        self.options = options
        
        let config = try! Config(
            supportedItems: AllConfigItems(),
            source: DefaultConfigDataSource
        )
        self.config = config
    }
    
    //MARK: - Event Dispatch
