feat: sending messages works
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
// #if canImport(FoundationNetworking)
|
||||
// import FoundationNetworking
|
||||
// #endif
|
||||
// import DiscordKit
|
||||
// import XMLCoder
|
||||
// import DiscordBM
|
||||
//
|
||||
// struct Wolfram {
|
||||
// static let token = ProcessInfo.processInfo.environment["WOLFRAM_APP_ID"]!
|
||||
@@ -22,7 +22,7 @@
|
||||
// var img: URL?
|
||||
//
|
||||
// if let resultPod = resultPod {
|
||||
// ans = String(resultPod.subpod.compactMap(\.plaintext).joined(by: "\n"))
|
||||
// ans = String(resultPod.subpod.compactMap(\.plaintext).joined(separator: "\n"))
|
||||
// .replacingOccurrences(of: " | ", with: ": ")
|
||||
// }
|
||||
// if let imgPod = wolframRes.pod.first(where: {
|
||||
@@ -46,7 +46,7 @@
|
||||
// static func handleMath(
|
||||
// _ args: ArraySlice<String.SubSequence>,
|
||||
// client: DiscordClient,
|
||||
// ctx: Gateway.MessageCreate
|
||||
// ctx: MessageCreate
|
||||
// ) async throws {
|
||||
// try await client.triggerTypingIndicator(channelId: ctx.channel_id).guardSuccess()
|
||||
//
|
||||
@@ -68,14 +68,14 @@
|
||||
// try await client.createMessage(channelId: ctx.channel_id, payload: .init(
|
||||
// content: answer,
|
||||
// message_reference: .init(
|
||||
// type: .default,
|
||||
// type: 0,
|
||||
// message_id: ctx.id,
|
||||
// channel_id: ctx.channel_id,
|
||||
// guild_id: ctx.guild_id,
|
||||
// ),
|
||||
// files: files,
|
||||
// attachments: attachments
|
||||
// )).guardSuccess()
|
||||
// ))
|
||||
// }
|
||||
// }
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user