Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
Larsundso committed Nov 17, 2024
1 parent df60a57 commit 8431574
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ async function fn(
userId: string,
saveGuild?: Discord.Guild,
forceMainAPI: boolean = false,
): Promise<Discord.GuildMember | Discord.DiscordAPIError> {
): Promise<Discord.GuildMember | Discord.DiscordAPIError | Error> {
const g = (guild ?? saveGuild)!;
if (!g) return new Error('guild is not defined');

return (
g.members.cache.get(userId) ??
Expand Down

0 comments on commit 8431574

Please sign in to comment.