Skip to content

Commit

Permalink
Add apple typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Veit Progl committed Dec 18, 2024
1 parent df61541 commit 1cc97f2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
30 changes: 30 additions & 0 deletions Sources/SwiftDEBot/Command/Message Commands/AppleTypos.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import DiscordBM
import Foundation

struct iPhoneTypoCommand: MessageCommand {
let helpText = ""

func run(client: DiscordClient, message: Gateway.MessageCreate) async throws {
let content = message.content
guard content.contains("Iphone") || content.contains("IFöhn") || content.contains("ipHone") || content.contains("IPhone"),
let handle = message.author?.mentionHandle
else {
return
}
try await client.send("Psst \(handle), das schreibt sich iPhone.", to: message.channel_id)
}
}

struct iPadTypoCommand: MessageCommand {
let helpText = ""

func run(client: DiscordClient, message: Gateway.MessageCreate) async throws {
let content = message.content
guard content.contains("Ipad") || content.contains("IPad"),
let handle = message.author?.mentionHandle
else {
return
}
try await client.send("Psst \(handle), das schreibt sich iPad.", to: message.channel_id)
}
}
3 changes: 3 additions & 0 deletions Sources/SwiftDEBot/Commands.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ let messageCommands: [MessageCommand] = [
HelpCommand(),
UptimeCommand(),
PingCommand(),

iPhoneTypoCommand(),
iPadTypoCommand(),
]

let reactionCommands: [ReactionCommand] = [
Expand Down

0 comments on commit 1cc97f2

Please sign in to comment.