https://github.com/therealowenrees/plantid_discordbot
Plant ID Bot identifies plants from photos of their organs, passing to the Plantnet API for identification.
https://github.com/therealowenrees/plantid_discordbot
discord discord-bot gardening identification plants pycord
Last synced: 8 months ago
JSON representation
Plant ID Bot identifies plants from photos of their organs, passing to the Plantnet API for identification.
- Host: GitHub
- URL: https://github.com/therealowenrees/plantid_discordbot
- Owner: TheRealOwenRees
- Created: 2022-03-03T15:35:02.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-12-03T23:49:39.000Z (10 months ago)
- Last Synced: 2024-12-04T00:28:39.583Z (10 months ago)
- Topics: discord, discord-bot, gardening, identification, plants, pycord
- Language: Python
- Homepage:
- Size: 245 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Plant ID Bot
## A plant identification bot for your Discord server.Plant ID Bot identifies plants from photos of their organs, passing to the [Plantnet API] for identification. This bot was written for [Sustainable Living Hub](https://discord.com/invite/gQU5yWg)
If you wish to invite this bot to your server, use [this link.](https://discord.com/api/oauth2/authorize?client_id=948227126094598204&permissions=19520&scope=bot) However, your server will be limited to a maximum of 20 idendifications every 24h. It is strongly preferred that you host a version of this bot yourself and register for your own PlantNet API key. Details for this are later in this readme file.
## Features
- Takes the message picture attachments and attempts to identify them
- Returns a suggested plant name and up to 2 alternatives, with a percentage confidence rating
- Plant names are given in latin with a list of possible common names
- Provides links to [GBIF] and [PFAF] for the identified plant## Prerequisites
Plant ID Bot uses a small number of prerequisites in order to work properly:
- [Pycord] - a modern, easy to use, feature-rich, and async ready API wrapper for Discord, written in Python
- [Beautiful Soup] - a python library for pulling data out of HTML and XML files
- [python-dotenv] - for reading local .env files during development## Installation
To add the Plant ID bot from this repository to your discord server, use this [invite](https://discord.com/api/oauth2/authorize?client_id=948227126094598204&permissions=19520&scope=bot).
If you fork this repository and wish to host your own version of this bot, you will need to:
- Create a new account at [Plantnet API].
- Create a new application and bot at the [Discord Developer Portal](https://discord.com/developers/applications). Follow this [guide](https://realpython.com/how-to-make-a-discord-bot-python/) if you are unsure.
- Create a local .env file to store `DISCORD_TOKEN` and `PLANTNET_API_KEY`. Add both your bot's secret token and PlantNet API key here repectively.
- Enable the bot permissions 'Read Messages/View Channels', 'Send Messages', 'Embed Links', 'Add Reactions'
- Host the files on your platform of choice. A Docker Compose file is supplied if that is the route you wish to take.
- Add the bot's secret token and your PlantNet API key to your platform's environment variables under the keys `DISCORD_TOKEN` and `PLANTNET_API_KEY`.## Development
Want to contribute? Simply fork, edit and then create a pull request. Details of how to do this can be found [here](https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github).
## Credits
- [themanifold](https://github.com/themanifold) who cast his careful eye over the code, making sure that I wasn't making any obvious errors, and for making my todo list longer each day
- [Country Roles](https://github.com/dolphingarlic/country-roles) from which my knowledge of Discord.py 'cogs' was solidified. Their implementation of 'BotInfo' was used to create more information on the bot, and generally helped me clean up my code## License
MIT
[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen. Thanks SO - http://stackoverflow.com/questions/4823468/store-comments-in-markdown-syntax)
[git-repo-url]:
[Plantnet API]:
[Pycord]:
[GBIF]:
[PFAF]:
[python-dotenv]:
[Beautiful Soup]: