Giter Club home page Giter Club logo

cascadebot-old's Introduction

banner

GitHub License Jenkins GitHub Issues GitHub Pull Requests GitHub Forks GitHub Stars Website

Discord Server

This project is currently in closed Alpha!
If you would you like to be notified when we release our open beta, please enter your details here!


We are very lucky to have open source licenses for the following software:

  • An amazing Java profiler that's helped fix many issues!
  • The amazing software suite from JetBrains; the core software we develop on day-in day-out
  • The fantastic translation and localisation platform that makes our lives just that little bit easier!
  • An amazing documentation platform!

πŸ‘‹πŸ» About

Cascade Bot is a Discord bot that aims to be as customisable as possible as well as providing server administrators with the tools to run their Discord server!

🀝🏻 Contributing

Contributions, feedback and bug reports are welcome! Feel free to check out our issues page and our roadmap to find out what you could do!

Before contributing, we recommend you say hi over in our Discord server! We can provide support with any issues you may have πŸ™‚ Also, please make sure to read our contribution guidelines in order to make sure submitting a PR is as slick as possible!

A big thanks to all those who contribute to the project ❀

πŸ‘¨πŸ»β€πŸ’Ό Project Owners

There are three owners for this project each with an equal involvement in the project. They all contribute massively to the running of this project. Links to their GitHub profiles can be found below:

πŸ’› Credits

The projects listed in the licences folder have provided inspiration, and we thought we'd mention them:

cascadebot-old's People

Contributors

binaryoverload avatar cascadediscordbot avatar deadlyfirex avatar dependabot[bot] avatar ikinon avatar jameshawkinss avatar mrjvs avatar tortlewortle avatar villchurch avatar walshydev avatar weeryan17 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

Watchers

 avatar  avatar  avatar  avatar  avatar

cascadebot-old's Issues

Custom scripting πŸŽ‰

πŸŽ‰ The feature we've been waiting to implement.

Scripting will be based on the Rhino JS engine which allows us to lock down everything sufficiently. Everything non-vanilla Javsscript that we want users to be able to access will have a specialised class to pass in. Under no circumstances should any JDA object from the bot be directly passed in as that will give the user full control of the bot.

Command/Feature flagging

Add functionality to add flags to things so we can check whether this feature should be done. For now, this will just be the beta flag to introduce commands/features that are only for the beta program.

The flags I can forsee us needing:

  • Alpha??
  • Beta
  • Patreon Tier 1
  • Patreon Tier 2
  • Patreon Tier 3

These are just examples for the Patreon!
I won't be implementing anything other than the first 2 for now as we don't know how we will structure our Patreon stuff.


Implementation proposal:

  • Flags.java enum to contain the flags
  • Introduce a getFlags() method to ICommandExecutable that returns an EnumSet representing the flags it requires to execute
  • Add a Set of enabled flags into guild data
    • This will be used to enable things like beta or Patreon access
  • Add a subcommand to guild to enable and disable beta
    • ;guild beta [guildId]
    • Maybe this could be modified to work with all flags in the enum?

Vote/Poll command

A command to allow users to vote on something. This can easily be hooked into the existing vote system.

Joining a channel when a user plays a song

It's been requested for the ;play command to automatically join the bot to the current channel (If the user is in one)

Requirements:

  • If the user is not in a voice channel, the track is just played and the bot stays where it is
  • If the user is in a different channel than the user, the user needs join.other for the join to happen

@JamesHawkinss

[Bug] LavaPlayer + YouTube API

Describe the bug
When telling the bot to play music, it errors with the following error: https://hasteb.in/axixixon

To Reproduce
Steps to reproduce the behavior:

  1. Join the bot to a channel
  2. Tell the bot to play music
  3. BAM it broke

Expected behavior
I expected the bot to play music

Uxui Improvements

James

Deadly

Binary

Custom colours

Use custom colours for the different message types. At current, the different messages types we have are:

  • Info
  • Success
  • Warning
  • Moderation
  • Danger
  • Neutral (Uses Cascade red)

Help/Commands Command

The bot is going to need a help command to show all the commands and their descriptions.
It should be paged by module, and only show commands you have access to permission wise.
We might even want to have a page for info on how to use the bot.

