feat: sending messages works

This commit is contained in:
Andrew Glaze
2026-03-20 17:53:29 -04:00
parent df3cb95c91
commit 4d39ed8053
8 changed files with 240 additions and 157 deletions

View File

@@ -1,11 +1,11 @@
// import DiscordBM
// import DiscordKit
//
// struct Actions {
// static func getUserFromMention(_ mention: MentionUser) -> String {
// mention.member?.nick ?? mention.global_name ?? mention.username
// }
//
// static func performAction(ctx: Gateway.MessageCreate, client: DiscordClient, resOpts: [String]) async throws {
// static func performAction(ctx: MessageCreate, client: DiscordClient, resOpts: [String]) async throws {
// let author = "**\(ctx.member?.nick ?? ctx.author?.global_name ?? ctx.author?.username ?? "Zundamon")**"
// let dests = ctx.mentions.map(getUserFromMention).map({ "**\($0)**" })
// let orig: String
@@ -99,7 +99,7 @@
// static func pat(
// _ args: ArraySlice<String.SubSequence>,
// client: DiscordClient,
// ctx: Gateway.MessageCreate
// ctx: MessageCreate
// ) async throws {
// guard let patRes = patRes else { print("pat.txt not loaded"); return }
// try await performAction(ctx: ctx, client: client, resOpts: patRes)