A comprehensive Discord bot for managing design orders and providing utility functions for the WTX Studios community. This bot facilitates order management for various design services including graphics, liveries, clothing, and Discord server setups.
- Order Management System: Create and manage design orders with customizable order types
- Role-Based Access Control: Control who can access different order types and commands
- Order Tracking: Track orders from creation to completion
- Transcripts: Generate and store order conversation transcripts
- Database Storage: Store order information in an SQLite database
- Customizable Configuration: Easily configure the bot through a YAML configuration file
- Utility Commands: Various utility commands for server management
- Python 3.8 or higher
- pip (Python package manager)
- A Discord bot token (create one at Discord Developer Portal)
-
Clone the repository:
git clone https://github.com/yourusername/wtx-studios.git cd wtx-studios
-
Create a virtual environment (recommended):
python -m venv .venv
-
Activate the virtual environment:
- Windows:
.venv\Scripts\activate
- macOS/Linux:
source .venv/bin/activate
- Windows:
-
Install the required dependencies:
pip install -r requirements.txt
-
Create a
.env
file in the root directory with the following content:TOKEN=your_discord_bot_token ERROR_WEBHOOK_URL=your_error_webhook_url
Replace
your_discord_bot_token
with your actual Discord bot token andyour_error_webhook_url
with a Discord webhook URL for error reporting. -
Configure the
config.yaml
file according to your needs (see Configuration section). -
Database Setup:
- The bot uses an SQLite database (
database.db
) to store order information - The database will be automatically created when the bot is first run
- No additional setup is required for the database
- The bot uses an SQLite database (
-
Run the bot:
python main.py
The bot is configured through the config.yaml
file. This file contains various settings that control the bot's behavior.
- activity: Configure the bot's activity status
- type: The type of activity (PLAYING, LISTENING, WATCHING, STREAMING, COMPETING, CUSTOM)
- name: The text displayed in the activity
- status: The bot's status (online, idle, dnd, invisible)
- prefix: The command prefix for text commands
- lockState: Controls the bot's operational mode
- 100: Normal operation
- 200: Maintenance mode (no new orders, existing orders can be processed)
- 300: Development mode (all access restricted to developers)
- 400: Disable all interactions
- debugGuildID: The ID of the guild for testing commands
- useDebugGuild: Whether to use the debug guild for testing
- mainRoleID: The ID of the main role for users
- transcriptChannelID: The channel where order transcripts are sent
- orderLogChannelID: The channel where order logs are sent
- panelColor: The color for panels in hexadecimal format
- discordLogoURL: The URL of the Discord logo
- emojis: Custom emojis used by the bot
Each order type has the following configuration:
- type: Unique identifier for the order type
- displayName: Name shown in the bot
- description: Brief description of the order type
- emoji: Emoji representing the active order type
- emojiDisabled: Emoji representing the inactive order type
- active: Whether the order type is currently active
- accessRoles: Role IDs that can access this order type
- pings: Role IDs to ping when an order is placed
- color: Color associated with the order type
- img: Image URLs for the order type
- bannerURL: Main banner image
- subBannerURL: Sub-banner image
- iconURL: Icon image
- categoryID: Category where order channels are created
- modal: Form shown to users when placing an order
- name: Identifier for the modal
- title: Title displayed on the modal
- fields: Input fields for the modal
- Invite the bot to your server and ensure it has the necessary permissions.
- Use the
/setup
command to create the order panel in a specified channel. - Users can select an order type from the dropdown menu to create a new order.
- When a user creates an order, a new channel is created in the appropriate category.
- Staff members with the correct roles can claim orders using the
/claim
command. - Orders can be closed using the
/close
command or the "Close Order" button. - Transcripts of closed orders are saved in the designated transcript channel.
The bot provides various utility commands for server management. See the Commands section for details.
/setup [channel]
: Sets up the order panel in the specified channel/claim
: Claims an order (staff only)/unclaim
: Unclaims an order (staff only)/close
: Closes an order (staff only)/closerequest
: Requests to close an order (staff only)/add [member]
: Adds a user to an order (staff only)/remove [member]
: Removes a user from an order (staff only)/status
: Updates the status of order types (admin only)
/activity [activity] [text] [status]
: Sets the bot's activity and status (admin only)/tax [amount]
: Calculates Roblox tax for a given amount/ping
: Shows the bot's latency/prefix [new_prefix]
: Changes the bot's command prefix (admin only)/lockstate [lock_state]
: Changes the bot's lock state (admin only)/review [designer] [product] [rating] [feedback]
: Submits a review for a designer
The bot supports multiple order types, each configurable in the config.yaml
file:
- Graphics: For graphic design orders
- Liveries: For vehicle livery design orders
- Clothing: For clothing design orders
- Discords: For Discord server setup orders
Each order type can have its own category, access roles, and modal configuration.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.