Code Monkey home page Code Monkey logo

costbot's Introduction

Hi there ๐Ÿ‘‹

I'm Constantinos, commonly called by my nickname of "Costpap", a student living in Athens, Greece.

What can I do?

I can currently write applications in JavaScript and TypeScript using Node.js.

๐Ÿ“ž How can you get in touch with me?

You can currently contact me on:


Here are some fancy graphs:

Costpap's GitHub Stats Costpap's Top Languages
Costpap's WakaTime stats

costbot's People

Contributors

almostsuspense avatar costpap avatar dependabot[bot] avatar hmellow avatar ladam0203 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

costbot's Issues

Use moment.js (npm package) to format timestamps across the bot

Is your feature request related to a problem? Please describe.
Timestamps could be much more user friendly if they were formatted differently
Describe the solution you'd like
Using moment.js could help with that, I am aware about the status of the project, but from my personal experience it is more than enough
Ex: Thu Jan 23 2020 07:30:11 GMT+0200

would become: Thursday, January 23rd, 2020 at 07:30:11 (GMT+2)

Describe alternatives you've considered
None

Add support for async/await in eval

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Currently, the eval command only accepts the execution of synchronous code. I feel like this needs to change, as there are many cases where the execution of asynchronous code, which utilizies async/await could come in as useful.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Stop the use of eval() in the command, and instead replace it with a function which allows the use of asynchronous code.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

There are many ways in which this pull request can be implemented, however, I'm not talking about any particular way, this issue was only opened in order to allow for the idea to be kept track of.

Additional context
Add any other context or screenshots about the feature request here.

Bug - Trying to delete messages in DMs

Describe the bug
A clear and concise description of what the bug is.

In the following lines of say.js and dm.js, the bot is trying to delete messages, which when the command is used in a Direct Message, it is unable to do so and raises an Uncaught Promise Rejection.

message.delete();

message.delete();

To Reproduce
Steps to reproduce the behavior:

  1. DM the bot {{prefix}}say text or {{prefix}}dm @someone text
  2. Go to the console
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.

The bot would not try to delete the message, instead of trying to deleting it but resulting in an error.

Add "here" as an argument for the help command which will send the message in the channel

Is your feature request related to a problem? Please describe.
Yeah, I like when bots send the help message in the commands channel since I dont have to switch back and forth to test its commands
Plus it's used in a bot commands channel, where bots are supposed to send messages

Describe the solution you'd like
Add =help here as an argument

Describe alternatives you've considered
Make the help command send the message in the channel by default and dm as an argument maybe

Additional context
None

Bug - Trying to access property on User instead of GuildMember in ban.js

Describe the bug
A clear and concise description of what the bug is.

In the following line, the bot is trying to access a property on a User, but instead, it should be accessing that property on a GuildMember.

if (user.bannable === false) {

Expected behavior
A clear and concise description of what you expected to happen.

The bot should be trying to access that property on a GuildMember, instead of a User. A possible solution to this would be checking if the User is in the guild before banning, then procceed from there.

Add a timeout command

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Currently, the bot has no command that utilizes Discord's recent Time Out feature. This means that in any servers utilizing CostBot, if mods want to time out a member, they're unable to do so using the bot and have to either resort to using another bot or doing it through the UI.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Implement a timeout command. The command would be split into two subcommands, one of them being add and the other being remove.

The add subcommand would first check the member's permissions, since members with the ADMINISTRATOR permission, as well as server owners, cannot be timed out. Afterwards, it would time out the user, and depending on the options supplied, inform them of the duration & reason for the time out, based on the options provided by the moderator.

The remove subcommand would simply allow moderators to remove any ongoing timeouts.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

There are no alternative solutions, other than not implementing the feature at all.

Additional context
Add any other context or screenshots about the feature request here.

Bug - noInline option in clientStats sets two fields to inline

Describe the bug
A clear and concise description of what the bug is.

In the following two lines, which are part of the noInline option in the clientStats async function, the fields' inline options are set to true, instead of false.

{ name: strings.members, value: values.members, inline: true },
{ name: strings.uptime, value: values.uptime, inline: true },

Refactor dm.ts

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I feel like the dm.ts command is a bit hard to comprehend, understand and read in general. It would massively benefit from a refactor to make it more readable and easier to understand, just like what happened with say.ts

Describe the solution you'd like
A clear and concise description of what you want to happen.

Refactor the command itself, similarly to what was done with the say command.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

There are none that I've considered, however, this is purely optional as refactoring doesn't change how the code acts or performs, so it can safely be ignored.

Additional context
Add any other context or screenshots about the feature request here.

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.