tisboyo / Twitch_Bot

4 stars 2 forks source link

Temporary commands #304

Open tisboyo opened 3 years ago

tisboyo commented 3 years ago

Look at possibility of doing temporary commands. See if an expiration date field can be added to the table, and periodically check if there are any expired commands, and if so delete them.

This may be difficult, because the commands table is defined by the framework so I'm unsure if we'd be able to modify that table. Other option would be a second table with just name/expiration and iterate through that then delete from the regular commands table.

@baldengineer Thoughts or comments on this idea?

baldengineer commented 3 years ago

yes, I would very much like that capability.

On Sun, Oct 24, 2021 at 6:52 PM tisboyo @.***> wrote:

Look at possibility of doing temporary commands. See if an expiration date field can be added to the table, and periodically check if there are any expired commands, and if so delete them.

This may be difficult, because the commands table is defined by the framework so I'm unsure if we'd be able to modify that table. Other option would be a second table with just name/expiration and iterate through that then delete from the regular commands table.

@baldengineer https://github.com/baldengineer Thoughts or comments on this idea?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tisboyo/Twitch_Bot/issues/304, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFPXXBXFNSHQOXWYX3FGTTUISL2HANCNFSM5GT72TTQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

sharkbound commented 3 years ago

This may be difficult, because the commands table is defined by the framework so I'm unsure if we'd be able to modify that table. Other option would be a second table with just name/expiration and iterate through that then delete from the regular commands table.

i can add a event for the event system that asks for commands not found in the main commands table, and if any valid Command subclasses are found from the results, it uses it instead of giving up

other way is to just handle on_privmsg_received and do checks there with custom logic