Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.
/ helios Public archive

An easy-to-use discord weather bot made using python. It can automatically send updated weather feeds to a discord channel you want.

License

Notifications You must be signed in to change notification settings

Shagnikpaul/helios

Repository files navigation

Logo

Helios will not be hosted any more you can continue using it by self hosting.

I am an easy-to-use discord weather bot. I fetch data from OpenWeatherMap API and then generate a Weather card based on that data and display it to the user through a discord embed. I can also send updated weather feed automatically to a particular text channel in your server every 30 minutes.

‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎
‎ ‎ ‎ ‎



❓ How to use the bot...


For complete list of commands along with tutorials, visit my gitbook docs.

🔧 First time setup. (Required)

Make sure while inviting the bot you had given the bot the access to all the required permissions it was asking. Without them the bot will not work. They are also required for sending automatic weather feeds.

Helios supports prefix !w but only help command (!whelp) works for now. It is recommended to use the slash-commands since only they will be updated in future.

  • Run the following slash command with location and weather forecast units you want.

  • /user-setup
    
    # location and units required.   
  • Now you can start using the bot. Go to General Commands to get started.

🤖 Configure the bot to send weather automatically to a particular channel in your server. (Optional)

Tired of typing /weather command repeatedly to get weather? Want the bot to send you updated weather information automatically in a particular text channel of your server? Yes you can do that by running the following command.


/set-weather-feed

# Field 1 : your city / town name
# Fiedl 2 : units you want your weather in.
# Field 3 : the text channel you want the weather info to be sent in.

This will send a confirmation message in that particular channel. Wait for around 25-30 minutes, the bot will automatically start sending weather updates (basically it will edit the existing message with the weather data, so please don't delete that message 🤓). The bot will automatically update weather data after every 30 minutes.



🟢 General usage.

After completing the setup, run the following slash command to get weather.

/weather 

*️⃣ Other commands.

List of all commands supported by the bot can be obtained by running the following slash command.

/help-helios   

😎 Host the bot locally.

Sometimes hosting services don't work properly or just randomly shut down resulting in bot becoming offline and in that case no one can invite the bot to their server and use it. So if you have an old spare computer why not use it to host this bot for your own use? Following are the instructions on how to do so.


  • First of all, create a bot account and invite your bot to your server. Here's a brief guide on how to do so.
  • Download and install the latest version of Python.
  • Clone the repository and navigate to that repository folder.

  • git clone https://github.com/Shagnikpaul/helios.git
    cd helios
    
  • Inside the root directory, create a .env file and put the following tokens.

  • botToken=
    latlonAPIKEY=
    
  • botToken is your discord bot token. Here's a guide on how to get it.
  • latlonAPIKEY is your positionstack API KEY required for searching a particular location's latitude and longitute. Get it here.
  • Open terminal in the root/project directory.
  • Install the required dependencies by running the following command in the terminal.

  • pip install -r requirements.txt
    
  • Start the bot by running the following command in the terminal.

  • python main.py
    
  • Your bot is now ready for use! Refer to Bot Commands for setting up the bot for server use.

😇 Contributing.

"All contributions are welcome! Just try to make meaningful contributions to the code, no goofy aah scripts or malware please."
- 🤓


📖 Instructions


🌟 Python Libraries and APIs used in this Project.



🚨 License.


MIT License

Copyright (c) 2022 Shagnik Paul

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.