Location
Configuring the Location Module
The Location module allows users to set their location using a command, which utilizes the OpenCage Geocoding API to retrieve location details such as latitude, longitude, and timezone.
Configuration Options
- Set User Location
- Sets the location of the user using the OpenCage API.
- Usage:
,set location <location_name>
- Example:
,set location London, GB
Details
When a location is set, the module fetches the following information:
- Timezone: The timezone of the specified location.
- Latitude: The latitude coordinate of the location.
- Longitude: The longitude coordinate of the location.
- Name: A human-readable name of the location, including relevant parts like town, city, state, and country.
Examples
- To set your location to New York, USA:
,set location New York, USA
- Response:
Your location has been set to New York, USA.
- Response:
Notes
- Ensure you have the OpenCage API key configured in the bot’s configuration for the module to work.
- The setting can be configured for individual users, allowing each user to set their own location.
- The set location command should return a detailed response including the name, latitude, longitude, and timezone of the location.