Skip to content

Commit

Permalink
Merge pull request #8 from LianSheng197/for-pr
Browse files Browse the repository at this point in the history
Fixed `ParseLink` function return data ( #8 )
  • Loading branch information
ShufflePerson authored May 21, 2024
2 parents 542021b + f580a68 commit fa21253
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Discord/Types/ILinkData.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interface ILinkData {
channelID: number,
fileID: number,
channelID: bigint,
fileID: bigint,
fileName: string
}

Expand Down
6 changes: 4 additions & 2 deletions src/Discord/Utils/ParseLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ function ParseLink(input: string): IParsedLink {
if (!fileName.includes("."))
return { error: ELinkIssue.FILENAME_NO_DOT };

console.log(channelID);

return {
error: ELinkIssue.NONE,
data: {
channelID: Number(channelID),
fileID: Number(channelID),
channelID: BigInt(channelID),
fileID: BigInt(fileID),
fileName
}
}
Expand Down

0 comments on commit fa21253

Please sign in to comment.