Skip to content

Commit

Permalink
fixed a bug in the change threshold command --autoupdate
Browse files Browse the repository at this point in the history
  • Loading branch information
double-fault committed Mar 26, 2017
1 parent 08c1d68 commit 211d323
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/CommandSetThreshold.swift
Expand Up @@ -11,19 +11,19 @@ import SwiftChatSE

class CommandSetThreshold: Command {
override public class func usage() -> [String] {
return ["set threshold *", "change threshold *", "change threshold to *", "set threshold to *"]
return ["set threshold to *", "change threshold to *", "set threshold *", "change threshold *"]
}

override public class func privileges() -> ChatUser.Privileges {
return .filter
}

override func run() throws {
guard let newThreshold = (arguments.first.map({Int($0)}) ?? nil) else {
guard let newThreshold = Int (arguments[0]) else {
message.reply("Please specify a valid threshold.")
return
}
message.room.threshold = newThreshold

message.reply("The threshold for this room has been set to \(newThreshold) (*higher* thresholds report more posts).")
Expand Down

0 comments on commit 211d323

Please sign in to comment.