stable-diffusion-discord-bot
stable-diffusion-discord-bot copied to clipboard
The bot crashes if anyone tries to dm it
This is the error i get.
If anyone could help me i would be so thankful!
panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x50 pc=0x81b7ec]
goroutine 83 [running]: stable_diffusion_bot/discord_bot.(*botImpl).processImagineCommand(0xc0001de7e0, 0x20?, 0xc00000a098) C:/stable/stable-diffusion-discord-bot-master/stable-diffusion-discord-bot-master/discord_bot/discord_bot.go:331 +0x40c stable_diffusion_bot/discord_bot.New.func2(0x0?, 0xc00000a098) C:/stable/stable-diffusion-discord-bot-master/stable-diffusion-discord-bot-master/discord_bot/discord_bot.go:99 +0x430 github.com/bwmarrin/discordgo.interactionCreateEventHandler.Handle(0x7fc34e?, 0xc000222380?, {0x876c40?, 0xc00000a098?}) /github.com/bwmarrin/[email protected]/eventhandlers.go:693 +0x38 created by github.com/bwmarrin/discordgo.(*Session).handle /github.com/bwmarrin/[email protected]/event.go:171 +0x16a
Just an FYI this seems to still be a bug in the latest release (v0.2.2).
For anyone else having this issue, here's a quick bash runner that'll just restart your bot any time it crashes:
while true; do ./stable_diffusion_bot -token YOUR_TOKEN -guild YOUR_GUILD_ID -host YOUR_HOST; echo "Bot crashed, restarting..."; sleep 1; done