Coder Social home page Coder Social logo

sebastiaanyn / open-sourcebot Goto Github PK

View Code? Open in Web Editor NEW
74.0 16.0 77.0 52 KB

An open source Discord bot created and run by TheSourceCode community.

Home Page: http://open.sourcebot.net

License: MIT License

JavaScript 100.00%
discord nodejs discordjs discord-bot discordjs-bot

open-sourcebot's People

Contributors

anishshobithps avatar antocs avatar darkseraphim avatar jacxk avatar mas03 avatar sebastiaanyn avatar sleepyswords avatar stanbarkmeijer avatar the-sourcecode avatar theforbiddenai avatar waspothegreat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

open-sourcebot's Issues

Programming Language

Let's discuss the language choice for the bot here. Some options would be:

  • Java
  • JavaScript
  • Python
  • Kotlin
  • Golang
  • C#
  • Rust

Please comment which language you would prefer, and the library you would want to use.

Aliases not implemented in command execution

Describe the bug
https://github.com/The-SourceCode/Open-SourceBot/blob/63d2ca63e403fa496582f6f37a2bb3ee4f6ef46b/src/handler/Handler.js#L183
https://github.com/The-SourceCode/Open-SourceBot/blob/63d2ca63e403fa496582f6f37a2bb3ee4f6ef46b/src/handler/Handler.js#L195

When running command, any specified to it aliases will not work in any way.

To Reproduce
Steps to reproduce the behavior:

  1. Command !help has aliase !h
  2. By executing !h you will see that nothing happens.

Expected behavior
It should execute same code that !help does

Screenshots
image

Additional context
Add any other context about the problem here.

Features

Let's discuss the bot features here.

  • Which commands would you want to have in the bot?
  • Should the bot be designed to work on one guild, or multiple?

Provide as much information as possible, so we can get a good understanding of the ideas and opinions.

Unable to add feature descripton

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

When i try to add new feature (games)
const { Feature } = require("../../../handler");

module.exports = class extends Feature {
constructor() {
super("Игры", {
name: "Игры",
commands: ["rolldice","flipcoin","slots"],
events: []
});
}
};

Commands not appear in feature
image

Category

how can i organize commands by category in help.js?

Handler silently ignores errors when instantiating Command or Event classes

Describe the bug

https://github.com/The-SourceCode/Open-SourceBot/blob/ae60b017713c3c0635aca7fd6823bf58520c7754/src/handler/Handler.js#L59-L66

The code above silently ignores errors thrown while trying to instantiate a Command or Event class. The try/catch clause can't determine whether the error is thrown because CommandOrEvent is not a class, or because it gets errors while instantiating it.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Command class and give one of the options a wrong datatype.
  2. When the application starts an error will be thrown and ignored.

Expected behavior
There should be an error to show the Command is invalid, and it shouldn't silently ignore them.

RichEmbed is not a constructor

RichEmbed is not a constructor

TypeError: RichEmbed is not a constructor at module.exports.run (/home/pixel/Desktop/Fl4nnelBot/modules/general/commands/help.js:93:19) at Client.client.on (/home/pixel/Desktop/Fl4nnelBot/handler/Handler.js:209:19) at Client.emit (events.js:198:13) at MessageCreateAction.handle (/home/pixel/Desktop/Fl4nnelBot/node_modules/discord.js/src/client/actions/MessageCreate.js:31:14) at Object.module.exports [as MESSAGE_CREATE] (/home/pixel/Desktop/Fl4nnelBot/node_modules/discord.js/src/client/websocket/handlers/MESSAGE_CREATE.js:4:32) at WebSocketManager.handlePacket (/home/pixel/Desktop/Fl4nnelBot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:386:31) at WebSocketShard.onPacket (/home/pixel/Desktop/Fl4nnelBot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:436:22) at WebSocketShard.onMessage (/home/pixel/Desktop/Fl4nnelBot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:293:10) at WebSocket.onMessage (/home/pixel/Desktop/Fl4nnelBot/node_modules/ws/lib/event-target.js:125:16) at WebSocket.emit (events.js:198:13)

Screenshot at 2020-07-15 15-46-03

Improve the help command

Is your feature request related to a problem? Please describe.
You should easily be able to find the commands that the bot has. The current help command isn't well suited for this task.

Describe the solution you'd like
There should be a help command which can take in zero or one parameter.

If the command is used without any parameters it should return a message (embed?) listing all features, followed by the commands apart of the feature. If a command is not apart of a feature it should also be included separately.

If the command is used with a parameter a message should be returned showing the aliases, info, and usage of the command and whether it's only available inside guilds.


If you want to implement this feature request, please open a draft pull request which references this issue.

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.