feat: implement an RSS Discord bot with slash commands for feed management and Docker support.
This commit is contained in:
29
src/main.py
Normal file
29
src/main.py
Normal file
@@ -0,0 +1,29 @@
|
||||
"""Entry point for the RSS Discord Bot."""
|
||||
|
||||
import logging
|
||||
|
||||
from .config import load_config
|
||||
from .bot import RSSBot
|
||||
|
||||
|
||||
def main() -> None:
|
||||
"""Load config and start the bot."""
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
format="%(asctime)s | %(levelname)-8s | %(name)s | %(message)s",
|
||||
datefmt="%Y-%m-%d %H:%M:%S",
|
||||
)
|
||||
|
||||
config = load_config()
|
||||
|
||||
bot = RSSBot(
|
||||
channel_id=config["channel_id"],
|
||||
check_interval=config["check_interval"],
|
||||
role_id=config["role_id"],
|
||||
)
|
||||
|
||||
bot.run(config["token"], log_handler=None)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user