diff --git a/Sources/SwiftDEBot/Command/Message Commands/Ruby.swift b/Sources/SwiftDEBot/Command/Message Commands/Ruby.swift new file mode 100644 index 0000000..dc2b6c7 --- /dev/null +++ b/Sources/SwiftDEBot/Command/Message Commands/Ruby.swift @@ -0,0 +1,17 @@ +import DiscordBM +import Foundation + +struct RubyCommand: MessageCommand { + let helpText = "" + + func run(client: DiscordClient, message: Gateway.MessageCreate) async throws { + let content = message.content.lowercased() + guard content.contains("ruby") || content.contains("cocoapods") || content.contains("fastlane"), + let handle = message.author?.mentionHandle + else { + return + } + try await client.addReaction( + .guildEmoji(name: "fckrby", id: "1174327414470496276"), to: message.message_id, in: message.channel_id) + } +} diff --git a/Sources/SwiftDEBot/Commands.swift b/Sources/SwiftDEBot/Commands.swift index 023e7d7..66d112b 100644 --- a/Sources/SwiftDEBot/Commands.swift +++ b/Sources/SwiftDEBot/Commands.swift @@ -7,6 +7,7 @@ let messageCommands: [MessageCommand] = [ AppleStatusCommand(), SPICommand(), SummarizeCommand(), + RubyCommand(), CowsCommand(),