Coder Social home page Coder Social logo

learn-english-community / learn-english-bot Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 4.0 364 KB

Discord bot for the Learn English Community.

Home Page: https://discord.com/invite/smTpJWf

License: MIT License

Java 99.91% Dockerfile 0.09%
discord docker gradle java jda-discord-bot discord-bot

learn-english-bot's People

Contributors

christolis avatar dependabot[bot] avatar juniorjairo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

learn-english-bot's Issues

Create grammar corrector feature

Grammar Corrector

When user types /correct, and pass a text as an argument, the bot parses through the text and will grammatically modify the text making it an error-free text. But ensure the phrasing of the text isn't varied much.

Prevent unprivileged users from sending invite links

Describe the feature

Make sure that users with insufficient permissions (non-staff members) are unable to send invite links of any Discord server.

  • An optional feature for this is to whitelist any invite links that point to the Learn English™ server.

Switch to Wiktionary for a dictionary

Describe the feature

While the current dictionary API is competent and does an okay job at providing the right entries, Wiktionary would be much better.

  • It is more reliable, diverse, and it has much more entries.
  • It is absolutely free to query data from the Wiktionary API, if we exclude the potential rate limits.
  • Since Wiktionary has no official API, this library looks like it can do a good job for getting the data that we want.
  • Wiktionary is also multilingual at no extra cost.

Additional context

Lots of community members seem to like this suggestion so it is really important for it to be implemented.

Allow users to toggle personal notifications

Describe the feature

To begin with, there should be a "🔕 Disable notifications" button on notification messages sent by the bot, which does exactly what the title of the button says. Notification messages include:

  • Notifying the user that their streak is about to reset if they don't practice before the end of the day.
  • Any other future reminders sent by the bot to the users.
  • For a user to enable notifications again, they would have to use a command like: /notifications toggle. By default, every new user should be receiving them.
  • Since we need to let users know about the existence of the above command, the "Disable notifications" button should notify users about the command as a side note.

Finland and Romenia flags emoji typo

Bug description

On the Languages.java file the Finland and Romania flags emoji have a typo, therefore not displaying the actual flags on text channels.

Steps to reproduce

  1. Using the slash command, type /translate;
  2. Select any text as first argument;
  3. Choose the Finnish language as second argument;
  4. Reproduce above steps with Romenia.

Expected behavior

It should be showing Finnland and Romenia flags emoji, instead it shows simply a string.

Automate weekly "Amari winners" board

Describe the feature

This is a blocked feature that has been moved from the old Trello board.

Have the bot execute the command from the Amari bot that displays the weekly winners in the appropriate channel every week.

Blocked: There is no way to do this since the Amari winners command can not be sent by the Learn English Bot, since only non-bot accounts are allowed to execute that command.

Replace Article of the Day feature from the legacy bot

Describe the feature

For some context, the original Discord bot of the Learn English™ Discord server would send a daily message in a certain channel with a randomly-chosen article for users to read. We should include that feature in this bot.

  • To make this feature even better than the original one, we could generate questions for each article and have users optionally answer them in a direct message text channel with the bot after they press a "⁉️ Quiz" button right below the article's embed (this should be similar with how users are able to practice with words from their journal).
    • Users who solve the questions from a daily article should get awarded with 20XP points that can count to their streak. They should not be able to solve it more than once, or solve articles that are older than 1 week.
    • Users get the same experience points, regardless of how many mistakes they can make.

Thoughts

  • From which data provider would these daily articles get fetched?
  • Maybe we could store user statistics in the database, so that in a future version we can display that data.

StreakResetTask User#getLastActivity is null

Bug description

This stack trace gets shown every time the StreakResetTask gets called:

Stack trace ``` java.lang.NullPointerException: Cannot invoke "java.util.Map.get(Object)" because the return value of "bot.entity.User.getLastActivity()" is null at bot.task.StreakResetTask.lambda$run$0(StreakResetTask.java:33) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at bot.task.StreakResetTask.run(StreakResetTask.java:30) at it.sauronsoftware.cron4j.RunnableTask.execute(Unknown Source) at it.sauronsoftware.cron4j.TaskExecutor$Runner.run(Unknown Source) at java.base/java.lang.Thread.run(Thread.java:833) ```

This might be an issue with how we create a user and what initial fields they have. Specifically speaking, it looks like the field lastActivity just doesn't exist (which is required by this task) triggering this error.

Steps to reproduce

Execute the aforementioned task on a database instance that contains users who have just been added to it.

Make word definitions show as ephemeral on private messages

Describe the feature

As of writing this, whenever a user uses the /define command to get the definition of a word, the message that gets sent by the bot is currently not ephemeral.

  • This can clutter private message history between the user and the bot.
  • Most importantly, someone might not want to view previously-sent definitions while they are practicing with words from their journal.
  • When the /define command gets executed in a guild however, it should NOT be sent as an ephemeral message.

Include a Save button on word of the day definitions

Describe the feature

Currently the definitions from the word of the day channel have no save button. It would be an inconvenience for people to copy-paste the word as a parameter in the /define command just so they could have it saved in their journal.

Autocomplete search for translation countries is slow

Bug description

When using a command like /translate, when you get to autocomplete different languages to which you can translate your text into, the autocomplete suggestions screen freezes for a second or two every time a key is pressed, as if it's trying to fetch the languages from somewhere.

Steps to reproduce

  1. Using the slash command functionality, type the /translate command (without sending it)
  2. Get to the target: parameter and type the initials of a language.

Expected behavior

It should not load like that, the results should be instant, or at least close to instant.

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.