Welcome to the Flight Ticket Booking Discord Bot project! This bot simulates a flight ticket booking system within Discord, providing users with a fun and interactive experience. Disclaimer: This bot is purely for educational and entertainment purposes and is not associated with any real-life booking service.
Created by Bala Aditya and Sri Ram Charan, this project is a CS project for learning and showcasing our coding skills. This Discord bot uses Python and MySQL to create a simulated booking experience where users can:
- Book tickets
- Lookup flight details
- Cancel tickets
- Get support on various issues
This bot is a fun tool to engage users and can be used as a project in various CS-related curricula.
Disclaimer: This bot is a fictional project and not intended for real-life ticket booking. It does not guarantee any real-world bookings or reservations.
- Interactive Ticket Booking: Users can purchase and manage tickets within Discord.
- Database Integration: All bookings are saved to a MySQL database, providing a persistent record.
- User Support: Users can ask questions and get assistance with their fictional bookings.
- Inquiries: Check flight status, delays, and terminal information.
- Modern UI: Uses rich embeds and interactive buttons for a sleek look.
- Animations: Enhance the user experience with smooth animations in Discord.
To run this bot locally, follow these steps:
-
Clone the repository:
git clone https://github.com/applxcake/Discord-Bot-Class-12-Cs-project cd Discord-Bot-Class-12-Cs-project
-
Install dependencies:
pip install discord.py mysql-connector-python
-
Setup MySQL Database:
- Install MySQL on your system if you haven't already.
- Create a database called
flight_booking
and add the following tables:
CREATE TABLE IF NOT EXISTS backgrounds ( id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255), url TEXT ); CREATE TABLE IF NOT EXISTS class ( id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255), section VARCHAR(50) ); CREATE TABLE IF NOT EXISTS custom_emojis ( id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255), url TEXT ); CREATE TABLE IF NOT EXISTS discord_emojis ( id INT PRIMARY KEY AUTO_INCREMENT, emoji VARCHAR(50) ); CREATE TABLE IF NOT EXISTS emojis ( id INT PRIMARY KEY AUTO_INCREMENT, symbol VARCHAR(50), description TEXT ); CREATE TABLE IF NOT EXISTS flight ( flight_number VARCHAR(50) PRIMARY KEY, place VARCHAR(255), delay VARCHAR(50), terminal VARCHAR(50) ); CREATE TABLE IF NOT EXISTS gayness_levels ( id INT PRIMARY KEY AUTO_INCREMENT, level INT ); CREATE TABLE IF NOT EXISTS levels ( id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255), points INT ); CREATE TABLE IF NOT EXISTS meme_audios ( id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255), url TEXT ); CREATE TABLE IF NOT EXISTS study ( id INT PRIMARY KEY AUTO_INCREMENT, topic VARCHAR(255), notes TEXT ); CREATE TABLE IF NOT EXISTS test ( id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(255), score INT ); CREATE TABLE IF NOT EXISTS tickets ( ticket_number VARCHAR(8) PRIMARY KEY, passenger_name VARCHAR(100), age INT, passport_number VARCHAR(20), departure_country VARCHAR(50), destination_country VARCHAR(50), flight_type VARCHAR(20), price DECIMAL(10, 2), arrival_date DATE, group_ticket_number VARCHAR(30), member_id BIGINT NOT NULL ); CREATE TABLE IF NOT EXISTS transactions ( id INT PRIMARY KEY AUTO_INCREMENT, amount DECIMAL(10, 2), description TEXT ); CREATE TABLE IF NOT EXISTS user_levels ( user_id BIGINT PRIMARY KEY, level INT ); CREATE TABLE IF NOT EXISTS users ( id BIGINT PRIMARY KEY, username VARCHAR(255), discriminator VARCHAR(10) );
-
Configure Database Connection:
- Update your database connection details in the code where the MySQL connection is established.
-
Run the bot:
python main.py
Ensure you have a Discord bot set up and have its token ready to insert into the code. You can create a bot at the Discord Developer Portal.
- Python: Main programming language for bot functionality.
- MySQL: Database for storing and managing ticket data.
- Discord API: For interaction within the Discord platform.
- Animations: Animated interactions using Discord components.
This bot is strictly for educational purposes and should be used solely as a CS project or fun Discord bot. It is not a real booking service and does not guarantee any real-life ticket reservations or support. All interactions and data are simulated.
This project is licensed under the MIT License. For more details, see the LICENSE file.
We have adopted a Code of Conduct for this project. All contributors are expected to uphold this code to create a welcoming and inclusive environment.