Merge pull request #398 from LightningTipBot/dalle_fix/fix1

prompt check
This commit is contained in:
calle 2022-08-30 18:18:13 +02:00 committed by GitHub
commit 1b69313fc5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,6 +49,10 @@ func (bot *TipBot) confirmGenerateImages(ctx intercept.Context) (intercept.Conte
ResetUserState(user, bot)
m := ctx.Message()
prompt := m.Text
if len(prompt) == 0 {
return ctx, fmt.Errorf("prompt not given")
}
if user.Wallet == nil {
return ctx, fmt.Errorf("user has no wallet")
}