utils.django_permissions module
Django Permission Integration for Discord Bot
This module provides integration with the Django web interface’s admin panel permission system, allowing the Discord bot to use the same server-specific permission configuration that users set through the web interface.
- utils.django_permissions.get_django_database_path()[source]
Get the Django database path from configuration.
- Returns:
Path to Django SQLite database, None if not found.
- Return type:
Optional[str]
- utils.django_permissions.get_server_permission_config(guild_id)[source]
Get server permission configuration from Django database.
- Parameters:
guild_id (
int
) – Discord guild ID to get permissions for.- Returns:
Permission configuration dict, None if not found.
- Return type:
Optional[Dict]
- utils.django_permissions.check_server_permission(member, guild_id, permission_type)[source]
Check if a Discord member has the specified permission for a server.