Skip to content
/ Gobot Public

A lightweight and fast AI-powered Discord chatbot built using Golang, DiscordGo, and the OpenAI API.

Notifications You must be signed in to change notification settings

Mishu03/Gobot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


🧠 Discord AI Chatbot (Go + OpenAI)

A lightweight and fast AI-powered Discord chatbot built using Golang, DiscordGo, and the OpenAI API.

This bot listens to Discord commands and responds with:

  • Latency checks
  • Greetings
  • AI-generated answers using the !ask command

⭐ Features

πŸ”Ή AI Chat Command

Ask the bot anything using:

!ask What is Golang?

The bot sends your question to OpenAI and replies with an intelligent answer.

πŸ”Ή Basic Commands

!ping   β†’ Pong!
!hello  β†’ Simple greeting

πŸ”Ή Built in Go

Fast, concurrent, simple to deploy, and easy to extend.


πŸ“¦ Tech Stack

  • Go (Golang)
  • DiscordGo – Discord API wrapper
  • OpenAI API
  • Environment variables for secure key management

πŸš€ Getting Started

1. Clone the Repository

git clone https://github.com/yourname/discord-go-chatbot.git
cd discord-go-chatbot

2. Set Environment Variables

setx DISCORD_BOT_TOKEN "your-bot-token"
setx OPENAI_API_KEY "your-openai-key"

Restart your terminal after setting them.

3. Run the Bot

go run main.go

πŸ“ Project Structure

/discord-bot
│── main.go
│── go.mod
│── README.md

🎯 Bot Commands

Command Description
!ping Check if the bot is alive
!hello Simple greeting
!ask <question> Ask the AI anything

🀝 Contributions

Contributions, issues, and feature requests are welcome. Feel free to submit a PR!


πŸ“„ License

This project is licensed under the MIT License.


About

A lightweight and fast AI-powered Discord chatbot built using Golang, DiscordGo, and the OpenAI API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages