Skip to content

Commit

Permalink
move xcode typo to typoCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
Veit Progl committed Dec 18, 2024
1 parent 0e1903f commit bd97afb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ struct TypoCommand: MessageCommand {

let trigger: [String: [String]] = [
"iPhone": ["Iphone", "ipPhone", "IPhone", "IFöhn"],
"iPad": ["IPad", "Ipad"]
"iPad": ["IPad", "Ipad"],
"Xcode": ["XCode", "xCode"]
]

func run(client: DiscordClient, message: Gateway.MessageCreate) async throws {
Expand Down
14 changes: 0 additions & 14 deletions Sources/SwiftDEBot/Command/Message Commands/Xcode.swift
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
import DiscordBM
import Foundation

struct XcodeTypoCommand: MessageCommand {
let helpText = ""

func run(client: DiscordClient, message: Gateway.MessageCreate) async throws {
let content = message.content
guard content.contains("XCode") || content.contains("xCode"),
let handle = message.author?.mentionHandle
else {
return
}
try await client.send("Psst \(handle), das schreibt sich Xcode.", to: message.channel_id)
}
}

struct XcodeLatestCommand: MessageCommand {
let helpText = "`!xcode`: Was ist die aktuellste Version von Xcode?"

Expand Down
1 change: 0 additions & 1 deletion Sources/SwiftDEBot/Commands.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import DiscordBM

let messageCommands: [MessageCommand] = [
XcodeTypoCommand(),
XcodeLatestCommand(),
SwiftEvolutionCommand(),
AppleStatusCommand(),
Expand Down

0 comments on commit bd97afb

Please sign in to comment.