Permissions command

So I just realized we don't have a permissions command yet, and that's kind of important.
We need to account for both permission modes via commands, and probably have a way to test perms.
As permissions are complicated we're open to ideas for command structure.

GraphQL API

We need to create the schema for all the API actions.

All the guild data will be under one parent guild object similar to how it is in code.

We're also going to use GraphQL mutations also so an interface for that needs to be created.

Emoji Constants

Throughout the bot we use a lot of emojis so I see two solutions:

  1. Create an EmojiConstants class which contains string constants of the various emojis that we use
  2. Use an external library that gets emoji by name. This would be useful for any future commands we do and also custom commands

Add a product key like system that allows us to:

  • Automatically assign users to plans with Patreon/Other services in the future
  • Allows us to assign individual features (Like beta or music services) to a guild
  • Stores this information in a separate collection to allow keys to be transferred

Whitelist/blacklist for users/channels

Add a feature that allows server admins to whitelist or blacklist users or channels from using commands. This could optionally include individual command whitelisting/blacklisting.

Tags command

And so we introduce the lovely tags system or "text-based custom commands" as @weeryan17 likes to call it.

This is effectively a system that maps a key to text. A common use for this is rules, knowledge base and support messages for servers along with much more!

Alongside this, we will be adding a category system that will allow tags to be split into different categories such as moderation, knowledge base etc. These categories will not be used anywhere else and will be checked and created dynamically with tags.

class Tag {
    String content
    String category
}

There will be a Map<String, Tag> added to GuildData that will store all the tags for a guild. The appropriate methods should be added to add/remove tags and get the map of tags (immutable!)

A setting should be added to GuildSettings called allowTagCommands which enables or disables doing ;<tagname>; this should be enabled by default. The tags commands will be processed after the built in commands in order to avoid conflicts.

A tag command should be created with different usages:

  • ;tag create <tagname> <content>
  • ;tag create <tagname[:category]> <content>
  • ;tag delete <tagname>
  • ;tag <tagname
  • ;tag list

[Feature request] Vote skip takes a long time

Is your feature request related to a problem? Please describe.
Skip vote takes a long time.

Describe the solution you'd like
Skip vote time cut by half. so 15 seconds.
30 seconds is a big portion of a song already. better of not skipping it al together if it takes a long time.
On top of that I would also like for it to check for if the more than 50% of people in vc has voted yes.
if thats the case then just skip.

Describe alternatives you've considered
Not applicable

Additional context
agreed by 2 other people in cascade guild
(dont count bots in the list of people in vc)

Fix quote arg splitter algorithm

At the moment, the arg splitter I designed has several flaws such as:

  • Doesn't play nicely in eval
    • Nested bracket context needs checking
    • I need to improve the way I detect a opening quote, the way I use currently is just plain lazy...
  • Converts ' to " lazily

[Bug] Userinfo does not return right

Describe the bug
A clear and concise description of what the bug is.
Whenever you try to get information on valid user bot cannot see, it does not return invid user embed

To Reproduce
Steps to reproduce the behavior:

  1. Type ;userinfo ID from someone bot cannot see

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

  • Catched error and clear embed telling that the user is invalid

Instead, it posts a stacktrace on hastebin

Screenshots
If applicable, add screenshots to help explain your problem.
nothing

Additional context
Add any other context about the problem here such as what device for visual bugs.
nothing

Usage command

For ease of use, it's best to have a ;usage command to print out the usage of any command. This can use the CommandManger#getCommand and CommandContext#replyUsage

In addition to this, I'd possibly like to look at the usage layout. For reference: https://thedudeinthecorner.xyz/files/TMwL7.png was what we had on FlareBot. cc: @mrjvs

[Bug] Ban and Kick do not respect server hierarchy

Describe the bug
Ban and Kick do not respect Discord Hierarchy

To Reproduce
Steps to reproduce the behaviour:

  1. Kick JVS
  2. Profit

Expected behavior
The bot should not kick or ban people if the requester cannot kick or ban in Discord itself. This could potentially be a setting to configure.

Command Context Redesign

