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.
- 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>
).
Before you begin, ensure you have met the following requirements:
- Node.js (v16.6.0 or higher)
- Discord Bot Token (from Discord Developer Portal)
- Wordnik API Key (from Wordnik API)
-
Clone the repository:
https://github.com/Condition00/Lexicon.git cd Lexicon
-
Install dependencies:
npm install
-
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
-
Run the bot:
node src/index.js
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.
/wordoftheday
- Retrieves the word of the day from Wordnik./dictionary hello
- Fetches the definition and example of the word "hello."
If you'd like to contribute to this project:
- Fork the repository.
- Create your feature branch (
git checkout -b feature/AmazingFeature
). - Commit your changes (
git commit -m 'Add some AmazingFeature'
). - Push to the branch (
git push origin feature/AmazingFeature
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for more information.