Skip to content

Commit

Permalink
Fix !whois bug
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Sørlie <[email protected]>
  • Loading branch information
SuperManifolds committed Feb 17, 2025
1 parent ccccfd5 commit 71daa0e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Sources/mechasqueak/Modules/AccountCommands.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ class AccountCommands: IRCBotModule {
return channel.member(named: nick)
}).first

guard let accountData = try? await FuelRatsAPI.getNickname(forIRCAccount: nick) else {
guard
let accountData = try? await FuelRatsAPI.getNickname(
forIRCAccount: user?.account ?? nick)
else {
command.message.reply(
key: "whois.notfound", fromCommand: command,
map: [
Expand All @@ -127,7 +130,7 @@ class AccountCommands: IRCBotModule {
}

let joinedDate = accountData.joinDate

let group = accountData.groups.sorted(by: {
$0.priority > $1.priority
}).first?.ircRepresentation
Expand Down

0 comments on commit 71daa0e

Please sign in to comment.