Skip to content

Condition00/Lexicon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lexicon - Discord Dictionary Bot

Lexicon is a Discord bot that fetches the Word of the Day from the Wordnik API and provides dictionary definitions for words. It's built using Discord.js and can send daily updates to a channel at a specific time.

Features

  • Fetches the Word of the Day from Wordnik API.
  • Provides definitions, examples, and phonetic pronunciation for any word.
  • Sends an embedded message with the Word of the Day in a specified channel.
  • Slash commands to fetch Word of the Day (/wordoftheday) and dictionary definitions (/dictionary <word>).

Prerequisites

Before you begin, ensure you have met the following requirements:

Installation

  1. Clone the repository:

    https://github.com/Condition00/Lexicon.git
    cd Lexicon
  2. Install dependencies:

    npm install
  3. Set up your .env file: Create a .env file in the root directory and add the following keys:

    TOKEN=your_discord_bot_token
    CHNLID=your_discord_channel_id
    WORDNIK_API_KEY=your_wordnik_api_key
  4. Run the bot:

    node src/index.js

Usage

Once the bot is running, it provides the following functionality:

  • Word of the Day: Every day at 9 AM (server time), the bot will send the Word of the Day to the specified channel.
  • Slash Commands:
    • /wordoftheday: Get the current Word of the Day with its definition, pronunciation, and example.
    • /dictionary <word>: Get the definition, synonyms, and example of any word.

Example Commands

  • /wordoftheday - Retrieves the word of the day from Wordnik.
  • /dictionary hello - Fetches the definition and example of the word "hello."

Contributing

If you'd like to contribute to this project:

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the branch (git push origin feature/AmazingFeature).
  5. Open a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Built With