Movie Time Bot is a Discord bot designed to facilitate the scheduling and promotion of movie streaming events among friends on Discord. Its purpose is to make watching movies together an enjoyable and easy-to-manage experience. Movie Time's primary functions include configuring settings, generating movie posts, posting the latest movie schedules to specified channels, and managing movie events. Movie Time utilizes Letterboxd for linking movies and extracts detailed information from The Movie Database (TMDb) using their open and free API. Whether it's a casual movie night or a themed marathon, Movie Time brings friends together and takes care of the details. Future developments aim to expand functionality for broader use cases.
- Features
- Configuration
- Commands
- Typical Deployment
- Dependencies
- Notes
- Future Ideas
- Support and Contribution
- Configuration Management: Administrators can set up the bot's behavior within their guild.
- Schedule and Post Generation: Automatically generates and posts movie schedules.
- Event Management: Allows administrators to create, edit, and delete events.
- Multi-Movie Platform Support: Accepts movie links from Letterboxd and additional sites like IMDb for movie input.
- Expanded Event Management: Automatic creation and management of movie events with richer customization options.
- Web Application Component: A web interface for configuring, editing, and viewing movie nights directly through a browser.
Movie Time supports two configuration methods: using a secrets.json file or setting environment variables for sensitive information.
The secrets.json file stores sensitive information required by the bot, such as API keys and Discord tokens. Ensure this file is properly configured and kept secure.
Example Configuration:
{
"api_key": "TMDB_api_key",
"token": "discord_bot_token",
"guild_id": "guild_id"
}Alternatively, you can provide the same information using environment variables:
For Unix/Linux/macOS:
export TMDB_API_KEY="your_tmdb_api_key"
export DISCORD_BOT_TOKEN="your_discord_bot_token"
export GUILD_ID="your_guild_id"For Windows:
set TMDB_API_KEY=your_tmdb_api_key
set DISCORD_BOT_TOKEN=your_discord_bot_token
set GUILD_ID=your_guild_idHere are the updated commands available:
/config- Configure the bot's settings for the guild.
- Parameters:
default_timezone: Set the default timezone for the guild (e.g., 'EST', 'PST').stream_channel: Set the VoiceChannel for streaming.announcement_channel: Set the TextChannel for announcements.ping_role: Set the role to be pinged in announcements.
-
/post- Posts the latest generated movie schedule to the configured announcement channel.
-
/create_movie_post- Generates a movie post with details of the movies provided.
- Parameters:
start_time: The starting time of the event.theme_name: The theme name for the movie night.description: Description of the event.movie_urls: List of movie URLs.
-
/delete_event- Deletes a specified movie event.
-
/list_events- Lists all upcoming movie events in the guild.
/help- Displays detailed information about available commands and their usage.
You can deploy Movie Time using Docker for a smooth installation process. Follow these steps:
-
Clone the repository:
git clone https://github.com/nrossetti/movie-time.git cd movie-time -
Build and run the Docker container:
docker-compose up --build
-
Set environment variables in a
.envfile or export them directly to the shell:
For Unix/Linux/macOS:
TMDB_API_KEY="your_tmdb_api_key"
DISCORD_BOT_TOKEN="your_discord_bot_token"
GUILD_ID="your_guild_id"For Windows:
set TMDB_API_KEY=your_tmdb_api_key
set DISCORD_BOT_TOKEN=your_discord_bot_token
set GUILD_ID=your_guild_idAlternatively, use a secrets.json file as described above.
- discord.py: For Discord API interactions.
- pytz: For timezone handling.
- TMDb API: For fetching movie details.
- Ensure proper permissions are set for the bot to function correctly, including sending messages and accessing roles in the server.
- The bot is designed with security in mind, ensuring sensitive data like tokens and API keys are handled responsibly.
- Letterboxd API Access: Explore integration with Letterboxd's API to enhance features.
- Custom Themes and Styles: Allow for customized movie posts with themes.
For support or to contribute to the development of Movie Time, please contact the repository owner via GitHub.