This is a Discord bot that allows users to check detailed information about any IP address using the ip-api.com API. The bot provides information such as country, city, region, district, zip code, latitude, longitude, timezone, currency, ISP, organization, AS number, AS name, reverse DNS, mobile status, proxy status, and hosting status.
- Discord command
/check <ip_address>to retrieve detailed information about the specified IP address. - Logging of user information and bot responses in a
logger.txtfile. - Error handling for invalid IP addresses or API failures.
- Python 3.6 or higher
discord.pylibraryrequestslibrary
- Clone the repository or download the source code.
- Install the required dependencies by running
pip install -r requirements.txt. - Create a new Discord bot and obtain the bot token.
- Create a new Discord server or use an existing one, and obtain the server ID (Guild ID).
- Create a
.envfile in the project directory, copy.env.examplecontents and paste in the new file. - Replace
TOKENwith your bot token andGUILDIDwith your guild id.
- Run the
main.pyscript to start the bot. - In your Discord server, use the
/check <ip_address>command to retrieve detailed information about the specified IP address.
The bot will respond with a formatted message containing the IP information, and the response will also be logged in the logger.txt file.
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
- Thanks to Nitrrine for various improvements and fixes.
This project is licensed under the MIT License.
This bot is not designed to scan or retrieve the IP addresses of Discord users. Using this bot for malicious purposes, such as attempting to obtain sensitive information or compromising user privacy, is strictly prohibited and goes against Discord's Terms of Service. Any unauthorized or unethical use of this bot will not be tolerated.