Skip to content

Commit

Permalink
add seed & discord api rate limit
Browse files Browse the repository at this point in the history
Eric committed Apr 28, 2023
1 parent 75329de commit 7c260ac
Showing 11 changed files with 516 additions and 75 deletions.
350 changes: 350 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -30,13 +30,15 @@
},
"homepage": "https://github.com/erictik/midjourney-api#readme",
"devDependencies": {
"@types/async": "^3.2.20",
"@types/node": "^18.16.0",
"dotenv": "^16.0.3",
"prettier": "^2.8.8",
"tsx": "^3.12.6",
"typescript": "^5.0.4"
},
"dependencies": {
"async": "^3.2.4",
"axios": "^1.3.6"
}
}
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from "./midjourney";
export * from "./midjourney.message";
export * from "./interfaces/index";
1 change: 1 addition & 0 deletions src/interfaces/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./message";
9 changes: 2 additions & 7 deletions src/midjourney.message.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import axios from "axios";
import { MJMessage } from "./interfaces";

export type MJMessage = {
id: string;
uri: string;
hash: string;
content: string;
};
export class MidjourneyMessage {
constructor(
public ChannelId: string,
@@ -81,7 +76,7 @@ export class MidjourneyMessage {
if (msg !== null) {
return msg;
}
this.log(i, "wait no message found");
this.log(i, content, "wait no message found");
await this.Wait(1000 * 2);
}
}
Loading

0 comments on commit 7c260ac

Please sign in to comment.