Skip to content

ResyncedDesign/DiscordGoBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎉 Discord Go Bot Template

Consider giving this a ⭐ to show your support! <3


Welcome to the Open-Source Discord Go Bot Template! This project is built using Go and comes with everything you need to get started on building your own Go powered discord bot. For a more detailed breakdown look at our Documentation.


🌟 Features

  • 🔒 Secure Configurations – Environment-based .env file setup
  • 📦 Modular Design – Easily extend and customize features

🚀 Getting Started

  1. Clone the Repository:

    gh https://github.com/ResyncedDesign/DiscordGoBot.git <folder-name>
    cd <folder-name>
  2. Install Dependencies:

    Run one of the following commands to install all required packages:

    go mod tidy
  3. Set Up Environment Variables:

    Create a .env file in the root directory with the following structure:

    TOKEN=your_discord_bot_token
    CLIENTID=your_discord_application_client_id
    GUILDID=your_discord_guild_id
    
  4. Build and Start the Bot:

    Compile the bot and start it using:

    go build -o bot main.go
    ./bot

✨ Inviting the Bot to Your Server

To invite the bot to your Discord server, follow these steps:

Note

Ensure you select all the intents for the bot to work.

  1. Go to your Discord application's OAuth2 section in the Discord Developer Portal.

  2. Generate an invite link using the bot's Client ID with the required scopes and permissions. Example link:

    https://discord.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=8&integration_type=0&scope=applications.commands+bot
    
  3. Replace YOUR_CLIENT_ID with the CLIENT_ID from your .env file.

  4. Open the link in a browser and add the bot to your desired server.


🛠️ Customizing the Bot

To start customizing, edit the files in the src directory. Key files include:

  • main.go – Main entry point for the bot.
  • src/commands/categories – Directory containing bot commands (add new commands here).
  • src/events/categories – Directory containing bot events (add new events here).
  • src/types – Directory containing custom types and interfaces.
  • src/config – Directory containing configuration files and environment variables.

Changes will take effect after rebuilding the project using:

go build -o bot main.go
./bot

OR you can use the following command to run the bot:

go run main.go

🤝 Contributing

Contributions are welcome! Feel free to fork the repository and submit pull requests for improvements or new features.


💡 Suggestions or Feedback?

If you have ideas for improving this bot or encounter any issues, feel free to open an issue or reach out. Happy coding! 🎉

About

A customizable and fast Go Discord bot.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages