Discord - IEEE-Team-3/map GitHub Wiki

Overview

The integration with Discord will allow the app to create a seamless connection between the platform and a Discord server. Users will be able to link their accounts to Discord, and key events in the app (like task completions, announcements, etc.) can trigger notifications to a Discord channel.

Features

  • User Linking: Users can link their app account with their Discord account.
  • Role Synchronization: The system will synchronize app roles with Discord roles, ensuring the correct permissions are given to users.
  • Notifications: The app will send real-time notifications to Discord channels for key events, such as task updates, announcements, or team activity.
  • Custom Webhooks: Admins can create custom webhooks to send specific data to Discord channels for various events.

Example Flow

  1. A user links their Discord account to the app.
  2. The system synchronizes roles between the app and Discord.
  3. When a task is completed, a webhook triggers a notification to the designated Discord channel.
  4. Users in the channel see the notification and can interact with it if applicable.

Example Webhook

const discordWebhookUrl = 'https://discord.com/api/webhooks/your-webhook-url';
const payload = {
  content: 'Task "Fix login bug" has been completed!',
  username: 'Task Bot',
};

fetch(discordWebhookUrl, {
  method: 'POST',
  body: JSON.stringify(payload),
  headers: { 'Content-Type': 'application/json' },
});
⚠️ **GitHub.com Fallback** ⚠️