feat: sending messages works
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user