go-bot

command module
v0.0.0-...-ee611d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2020 License: MIT Imports: 10 Imported by: 0

README

go-bot

Go

A bot to interact with in natural language.

Made with :

Demo

google search

music search

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


Jason Gauvin

Jacques Maarek

Edwin Vautier

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
apis
wit

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL