Skip to content

Commit

Permalink
add helpful ruby reaction command
Browse files Browse the repository at this point in the history
  • Loading branch information
kiliankoe committed Nov 17, 2023
1 parent 6af988b commit 156f0db
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Sources/SwiftDEBot/Command/Message Commands/Ruby.swift
Original file line number Diff line number Diff line change
@@ -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: reaction.message_id, in: reaction.channel_id)
}
}
1 change: 1 addition & 0 deletions Sources/SwiftDEBot/Commands.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ let messageCommands: [MessageCommand] = [
AppleStatusCommand(),
SPICommand(),
SummarizeCommand(),
RubyCommand(),

CowsCommand(),

Expand Down

0 comments on commit 156f0db

Please sign in to comment.