Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xiboon committed Nov 12, 2021
1 parent efaa81a commit ce75783
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/classes/AI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default class AI extends Array {
}

async generate(client: AlcanClient, obj: any) {
// @ts-ignore
this.isGenerating = true;

let request = await axios.get(
`${client.config.aiurl}/?topic=${obj.text}`
Expand All @@ -37,7 +37,7 @@ export default class AI extends Array {
obj.channel
)) as TextChannel;
channel.messages.cache.get(obj.msg).reply({ embeds: [embed] });
if (this.length > 1) {
if (this.length > 0) {
this.generate(client, this[0]);
} else {
this.isGenerating = false;
Expand Down

0 comments on commit ce75783

Please sign in to comment.