mirror of
https://github.com/ChuckNorrison/LightningTipBot.git
synced 2026-08-13 12:33:14 +02:00
disable dalle if key is empty (#409)
This commit is contained in:
parent
5c950ef1be
commit
d3c2fe7117
1 changed files with 4 additions and 0 deletions
|
|
@ -22,6 +22,10 @@ import (
|
|||
// generateImages is called when the user enters /generate or /generate <prompt>
|
||||
// asks the user for a prompt if not given
|
||||
func (bot *TipBot) generateImages(ctx intercept.Context) (intercept.Context, error) {
|
||||
if internal.Configuration.Generate.DalleKey == "" {
|
||||
bot.trySendMessage(ctx.Message().Sender, "🤖💤 Dalle image generation is currently not available. Please try again later.")
|
||||
return ctx, nil
|
||||
}
|
||||
bot.anyTextHandler(ctx)
|
||||
user := LoadUser(ctx)
|
||||
if user.Wallet == nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue