项目作者: ajivoin

项目描述 :
Definition-retrieving Discord Bot
高级语言: JavaScript
项目地址: git://github.com/ajivoin/athena.git
创建时间: 2019-05-06T05:12:24Z
项目社区:https://github.com/ajivoin/athena

开源协议:

下载


Athena

The Greek Goddess of wisdom takes on a new job as a definition-retrieving Discord Bot.

Usage

Define

Define a word with !define <word>.

  • Sends a message containing the word, part of speech, and definition.
  • Define a word with a specific part of speech using query flags: !define [flag] <word>.
  • Flags:
    • -n: noun
    • -v: verb
    • -adj: adjective
    • -adv: adverb
  • Alias: !def

Example

Get an example of a word with !example <word>.

  • Sends a message containing a random usage of the word.
  • Define a word with a specific part of speech using query flags: !example [flag] <word>.
    • Flags:
    • -n: noun
    • -v: verb
    • -adj: adjective
    • -adv: adverb
  • Alias: !ex

Pronounce

Play pronunciation of a word with !pronounce <word>.

  • Joins the voice channel the user who sent this message is in and plays the word’s pronunciation.
  • Alias: !say <word>

Help

Show the above information with !help.

Hosting the Bot

  • Pre-requisites:

  • Clone this repository.

  • In the root directory create .env with the following format, replacing placeholders with corresponding tokens:

    1. discordBotToken=DISCORD_BOT_TOKEN_HERE
    2. oxfordAppID=OXFORD_APP_ID_HERE
    3. oxfordAppKey=OXFORD_APP_KEY_HERE
    4. lang=OXFORD_SOURCE_LANGUAGE_ID_HERE

    If lang is not provided, the default is “American English.”

  • Run npm install then npm start. Congratulations, your bot is online!

Contributing

If you want to develop a feature or bug fix, please create a pull request. Before creating a pull request, please read the following:

  • Verify that your new code actually works.
  • Make sure you didn’t break existing code.
  • Ensure your code is linted. This project has two commands you can run for linting: npm run lint and npm run lint:fix. lint will report errors, and lint:fix will automatically correct some errors.
  • Please describe your changes in your pull request.