Giter Site home page Giter Site logo

discord-delphi's People

Contributors

jstnmcbrd avatar

Watchers

 avatar

discord-delphi's Issues

Erroneously deletes all semicolons and underscores

The replaceUnknownEmojis method is supposed to take custom Discord emojis (which are enclosed with semicolons and contain letters, underscores, and hyphens) and replace them with the name of the emoji, surrounded by asterisks.

Ex: :fight_me: -> *fight me*

However, this method doesn't differentiate between semicolons and underscores used for custom emojis, and those just used normally. It replaces every semicolon with an asterisk, and every underscore with a space. I should refactor this method to use regex to parse the input and only replace special characters used for custom emojis.

On a related note, it also forgets to replace hyphens with spaces.

(Duplicate issue with JstnMcBrd/Discord-Cleverbot#17)

User activity not being set

For some reason, the user activity of this bot is no longer being set correctly. Instead of saying "Listening to /help", the activity is now empty.

No packages were updated, and no code was changed. Restarting the bot did not help. The bot should automatically set the activity every 5 minutes to prevent it from expiring, but that's not working either.

To fix this issue, I will try updating discord.js.

Duplicate issue with JstnMcBrd/Discord-Cleverbot#12

Turn off colored console output when running on the web server

The colors node module adds special formatting to output text so the Windows console knows to color the text. However, this does not work in Linux. Instead, all the output text has weird characters before and after each string that makes the output log really hard to read.

To fix this issue, the colored text feature should be disabled when running on the web server.

User activity needs to be regularly refreshed

After being set, the user activity will occasionally disappear, requiring the activity to be set again.

This is a known problem with the discord backend. See discord/discord-api-docs#834


A workaround for this problem has already been implemented. I am simply creating (and closing) this issue so I have a reference for the bug and I can link it to the original issue in the discord-api-docs.

If the discord backend is ever fixed, I can remove the refreshing system in the activity manager.

Duplicate issue with JstnMcBrd/discord-cleverbot#42

Set up a linter

Linters help programmers create consistently formatted code that conforms to good standards. Setting one up would help make this project cleaner and ensure future code quality.

Bot always thinks activity has been set successfully, even if it fails

There doesn't appear to be a way to check what the client's current activity is, which prevents the bot from testing whether client.user.setActivity() was successful. Instead, the presence it tests will always contain the inputted activity, whether or not the activity actually updated server-side.

Both the return value of ClientUser.setActivity() and the property of ClientUser.presence are simply set to whatever the latest presence passed through setActivity() was, even if it fails to update on Discord.

Duplicate issue with JstnMcBrd/discord-cleverbot#3

See feature request discordjs/discord.js#10206

Migrate project to TypeScript

TypeScript is widely considered a more reliable and responsible way to code in JavaScript. It would take a lot of work, but migrating this project would keep it up to modern standards and pay big dividends in the future.

Empty messages trigger bad request error

When a user sends the bot an empty message, the bot tries to fetch an improperly formatted API request, which throws a 400 Bad Request error.

There should be a default input for the API request in case the users sends an empty message.

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.