control-net / Miunie

Miunie is a community developed bot with an attitude.
Other
46 stars 31 forks source link

Empty or invalid token UI handling #148

Closed CakeAndBanana closed 5 years ago

CakeAndBanana commented 5 years ago

About

When no bot token is set, Miunie crashes on start. While this should be handled in the Core, the GUI shouldn't let the user get that far.

So the task is to make sure the user doesn't start the bot when there is no token set and they understand the reason.

The How

💡 One option is to disable the button and add a warning text underneath it.

petrspelos commented 5 years ago

@CakeAndBanana what is the status of this issue, did you perhaps get stuck on something. 😊

CakeAndBanana commented 5 years ago

@petrspelos Update on this issue.

After @Ggglitch had fixed issue #149 I was able to get it working with a PasswordBox inside the Settings page for inputting the bot key. The key will be saved inside local data so you don't have to re-enter the key after a restart or crash. An issue is that you have to load the Settings page to load the key, I will look for a solution for that today ;). I haven't created the warning text underneath the button but it should be an easy job because there are error messages now when loading the bot.

Connecting to bot with correct key and incorrect key: 2019-05-04_02-17-02