-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Veit Progl
committed
Dec 18, 2024
1 parent
df61541
commit 1cc97f2
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
Sources/SwiftDEBot/Command/Message Commands/AppleTypos.swift
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
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) | ||
} | ||
} |
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