StampyAI / stampy

A Discord bot for the Robert Miles AI server
37 stars 9 forks source link

stampy updates stamp counts in coda users table #227

Closed MatthewBaggins closed 1 year ago

MatthewBaggins commented 1 year ago

closes #209

MatthewBaggins commented 1 year ago

Whenever somebody's message is (un)stamped, Stampy updates that person's stamp count in the table.

There's also update of all users' stamps, which gets executed on boot. The boot time is saved in StampsModule.last_total_stamp_update. When somebody's message is (un)stamped, Stampy checks that time and if it was earlier than 23 hours ago, he updates all people's stamp counts and saves the date again.

I also moved some coda-related methods to utilities, I'll probably move them the rest of them over the week.

MatthewBaggins commented 1 year ago

had a look. mostly just aesthetic suggestions below. how can i check if the new functionality works as expected?

Thanks! To test it, run this branch on test server, start (un)stamping people's messages on test server and see if their stampcounts change in the table on AI Test Info. Note that Stampy recognizes users in the table by their Discord handles.

Lovkush-A commented 1 year ago

Run tests.