Giter Club home page Giter Club logo

jshellbot's People

Contributors

i-al-istannen avatar irufus avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

jshellbot's Issues

Add a security manager to the Sandbox class to prevent file access

For example, you should be able to prevent calls like
!jshell java.util.Arrays.toString(new java.io.File(".").listFiles());
OR
!jshell java.util.Arrays.toString(new java.io.File("/home/").listFiles());
from listing files on the system that it is running on.

We would need to add this option to the example configuration file. bot.properties.example.

System.print blocks all threads

System.print will block all other threads. If someone was to create a for loop (below)
!jshell for(int i = 0; i < 10000000; i++){System.out.println("oof!");}

It will tie up all listening threads.

Ideal solution would be to have it non-blocking AND the ability to have a timeout from processing taking too long.

Capture JShell compilation error output

Problem

JShellBot currently does not notify the user if their statement has a compilation error, it just returns null.

Example

$ new FooBar()
> new FooBar() = null

The correct output should have been:

$ new GobblyGoop()
> |  Error:
> |  cannot find symbol
> |    symbol:   class GobblyGoop
> |  new GobblyGoop()

Integerate CI

Considering integrating Travis CI for an easier roll out of JShellbot. Will save me a lot of time.

Evaluate risk with Discord API Domain migration

Discord API Domain Migration
Last month, we excitedly announced our official move to discord.com. It was a long time in the making, and the work isn't done yet! For now, our API will continue to handle requests made to discordapp.com. On November 7, 2020 we will be dropping support for the discordapp.com domain in favor of discord.com. Please ensure that your libraries, bots, and applications are updated accordingly.

Handle output that is longer than 1024 characters

Problem

The embed format only allows for fields with less than 1025 characters. This naturally constrains the output size quite a bit.

Possible solutions

  • Truncate the output (current strategy)
  • Split the output in multiple messages/fields
  • Upload the full output to https://hastebin.com or a similar website and show a truncated version + a link

Allow custom renderers for special objects?

Suggestion

Some objects, like BufferedImage are nice to look at, but don't provide much in textual form.
However, Discord allows uploading images, so they could be directly displayed instead.

This could also be extended to other classes like Throwable, which could complement #5.

(by tiggerbiggo)

Dyno bot died, we need to do something about it

Dyno bot has died and does not send responses to commands, this is a big problem as Dyno Bot is vital to our server. A lot of commands help us in providing information without typing long messages. A temporary solution would be to add some of the frequent commands to Together Java Bot.

Simplify blacklisting, allow whitelisting

Motivation

A few more packages/classes need to be blacklisted and a few need to be allowed, but that is a tad horrendous with the current system.

Possible alternative

A sequence of regular expressions for blacklisting and whitelisting may fit better?

Migrate to JDA version 4

What:
Unable to listen to channels in Discord due to the API change of 11/07/2020.

Resolution:
Migration to the latest version of JDA should resolve this issue. Will have to migrate references from core to api

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.