Giter Site home page Giter Site logo

a3ro-dev / erocabulary Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 2.0 18 KB

This is a Python-based Telegram bot for learning English language vocabulary and grammar. The bot offers a variety of commands for different language learning purposes, such as word meanings, pronunciation, composition, writing letters and essays, and more.

Home Page: https://t.me/erocabulary_bot

License: MIT License

Python 100.00%
ai artificial-intelligence bot contributions-welcome openai openai-api python python3 scripts telegram-bot telegram-bot-api

erocabulary's Introduction

Erocabulary

This is a Python-based Telegram bot for learning English language vocabulary and grammar. The bot offers a variety of commands for different language learning purposes, such as word meanings, pronunciation, composition, writing letters and essays, and more.

Setup

Before running the script, you need to install the following dependencies:

  • python-telegram-bot
  • psutil
  • openai

You also need to get an OpenAI API key from their website.

Features

The bot supports the following commands:

  • /start - sends a greeting message to get the user started.
  • /send_vocab - sends a random English word with its definition and use case.
  • /compose <topic> - composes a poem, story, or ideas.
  • /pronounce <word> - learns how to pronounce a word.
  • /rewrite <content> - rephrases and rewrites the given content with correct English.
  • /meaning <word/phrase> - gets the definition and sentence example of the requested word/phrase.
  • /essay <topic> - provides an essay of 200 words on the given topic.
  • /email <email formal or informal | content | information | context> - writes an email on the given information.
  • /letter <letter formal or informal | topic | information | context> - writes a letter on the given information.
  • /summarise <paragraph> - produces a summary on the given paragraph/information/topic.
  • /ping - calculates the round-trip latency in milliseconds between the bot and the Telegram servers.
  • /dev - provides information about the developer of this bot.
  • /stats - provides statistics about the bot (admin only).
  • /logs - retrieves the log file for debugging (admin only).
  • /restart - restarts the bot (admin only).
  • /tick - sends your message to the developers of this bot.

How it works

The script initializes the Telegram bot using the python-telegram-bot library and the OpenAI API for generating responses. The bot is designed to respond to user input and commands through message handlers. The handlers are defined in the script, and each handler is responsible for performing a specific task based on the command it receives.

The script also includes logging capabilities, using the logging library to record various bot activities in log files. The bot uses the psutil library to get information about the computer's resources, such as CPU and memory usage.

Contributing

If you would like to contribute to this project, feel free to submit a pull request.

License

MIT LICENSE

erocabulary's People

Contributors

a3ro-dev avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.