Discord - IEEE-Team-3/map GitHub Wiki
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.
- 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.
- A user links their Discord account to the app.
- The system synchronizes roles between the app and Discord.
- When a task is completed, a webhook triggers a notification to the designated Discord channel.
- Users in the channel see the notification and can interact with it if applicable.
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' },
});