GithubHelp home page GithubHelp logo

proohit / dirisslave Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 39.88 MB

Feature-rich Discord bot written in Java using JDA. Supports music playback with spotify integration, imageboards, weather data, simple command APIs and much more.

Java 99.11% Shell 0.89%
jda discord-bot openweathermap spotify lavaplayer

dirisslave's Introduction

proohit's GitHub stats

proohit's GitHub stats

dirisslave's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar proohit avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

dirisslave's Issues

play command not working with line breaks

When inserting a search term or an url which includes line breaks, the inputs are not getting sanitized.

example to reproduce:

.play 
https://www.youtube.com/watch?v=V9gMX1KjK2I

The result is that the video is not getting found.

To solve, we should sanitize inputs and trim line breaks etc.

DiscordxGitHub Integration

Since we are moving from Trello to Github, we should consider integrating this issue page into DirisSlave. By using commands like ".listissue", ".addissue " or ".readissue <>" issues should be accessible and readable via Discord.

Voting feature

Describe the solution you'd like
It would be cool if the bot could handle voting sessions. Participants can vote via text.

Command proposals

VoteCommand

.vote NewVoting Option1

NewVoteCommand

.vote new NewVoting --option Option1 --option Option2 --option Option3

Calculation

The .calc-command does not work properly. Dividing by 0 just links an empty image.
Please add a funny black-hole gif there (maybe a random gif via Discord).

Improve argument list handling

We could make the required arguments handling easier by moving it to to the handle method. Every command should instead define their minimum required arguments.

Trying to lable

With this new submission I want to see the lable-bot in full action and in HD+

Implement Log vizualization

Vizualize logs on a frontend. Possible KPI can be:

  • How many requests
  • song history
  • playlists
  • total handled messages

additionals:

  • detailed logs (with text)

Built-In commands

With the new version of Discord, we could implement slash commands. JDA seems to not implement it before 2021, so we may park this feature.

See discord-jda/JDA#1470 for the current issue

delete messages permission denied

Describe the bug
When deleting via the .del command, it's not working and instead throwing:

main.MyEventListener.onMessageReceived() ERROR: 
net.dv8tion.jda.api.exceptions.InsufficientPermissionException: Cannot delete messages of other users at 
net.dv8tion.jda.internal.entities.TextChannelImpl.purgeMessages(TextChannelImpl.java:201) at 
util.commands.ClearCommand.handleImpl(ClearCommand.java:26) at 
shared.commands.Command.handle(Command.java:25) at 
main.CommandManager.handle(CommandManager.java:105) at 
main.MyEventListener.onMessageReceived(MyEventListener.java:32) at 
net.dv8tion.jda.api.hooks.ListenerAdapter.onEvent(ListenerAdapter.java:435) at 
net.dv8tion.jda.api.hooks.InterfacedEventManager.handle(InterfacedEventManager.java:96) at 
net.dv8tion.jda.internal.hooks.EventManagerProxy.handleInternally(EventManagerProxy.java:88) at 
net.dv8tion.jda.internal.hooks.EventManagerProxy.handle(EventManagerProxy.java:70) at 
net.dv8tion.jda.internal.JDAImpl.handleEvent(JDAImpl.java:149) at 
net.dv8tion.jda.internal.handle.MessageCreateHandler.handleInternally(MessageCreateHandler.java:122) at 
net.dv8tion.jda.internal.handle.SocketHandler.handle(SocketHandler.java:36) at 
net.dv8tion.jda.internal.requests.WebSocketClient.onDispatch(WebSocketClient.java:956) at 
net.dv8tion.jda.internal.requests.WebSocketClient.onEvent(WebSocketClient.java:843) at 
net.dv8tion.jda.internal.requests.WebSocketClient.handleEvent(WebSocketClient.java:821) at 
net.dv8tion.jda.internal.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:994) at 
com.neovisionaries.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:385) at 
com.neovisionaries.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:276) at 
com.neovisionaries.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:996) at 
com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:755) at 
com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108) at 
com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64) at 
com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45)

** Affected command **
ClearCommand

Dynamic MostPlayed Playlist

Using ".mostplayed" (.mp?) should add the top10 played songs to the queue.

(Matthew effect: "The rich get richer and the poor get poorer" -> Often played songs should be played often.)

Automatic status update

Describe the solution you'd like
The bot could write hourly data into the DB to track when it was online/offline. For everytime it has no data, he should write an offline entry.

** Command proposals **
It should be visible in the dashboard.

Use alternative commands

It would be nice to trigger a command also by alternative commands

E.g.:
.pl/.play trigger the same handler

Maybe refactor the defineCommand abstract method to return an array of strings?

Dice Roller

Get a random number between 1-n,

Using the command ".roll n" or ".w n", DirisSlave will give you a random number.
i.e. ".roll 6" rolls a standard d6

Optional commands for the standard DnD dices: D4, D6, D8, D10, D10 or D100 (00-90), D12, D20 (optional: w4, w6, w8, ..)

command auto completion

Describe the solution you'd like
It would be nice if the bot could detect the requests command even with typos. Since we're using Simmetrics already, we can use it to search for matches. We could create a flat list of all commands and match it to a request. This can also happen recursively for sub commands, since the logic is the same.

some examples:
.pla results in .play or .pl
.playlist loaad asdf results in .playlist load asdf

Custom Recommendation

Adding to #13 DirisSlave should be able to customize the songs queued like ".pl recommended 6 rock" should add 6 songs.

TimeOut

Time-out a user from current channel.

Using the command ".timeout n @user", DirisSlave will kick the user out of the current channel for n minutes.
The time-outed user may enter another channel, but will be repeatedly removed from the channel in which the user was time-outed of.

Random Songs abspielen

".ytrandom rock music" queuet die ersten 10 youtubeeinträge für "Rock Music"-search ein

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.