rename DiscordClient to ApiClient
This commit is contained in:
@@ -5,7 +5,7 @@ struct Actions {
|
||||
mention.member?.nick ?? mention.global_name ?? mention.username
|
||||
}
|
||||
|
||||
static func performAction(ctx: MessageCreate, client: DiscordClient, resOpts: [String]) async throws {
|
||||
static func performAction(ctx: MessageCreate, client: ApiClient, 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
|
||||
@@ -39,7 +39,7 @@ struct Actions {
|
||||
|
||||
static func hug(
|
||||
_ args: ArraySlice<String.SubSequence>,
|
||||
client: DiscordClient,
|
||||
client: ApiClient,
|
||||
ctx: MessageCreate
|
||||
) async throws {
|
||||
guard let hugRes = hugRes else { print("hug.txt not loaded"); return }
|
||||
@@ -98,7 +98,7 @@ struct Actions {
|
||||
|
||||
static func pat(
|
||||
_ args: ArraySlice<String.SubSequence>,
|
||||
client: DiscordClient,
|
||||
client: ApiClient,
|
||||
ctx: MessageCreate
|
||||
) async throws {
|
||||
guard let patRes = patRes else { print("pat.txt not loaded"); return }
|
||||
|
||||
@@ -6,7 +6,7 @@ import DiscordKit
|
||||
|
||||
struct MessageHandler {
|
||||
let ctx: MessageCreate
|
||||
let client: DiscordClient
|
||||
let client: ApiClient
|
||||
|
||||
static let prefix = ":"
|
||||
static let zundaGifData = try? Data(contentsOf: URL(filePath: "resources/media/zundamone.gif"))
|
||||
|
||||
@@ -45,7 +45,7 @@ struct Wolfram {
|
||||
|
||||
static func handleMath(
|
||||
_ args: ArraySlice<String.SubSequence>,
|
||||
client: DiscordClient,
|
||||
client: ApiClient,
|
||||
ctx: MessageCreate
|
||||
) async throws {
|
||||
let typingIndicatorTask = Task {
|
||||
|
||||
Reference in New Issue
Block a user