A personalized discord bot developed using Discord Developer Profile and Golang that can be seamlessly integrated into any discord server that you own and acts like a personal chatbot to know more about Hewlett Packard Enterprise (HPE)
-
Golang
-
Dependency for DiscordGo:
https://www.github.com/bwmarrin/discordgo
- Navigate to Discord Developer Portal
- Click on the
New Application button
and provide any name to your application (You can't keep a name that has the word Discord in it)
Note
The application is not the Discord Bot
- On the left menu, select
Bot
- Uncheck the public bot check box
- Click the
Reset Token button
, to generate a Token ID. - Go to
URL Generator
underOAuth2
on the left, and provide the scope asBot
, and permissions necessary as per the bot you want to develop. You can set permissions like Administrator privileges, send messages, send messages in threads, React to messages, and almost all other activities that you can perform on discord - Copy the URL generated at the bottom, after the permissions are set.
- Go to that URL and add the bot to any of your servers, after all these steps you should have a Token ID and Bot(offline) in your server.
Important
After you have your file structure and the code ready do the following: Initialize the module
go mod init example.com/hello_world_bot
Add the discord Go dependency
go get github.com/bwmarrin/discordgo
This command will make the Bot online and can respond to your requests
go run main.go