This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// swift-tools-version:5.1 | |
import PackageDescription | |
let package = Package( | |
name: "robot-or-not-bot", | |
dependencies: [ | |
.package(url: "https://github.com/pvzig/SlackKit.git", from: "4.0.0") | |
], | |
targets: [ | |
.target( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import SlackKit | |
class RobotOrNotBot { | |
let verdicts: [String:Bool] = [ | |
"Mr. Roboto" : false, | |
"Service Kiosks": false, | |
"Darth Vader": false, | |
"K-9": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PackageDescription | |
let package = Package( | |
name: "Leaderbot", | |
targets: [], | |
dependencies: [ | |
.Package(url: "https://github.com/SlackKit/SlackKit.git", majorVersion: 4), | |
] | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import String | |
import SlackKit | |
class Leaderboard: MessageEventsDelegate { | |
// A dictionary to hold our leaderboard | |
var leaderboard: [String: Int] = [String: Int]() | |
let atSet = CharacterSet(characters: ["@"]) | |
// A SlackKit client instance | |
let client: SlackClient |