-
-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from erictik:27-promopt-uri-bug
fixbug: prompt to add uri does not return
- Loading branch information
Showing
2 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import "dotenv/config"; | ||
import { Midjourney } from "../src"; | ||
/** | ||
* | ||
* a simple example of how to use the imagine command | ||
* ``` | ||
* npx tsx example/imagine-uri.ts | ||
* ``` | ||
*/ | ||
async function main() { | ||
const client = new Midjourney( | ||
<string>process.env.SERVER_ID, | ||
<string>process.env.CHANNEL_ID, | ||
<string>process.env.SALAI_TOKEN, | ||
true | ||
); | ||
const msg = await client.Imagine( | ||
"https://media.discordapp.net/attachments/1094892992281718894/1106660210380132503/Soga_A_Greek_man_with_mustache_in_national_costume_riding_a_don_3255e7c1-38ee-4892-b7c7-9f0dc3f2786d.png?width=1040&height=1040 https://cdn.discordapp.com/attachments/1094892992281718894/1106798152188702720/Soga__489d80b2-db74-4a93-a998-881a9542abbe.png cool boy", | ||
(uri: string, progress: string) => { | ||
console.log("loading", uri, "progress", progress); | ||
} | ||
); | ||
console.log({ msg }); | ||
} | ||
main().catch((err) => { | ||
console.error(err); | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters