23 lines
484 B
Python
23 lines
484 B
Python
|
"""
|
||
|
Script used to send message for review on Mastodon.
|
||
|
"""
|
||
|
from dataclasses import dataclass
|
||
|
|
||
|
from events import event
|
||
|
import settings
|
||
|
|
||
|
|
||
|
@dataclass
|
||
|
class Mastodon(event.Event):
|
||
|
callback : str = "mastodon"
|
||
|
|
||
|
def run(self, now):
|
||
|
"""
|
||
|
Gestion du message avant la revue hebdomadaire
|
||
|
"""
|
||
|
if (
|
||
|
now.tm_hour == settings.REVIEW_MASTODON[0]
|
||
|
and now.tm_min == settings.REVIEW_MASTODON[1]
|
||
|
):
|
||
|
self.callback_func()
|