Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/begenov/on_esports_task
https://github.com/begenov/on_esports_task
discord-bot golang weather-api
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/begenov/on_esports_task
- Owner: begenov
- Created: 2024-02-02T19:20:49.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-02-03T12:38:03.000Z (12 months ago)
- Last Synced: 2024-11-06T15:50:07.420Z (3 months ago)
- Topics: discord-bot, golang, weather-api
- Language: Go
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Discord Bot
## Description
This Discord bot is created to polls and fetching weather information. Simply set up the bot according to the instructions below and start using it on your Discord server.## Installation and Configuration
1. **Clone the repository:**
```bash
git clone https://github.com/begenov/on_esports_task.git
cd on_esports_task
```2. **Install dependencies:**
```bash
go mod tidy
```3. **Configure settings:**
Create a .env file in the project's root and specify the required parameters:```bash
OPEN_WEATHER_MAP_API_KEY='OPEN_WEATHER_MAP_API_KEY'
DISCORD_BOT_TOKEN='DISCORD_BOT_TOKEN'
```4. **Run the bot:**
```bash
go run cmd/main.go
```## User Guide
### Help
- `!help`: Display information about available commands and how to use them.
### Weather
- `!weather `: Get the current weather in the specified city.
### Polls
- `!poll create "Poll Title" | "Option 1" "Option 2" ...`: Create a new poll with the specified answer options.
- `!poll vote `: Vote for the selected option in the poll.
- `!poll result `: View the results of a specific poll.**Example:**
```bash
!poll create "Favorite Color" "Red" "Blue" "Green"
!poll vote 1 2
!poll result 1
```**Make sure to replace `OPEN_WEATHER_MAP_API_KEY` and `DISCORD_BOT_TOKEN` with your actual OpenWeatherMap API key and Discord bot token.**