- π Overview
- π¦ Features
- π Structure
- π» Installation
- ποΈ Usage
- π Hosting
- π License
- π Authors
This repository houses the "discord-member-status-bot" project, a sophisticated Discord bot designed to provide real-time insights into member activity within a server. Utilizing a robust tech stack comprising TypeScript, Discord.js, MySQL, and the Discord API, the bot empowers server administrators with invaluable data to make informed decisions regarding server management and member engagement.
Feature | Description | |
---|---|---|
βοΈ | Real-Time Member Status Updates: Tracks and displays member join/leave events in real time, showcasing online/offline status indicators. | |
π€ | Voice Channel Time Tracking: Monitors the duration of each member's presence in voice channels, calculating and displaying total voice channel time. | |
π¬ | Daily Message Count: Tracks and displays the number of messages sent by each member daily, providing a comprehensive understanding of member activity within the server's text channels. | |
π€ | Automated Embed Updates: Ensures embeds displaying real-time member status, voice channel time, and message counts are updated automatically at predefined intervals. | |
π§βπ» | User-Friendly Interface: Provides a user-friendly interface for bot configuration, enabling server administrators to customize settings, access commands, and manage bot functionality. | |
π‘οΈ | Robust Error Handling: Incorporates comprehensive error handling mechanisms to prevent crashes, data loss, and unexpected behavior. | |
π | Advanced Analytics (Optional): Potential for incorporating advanced analytics capabilities, providing insights into member trends and engagement patterns. | |
π | Server-Specific Configuration (Optional): Allows for server-specific configurations, enabling different servers to have customized settings. |
discord-member-status-bot/
βββ src/
β βββ events/
β β βββ ready.ts
β β βββ guildMemberAdd.ts
β β βββ guildMemberRemove.ts
β β βββ voiceStateUpdate.ts
β β βββ messageCreate.ts
β β βββ interactionCreate.ts
β βββ commands/
β β βββ status.ts
β β βββ voicetime.ts
β β βββ messagecount.ts
β β βββ help.ts
β β βββ config.ts
β βββ services/
β β βββ memberService.ts
β β βββ voiceChannelService.ts
β β βββ messageService.ts
β β βββ embedService.ts
β βββ utils/
β β βββ logger.ts
β β βββ errorHandler.ts
β β βββ database.ts
β β βββ helper.ts
β βββ config/
β β βββ env.config.ts
β β βββ database.config.ts
β βββ models/
β β βββ member.ts
β β βββ voiceChannel.ts
β β βββ message.ts
β β βββ embed.ts
β βββ interfaces/
β β βββ memberInterface.ts
β β βββ voiceChannelInterface.ts
β β βββ messageInterface.ts
β β βββ embedInterface.ts
β βββ index.ts
βββ dashboard/
βββ src/
β βββ main.ts
β βββ router.ts
β βββ components/
β β βββ App.vue
β β βββ Home.vue
β β βββ Members.vue
β β βββ VoiceTime.vue
β β βββ MessageCount.vue
β β βββ Config.vue
β β βββ About.vue
β βββ styles/
β β βββ index.css
β β βββ tailwind.css
β βββ store/
β β βββ index.ts
β β βββ modules/
β β βββ member.ts
β β βββ voiceTime.ts
β β βββ messageCount.ts
β β βββ config.ts
β β βββ embed.ts
β βββ utils/
β β βββ fetchAPI.ts
β β βββ auth.ts
β β βββ helper.ts
β βββ main.js
βββ vite.config.js
- Node.js
- npm
- MySQL
- Discord Bot Account
- Clone the repository:
git clone https://github.com/coslynx/discord-member-status-bot.git
- Navigate to the project directory:
cd discord-member-status-bot
- Install dependencies:
npm install
- Set up a MySQL database:
- Create a database and a user with appropriate permissions.
- Update the database configuration in
src/config/database.config.ts
with your database credentials.
- Create a Discord Bot Account:
- Create a Discord bot account and generate a bot token.
- Add your bot token to the
.env
file:DISCORD_TOKEN="YOUR_BOT_TOKEN"
- Configure the bot:
- Update the
src/config/env.config.ts
file with any necessary environment variables, such as your Discord server ID, bot prefix, and other settings.
- Update the
- Start the development server:
npm run dev
- Invite your bot to your server:
- Use the Discord developer portal to get a link to invite your bot to your server.
- Use the bot's commands:
- Try using commands like
/status
,/voicetime
,/messagecount
,/help
, and/config
(as available) to explore the bot's features.
- Try using commands like
- Environment Variables: Modify settings in the
.env
file to adjust various bot parameters. - Bot Settings: Use the
/config
command (if implemented) to customize the bot's behavior within your server.
/status
: Displays real-time member status updates./voicetime
: Shows the voice channel time for each member./messagecount
: Displays the daily message count for each member./help
: Provides a list of available commands and their descriptions.
- Build the project:
npm run build
- Set up a server environment:
- Choose a hosting platform (e.g., Heroku, AWS, Google Cloud) based on your needs.
- Create a new application or instance on your chosen platform.
- Configure the environment variables (e.g.,
DISCORD_TOKEN
,DB_HOST
,DB_USER
,DB_PASS
) on your server.
- Deploy the bot:
- Follow the specific deployment instructions for your hosting platform.
- Ensure your bot has the necessary permissions to operate within your server.
- GET /api/members: Retrieves a list of members with their activity data.
- GET /api/voice-channels: Retrieves a list of voice channels with member voice time data.
- GET /api/messages: Retrieves a list of messages with message count data.
- The bot uses Discord's OAuth2 authentication to securely access Discord API data.
- You can set up a web-based dashboard (optional) that requires user authentication for managing the bot.
curl -X GET http://localhost:3000/api/members
This project is licensed under the MIT License.
- Author Name - Spectra.codes
- Creator Name - DRIX10
Why only generate Code? When you can generate the whole Repository!