Webhooks & Logging
RoleLogic can send notifications to Discord channels whenever roles change. This keeps your team informed and creates an audit trail of all automated actions.
What Are Webhook Logs?
A webhook log is a configured notification that sends messages to a Discord channel when RoleLogic changes a member's roles. You can customize:
- Which channel receives notifications
- What the message looks like
- What information is included
- The webhook's name and avatar
Setting Up a Webhook Log
Step 1: Grant Webhook Permissions
RoleLogic needs the "Manage Webhooks" permission in the channel where you want to send notifications.
To grant this:
- Go to the channel in Discord
- Click the gear icon to open Channel Settings
- Go to Permissions
- Find the RoleLogic role (or bot)
- Enable "Manage Webhooks"
Step 2: Create a Log Configuration
- In the RoleLogic dashboard, go to your server
- Find the Logs or Webhooks section
- Click "Create New Log" or "Add Webhook"
Step 3: Configure the Log
Select a Channel: Choose which Discord channel should receive notifications.
Set Webhook Name (Optional): Customize the name that appears as the sender. Default is "RoleLogic".
Set Avatar URL (Optional): Provide a URL to a custom avatar image. The webhook will use this icon.
Configure Message Content: Enter the message template. Use placeholders (see below) to include dynamic information.
Step 4: Attach to Rules
After creating a log, attach it to specific rules:
- Open a rule in the editor
- Find the "Log" or "Webhook" option
- Select your configured log
- Save the rule
Now, whenever that rule triggers, a notification is sent.
Dynamic Placeholders
Placeholders let you include dynamic information in your webhook messages. When the webhook fires, placeholders are replaced with actual values.
How to Use Placeholders
Type placeholders in curly braces within your message:
{user.mention} just got new roles!
This becomes:
@JohnDoe just got new roles!
Available Placeholders
User Information
| Placeholder | Description | Example Output |
|---|---|---|
{user.mention} | Mentions the user | @JohnDoe |
{user.nickname} | Server nickname | JohnDoe |
{user.tag} | Username#discriminator | JohnDoe#1234 |
{user.id} | User's Discord ID | 123456789012345678 |
{user.avatar_url} | URL to user's avatar | https://cdn.discord... |
Role Changes
| Placeholder | Description | Example Output |
|---|---|---|
{roles.added.names} | Names of added roles | VIP, Premium |
{roles.added.mentions} | Mentions of added roles | @VIP, @Premium |
{roles.removed.names} | Names of removed roles | Guest, Trial |
{roles.removed.mentions} | Mentions of removed roles | @Guest, @Trial |
Server Information
| Placeholder | Description | Example Output |
|---|---|---|
{server.name} | Server name | My Awesome Server |
{server.id} | Server ID | 987654321098765432 |
{server.member_count} | Total members | 1,234 |
{server.icon_url} | Server icon URL | https://cdn.discord... |
{server.description} | Server description | Welcome to our community! |
{server.banner_url} | Server banner URL | https://cdn.discord... |
{server.vanity_url} | Vanity invite URL | discord.gg/myserver |
{server.boost_count} | Number of boosts | 15 |
{server.boost_tier} | Boost level (0-3) | 2 |
Channel Information
| Placeholder | Description | Example Output |
|---|---|---|
{channel.name} | Channel name | role-logs |
{channel.mention} | Channel mention | #role-logs |
{channel.topic} | Channel topic | Log channel for role changes |
{channel.url} | Link to channel | https://discord.com/channels/... |
{channel.category.name} | Parent category | Admin Channels |
Bot Information
| Placeholder | Description | Example Output |
|---|---|---|
{bot.nickname} | Bot's server nickname | RoleLogic |
{bot.mention} | Bot mention | @RoleLogic |
{bot.avatar_url} | Bot's avatar URL | https://cdn.discord... |
Time and Date
| Placeholder | Description | Example Output |
|---|---|---|
{time:short} | Short time format | 3:45 PM |
{time:long} | Long time format | 3:45:30 PM |
{date:short} | Short date format | 01/15/2024 |
{date:long} | Long date format | January 15, 2024 |
{timestamp} | Discord timestamp | <t:1705329930> |
{timestamp:r} | Relative timestamp | 5 minutes ago |
Placeholder Suggestions
When typing in the message editor, type { to see a dropdown of available placeholders. Select one to insert it into your message.
Example Webhook Messages
Simple Notification
🔔 **Role Update**
{user.mention} received: {roles.added.names}
Output:
🔔 Role Update @JohnDoe received: VIP, Premium
Detailed Log
**Member:** {user.tag}
**Added:** {roles.added.names}
**Removed:** {roles.removed.names}
**Time:** {timestamp}
Output:
Member: JohnDoe#1234 Added: VIP, Premium Removed: Guest Time:
<t:1705329930>
Staff Alert
⚠️ Staff role change detected!
{user.mention} now has: {roles.added.mentions}
Processed by RoleLogic at {time:long}
Customizing Appearance
Webhook Username
Set a custom name for the webhook sender:
- "RoleLogic" (default)
- "Role Bot"
- "Server Automation"
- Your server's name
Webhook Avatar
Provide a URL to an image for the webhook's avatar. This could be:
- Your server's logo
- A custom bot icon
- Any publicly accessible image URL
Accent Color
Set a color for embed messages (if using embeds):
- Use a hex color code
- Match your server's branding
- Use different colors for different log types
Media Attachments
Include images or media in your webhook messages:
- Provide a media URL
- Useful for branded notifications
- Can be positioned above or below content
Premium Features
Watermark Removal
Free plan webhook messages include a small RoleLogic watermark/branding. Premium plans remove this for clean, professional notifications.
Advanced Components
Premium unlocks advanced webhook features:
- V2 component messages
- Custom branding options
- Enhanced media support
Managing Multiple Logs
You can create multiple webhook logs for different purposes:
- Staff log: Detailed notifications in a staff channel
- Public log: Simple notifications in a public channel
- Audit log: Comprehensive records in a secure channel
Each log can have different configurations and be attached to different rules.
Tips for Effective Logging
Don't Over-Log
Sending too many notifications can be noisy. Consider:
- Logging only important role changes
- Using a dedicated channel that staff can mute
- Consolidating logs where possible
Use Meaningful Messages
Include enough context that someone can understand what happened without investigating:
- Who was affected
- What roles changed
- When it happened
Protect Sensitive Channels
Role change logs might contain information about moderation actions. Consider:
- Using private staff channels
- Limiting who can see the log channel
- Not logging sensitive rule triggers publicly
Review Logs Periodically
Webhook logs create a record of all automated actions. Review them to:
- Verify rules are working correctly
- Spot unexpected patterns
- Audit automation behavior
Troubleshooting
"No Webhook Perms"
RoleLogic doesn't have "Manage Webhooks" permission in the target channel. Grant this permission through channel settings.
Messages Not Appearing
- Verify the channel exists and is accessible
- Check RoleLogic has permissions in that channel
- Confirm the log is attached to an enabled rule
- Verify the rule is actually triggering
Placeholders Showing Raw
If you see {user.mention} instead of an actual mention:
- Check for typos in the placeholder
- Ensure you're using the correct placeholder format
- Try removing and re-adding the placeholder
Next Steps
- Placeholders Reference — Complete placeholder list
- Activity Log — Track configuration changes
- Best Practices — Optimize your logging setup