go-bot
A bot to interact with in natural language.
Made with :
Demo
Setup
First you need to created your .env
file (you can use the .env.dist file).
The DISCORD_TOKEN
variable is the discord bot token. It's needed in order to make the bot work.
You can get a token by following this link
We use wit.ai to understand natural language, a token is also needed as WIT_TOKEN
We also use youtube api to search for musics or videos, a token is needed as YOUTUBE_TOKEN
and can be created in google's applications admin console.
Finally, to get the weather informations our API uses OpenWeather. Get your API token and save it in .env as OWN_API_KEY
.
docker-compose up --build
Tests
You can run tests suites by using the following command :
go test -v ./<package-name>
Usage
Once the bot is invited to discord, you can talk to it simply by prefixing your messages with : assistant,
.
The bot is able to :
- find musics, ex:
assistant, fais moi écouter du Mickael Jackson
- give the weather, ex:
assistant, fait il beau à Paris
- search on google, ex:
assistant, comment faire un noeud de chaise
Contributing
We follow a code of conduct, if you wish to contribute on this project, we strongly advise you to read it.
Branch naming convention
-
You branch should have a name that reflects it's purpose.
-
It should use the same guidelines as COMMIT_CONVENTIONS (feat
, fix
, build
, perf
, docs
), followed by an underscore (_
) and a very quick summary of the subject in [kebab case][1].
Example: feat_add-image-tag-database-relation
.
Pull requests (PR)
Pull requests in this project follow two conventions, you will need to use the templates available in the ISSUE_TEMPLATE folder :
If your pull request is still work in progress, please add "WIP: " (Work In Progress) in front of the title, therefor you inform the maintainers that your work is not done, and we can't merge it.
The naming of the PR should follow the same rules as the COMMIT_CONVENTIONS
Continuous Integration (CI)
A CI pipeline is configured for this project and is accessible in the .github/workflows/go-ci.yaml
file.
The pipeline will run 3 different jobs:
- Dependencies check
- Linter
- Tests
The pipeline will be triggered automatically when creating a new Pull Request and on each push on it. It will also be triggered on push on main
branch.
Contributors