Area Security¶
Area security enables multi-community setups where different communities have access to different geofence areas, controlled by Discord roles or Telegram group membership.
Enable Area Security¶
When strict_locations = true, every alert is checked against the community's location_fence — alerts outside the fence are suppressed even if the user has tracking rules that would match.
Warning
When area security is enabled, the channels and user_role settings in [discord] and [telegram] are ignored. Registration and access are controlled per-community instead.
Community Definitions¶
Each community defines:
allowed_areas— geofence names users in this community can use with!area addlocation_fence— the geofence used for strict location checking- Discord access — registration channels and qualifying roles
- Telegram access — qualifying group memberships
Example: Two Communities¶
Communities are defined as a TOML array of tables ([[area_security.communities]]). Each entry has a name, an allowed_areas array, a location_fence array, and inline discord / telegram tables.
[area_security]
enabled = true
strict_locations = false
[[area_security.communities]]
name = "newyork"
allowed_areas = ["manhattan", "bronx", "brooklyn", "queens"]
location_fence = ["wholenewyork"]
discord = { channels = ["1234567890123456"], user_role = ["9876543210987654"] }
telegram = { channels = ["-100123456789"] }
[[area_security.communities]]
name = "chicago"
allowed_areas = ["northwest", "southside", "central"]
location_fence = ["wholechicago"]
discord = { channels = ["1111111111111111"], user_role = ["2222222222222222"] }
telegram = { channels = ["-100987654321"] }
How It Works¶
- A user registers via
!poraclein a community's registration channel - Their access is determined by the community configuration:
- Discord: User must be in one of the community's
channelsor have one of theuser_roleroles - Telegram: User must be a member of one of the community's groups
- The user can only
!area addgeofences listed in that community'sallowed_areas - If
strict_locations = true, alerts are filtered by the community'slocation_fence
Multi-Community Users¶
Users can belong to multiple communities. Their available areas are the union of all their communities' allowed_areas.
Discord Setup¶
For each community, specify:
channels— Discord channel IDs where users can registeruser_role— Discord role IDs that grant automatic access
[[area_security.communities]]
name = "mytown"
allowed_areas = ["downtown"]
location_fence = ["mytown"]
discord = { channels = ["registration-channel-id"], user_role = ["member-role-id", "another-role-id"] }
Telegram Setup¶
For each community, specify the groups whose membership grants access: