Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import DiscordBM

struct AnimatedEmojiCommand: ReactionCommand {
func run(client: DiscordClient, reaction: Gateway.MessageReactionAdd) async throws {
let emojiDict: [String: Reaction] = [
"this2": .guildEmoji(name: "this", id: "785804431597240351"),
"jumprope2": .guildEmoji(name: "jumprope", id: "1441710287257604198"),
]

for (name, reactionEmoji) in emojiDict where name == reaction.emoji.name {
try await client.addReaction(reactionEmoji, to: reaction.message_id, in: reaction.channel_id)
}
}
}
10 changes: 0 additions & 10 deletions Sources/SwiftDEBot/Command/Reaction Commands/This.swift

This file was deleted.

2 changes: 1 addition & 1 deletion Sources/SwiftDEBot/Commands.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ let messageCommands: [MessageCommand] = [
]

let reactionCommands: [ReactionCommand] = [
ThisCommand()
AnimatedEmojiCommand()
]