So we where talking about this recently in issue #52. I have a few ideas of how we could handle this.

  1. Enumize command context:
    Currently in command context we have a buch of replyInfo, replyWarning, ect.... we could switch those over to being replyTyped and use the enum we already have for message types.
  2. Expand the messaging package and move all messaging stuff over their.
    This would allow us to split things out more, but make it slightly harder to access
    MessagingClass.something() instead of context.something()

I want to avoid having context having messaging stuff, and having separate messaging stuff as it could get confusing where things are, and where to put new things.

If you have any other ideas feel free to put them here.

[Feature Request] Add npm and mdn search functionallity

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Other bots like Yukikaze has search functionality on both npm and mdn. I believe it also has more search functionalities although, these are the main ones I'd like implemented. It would make programming/code related servers that has lots of js (like DesignCourse) a lot easier. If someone asks a question that can be answered with a lib you can simply just do prefix+npm this would make the whole experience on the server more seamless and you can avoid having to alt tab a lot.

Another one you could add is jda and java docs (although this doesn't matter for me personally but it could be a nice function)

Lock and slowmode commands

Lock command should be able to lock:

  • Individual channel
  • Whole guild
    We'll have to think about we're going to handle roles and denying them. We'd need to make a backup of the permissions to restore after unlocking.

Slow mode command allows server admins to set a slow-mode that's not available in Discord like 1s or some other arbitrary time.

[Feature Request] Starboard and pins

Is your feature request related to a problem? Please describe.
Starboard and pin reaction events.

Describe the solution you'd like

> starboard (using emoji as the starboard id)
;starboard create <emoji> <count> <channel>
;starboard list
;starboard edit <emoji> emoji <newemoji>
;starboard edit <emoji> count <newcount>
;starboard edit <emoji> channel <newchannel>
;starboard delete <emoji>
;starboard enable <emoji>
;starboard disable <emoji>

> pin reactions
;pins enable
;pins disable
;pins edit emoji <newemoji>
;pins edit count <newcount>

Additional context
Discussed with developers

Add to dump command

  • Add a dump argument to dump a list of registered permissions
  • Add a dump argument to dump a list of registered commands

Patreon integration

  • web panel gifting patreon features to guilds
  • web panel linking patreon account

Permissions

With this permission system, we will have two models: Hierarchy and most restrictive
These two modes are detailed here: Permission Models

Dashboard Perms

  • Separate dashboard command for configuration of permissions
  • Permissions for viewing & each part of the dashboard
  • Invite system

WIP

Roles revamp

@binaryoverload suggested that we add a system whereby you can see how many people have a certain role. We first considered implementing this into ;userinfo, but I reckon we should just add it to ;roles.

We can add another column for the amount of users with certain roles, and add the required information.

Moderation Manager

It will be good for us to have a central moderation manager that allows all moderation actions to have consistency in terms of errors and responses and also allow easy integration with the modlog system when we decide to do it

Force ban command

You will need to use ShardManager#retrieveUserById to do this since force ban is designed to be used on people who aren't in the guild.

Purge command

A clean command that is subdivided into cleaning messages in the following forms:

  • Images
  • Links
  • Specific user
  • All messages
  • Bot messages
  • Messages that contain something
    ( I am working on this )

Language

So a few meetings ago, we decided that we would implement a language system due to the fact @mrjvs will be doing the same on the website.

Since we already use YAML for our config, I think we should do the same for the language. This will allow for the easy specification of strings (Unlike something like JSON) and also easily allow nesting if so needed.

To access the language string, I think a helper function in the CommandContext will be very helpful and sensible to do. A method like context.i18n(String key) will allow easy access to lang strings without having to put a long reference. (I18n being a shortening of internationalisation)

Donate command

We need a command to display information about donating. Would display the Patreon and possibly the cascade email to directly send money to.

Settings annotation

At the moment, our current settings for each of the guilds is quite fragmented. We have most of the boolean settings in GuildSettings and other settings we don't want the user to directly change in the GuildData.

This causes issues for a number of reasons:

  • The settings are put in different places so it is not obvious where a setting would be contained
  • There is no way to add meta information that will be needed for the panel such as:
    • The module the setting belongs to
    • Whether a flag is required to access it
  • To stop a user editing a setting, we have to put it in a different place

I propose a different solution where all settings (Boolean or not) will be places in GuildSettings and each of them given a @setting annotation which will allow us to specify properties such as:

  • The module the setting belongs to
  • Whether a flag is required to access it
  • Whether the user is able to edit it through the settings command

As well as anything else we need. This will also make our lives a lot easier when it comes to allowing users to import and export settings as everything will be contained in one place.

@weeryan17 Thoughts?

Forceban Command

At the moment, we do not have a force ban command which means that people can only ban people from their guild.

Should we:

  • Add a force ban command which retrieves a user
  • Add a way for the current ban command to "force ban" a user

ToDo list command

A command that allows a user to create a todo list (Per-channel/per-guild/per-user?) and tick items off. This would be helpful for our meetings as well as the agenda.

Not sure what module this would go in

Mod log

You sould know what this is suppose to do.
One thing we will have different is different logs should have the option to go to different channels like on flare.
As of right now don't worry about message delete/edit. I need to put some work in before we can do that.

Project Lombok

We are going to start using Project Lombok for getters, setters, equals hashcode etc to reduce boilerplate code.

Everyone will have to install the Lombok intellij plugin for this to work properly.

Improvements to Guild command

Some minor improvements need to be done to the guild command. These should be relatively easy.


Add a ;guild info command that shows information such as:

  • The flags that are enabled/disabled. This should be shown as a list of all the tags with a βœ… or a ❌next to it
  • The date our bot joined the guild

Nothing else for now, this will eventually include more information such as whether the guild is blocked etc. This ;guild info command should also have an optional guildId argument like so ;guild info [guildId]


Add to the ;flag list command by telling us what flags the user has enabled at the time. This could be done with βœ… and ❌ or some other way.

Error Message Manager

The main method (that's what it's called right?) will be called errorMessage and have the following stuff

  • noUserFound - A standard error message for when the bot can't find the specified user
  • noGuildFound - Similar to the above but for guilds
  • missingPermssion - When the bot doesn't have the required permission

If anyone has any suggestions for more error messages feel free to comment them, or if you have any idea how this might work.

Music

Woohoo it's that time to start getting a good ol' music system implemented :D

This issue will act as a overal TODO list, I'm welcoming different people to PR different sections

Core management functionality

Each guild requires a music manager that handles:

  • The music queue
  • Currently playing track
  • Playlists
    • Saving
    • Loading

This music manager will be stored in GuildData as a transient field so it doesn't get saved.

Playlists are able to be stored in two "scopes": guild and user

  • When saving, by default playlists will be stored in the guild scope but users can opt to have it in their user scope
  • Since playlists are not always stored specific to a guild, they will be stored in a separate collection. The field owner_id will be used to link to either a guild or a user depending on scope.
    • Note: On its own owner_id is not guaranteed to be either a guild id or user id; only with the scope field can this be determined!

Basic music commands

  • Pause - Pauses a played track
  • Resume - Resumes a played track
  • Stop - Stop current track and remove it from the queue (Not sure about this function)
  • Join/Leave - Asks bot to join/leave the voice channel
  • Loop - Sets the current queue to loop (Requires proper queue handling) Perhaps have an argument to set different loop modes? i.e. DISABLED, REPEAT (playlist), REPEAT_ONCE (current song)
  • Shuffle - Shuffle's the current queue
  • Song - View the current playlist song
  • Volume - Change Volume
  • Play - Either resumes a paused track or load a item
  • Search - Searches YouTube (Or other stuff?) for tracks
  • Queue - View the current queue
  • Skip - Skips the current song but does voting too

Playlist commands

  • Save
  • Load

Reaction role system

A system to where when you react to a message it add, or deletes a role from you. Admins should have the option of weather it's an add, an add/remove, or just a remove, and be able to customize the message. you can't use the button system as is for this as buttons are temporary. Instead the current button system should be modified to allow for persistent buttons.

Temp moderation commands

temp mute, temp ban, mute commands.
This will require working with mongodb to create a future actions table.

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.