Sehelitar / Kick.bot

A powerful Kick integration for Streamer.bot
https://sehelitar.tv/
GNU Affero General Public License v3.0
19 stars 4 forks source link

FirstMessage no longer working #16

Closed mocchimon closed 10 months ago

mocchimon commented 10 months ago

Hi, I have the bot setup to automatically shoutout people with their first message sent in chat. the latest update no longer allows it to work for some reason. image

Sehelitar commented 10 months ago

Hey! 👋 Kick doesn't implement a "first message" logic in chat for now, so this field has always been set to false, as seen here : https://github.com/Sehelitar/Kick.bot/blob/c9a0c02593386bb5e9bcbcbf243a82309c235055/BotEventListener.cs#L136

Tracking this would require to store every users ids in a database, in a more efficient way than in SB Global Vars. Another way to store this would have been the SetUserVar method, which is perfect for this use-case ... but this method will be removed from SB soon ... 😵‍💫 For now, you could use temporary Global Vars for this (under Core => Globals) if you know how to do it.

I will keep that in mind for a future update. 👍

mocchimon commented 10 months ago

strange this was working a few updates ago. Appreciate the temp fix. I'll give it a try

Sehelitar commented 10 months ago

Hey! 👋 So, the firstMessage argument is now usable in this new pre-release : https://github.com/Sehelitar/Kick.bot/releases/tag/v0.3.7 I didn't have time to test everything properly, so this is flagged as a pre-release for now. Feel free to try it out and tell me if you find anything weird 😅

mocchimon commented 10 months ago

Appreciate it! so far I'm having trouble finding a way to reset the firstmessage to continue testing. Other than that my setup is sort of working. The 2nd message isn't being sent for some reason

Sehelitar commented 10 months ago

The database can be found in data\kick-ext.db in your bot's installation folder. You can avoid a full restart by doing these 3 steps : Unload, delete the file, Compile. Both actions can be found here :

Double break

As for your second message, this If sub-action blocks it :

Duplicate message

You also set the message argument twice right after that, the second value will overwrite the first.

mocchimon commented 10 months ago

never mind I forgot to clear the db. Everything is working now!