Giter Site home page Giter Site logo

k9's Issues

Preserve removed and modified messages

Listen channels for message modification and save differences in dedicated channel.

  1. If someone removes message, repost it in special channel
  2. If someone modifies message, send diff in special channel

[Quote Battle] Keep the winning quote in chat while voting for death or save

As the title says, it would be great if we could see the winning quote in chat and the amount of votes for/against while the voting for death or spare is still active.

quote battle

Perhaps where the arrow is it could say something like ... "against Quote # by x votes`. It would be nice to be able to see the quote which was deemed better than the one that lost and by how much.

Bot does not work

I'm self hosting this bot. Today it broke, so i restarted it, but it didn't help.
I updated it to 0.6.0-367, but it still doesn't work.
I guess it's related to mappings website shutdown, right?
How can i fix this issue?

!mcp func_151000_E
BOT K9: Unexpected error processing command: No such srg version: Unknown

Slap

Tagging @k9 in !slap does not slap the user

Field types

Show field type in mcpf command output.
May be useful

Old style embeds

After bot update, i noticed that mappings response is plain text.
Is it possible to switch to embeds as it was in older versions?

Question: Mojang proguard obfuscation map

Since 19w36a, Mojang has released proguard obfuscation map. The map allows for "private use" and disallows any distribution.

So two questions:

  1. Is it legal for K9 to add a mojang mapping lookup feature?
  2. If it is legal, will K9 have such a feature?

Bot stopped form working

I'm running 0.6.0-358

User: !mcpm getAliases 1.12.2
K9: Unexpected error processing command: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $

All threads deadlocked immediately after starting

Another reminder to myself to look into this.
I booted it up like normal, but after listing the servers it's in..

16:01:47 [boundedElastic-6] com.tterrag.k9.K9   Guinevere Central  
16:01:47 [boundedElastic-6] com.tterrag.k9.K9   yeetum-bots  
16:01:47 [boundedElastic-6] com.tterrag.k9.K9   The Dugre project  
16:01:47 [boundedElastic-6] com.tterrag.k9.K9   Bolb Quarantine  
16:01:47 [boundedElastic-6] com.tterrag.k9.K9   Gemwire Randomness  
16:01:47 [boundedElastic-6] com.tterrag.k9.K9   Curle Army   
16:02:17 [parallel-5] c.t.k.c.a.CommandRegistrar Saving all command data.  
16:07:17 [parallel-5] c.t.k.c.a.CommandRegistrar Saving all command data.

It dropped off the user list and doesn't respond to commands.
Thread dump says that all threads are deadlocked, waiting for each other.
https://paste.gemwire.uk/view/raw/504a12ca

Bot admin

Currently bot has hardcoded admin id, can this be changed?

Easy quoting

Feature request: automatically quote anything reacted to with ๐Ÿ’พ (or a custom "quote" emoji if you want to get fancy).

tricks not showing thrown exceptions

creating a trick like:
!trick -at clj trickname (throw (Exception. "Hi"))
will output:
Error evaluating trick: null
whereas
!clj (throw (Exception. "Hi"))
will output the expected
Could not process command: java.security.PrivilegedActionException: java.lang.Exception: Hi

[Suggestion] xkcd linking

(Idea from BobbyTablesBot on Reddit.)

Suggestion: If a user ran !xkcd 303, K9 would post the link to xkcd 303 in the chat (keeping the embed). Same if they ran !xkcd Compiling or !xkcd compiling.
No idea how hard this would be to implement, but it'd be really neat ๐Ÿ˜„

Command names are ambiguous and confusing

  1. None of their names actually describe what they do. The bot just assumes everyone will immediately know that !yc means !lookup_class
  2. Some of them have multiple meanings (i.e. mcage can be m_cage or mc_age)
  3. Running !help command doesn't do what help commands normally do (That's put under !commands for some reason, which does what !list would normally do)
  4. Relating to 1: running !commands does not provide any description of what any of the commands actually do.

Suggested changes:
!commands -> help (and add descriptions as per !help [command]

(keep originals as aliases)
!yc -> !class
!ym -> !method
!yf -> !field
!yp -> !param
!clj -> !eval
!mcage -> !mc_age
!yv -> !yarn_version
!lmgtfy (imgur?) -> !google

Trick prefixes mild UX annoyance

The trick prefix is mildly irritating when you forget if it's ?! or !?

Can we instead change it to a double prefix? e.g. if your commands are configured to use ! the trick shortcut is !! ?

Otherwise just being able to configure prefixes for tricks would be cool.

[Enhancement] Tricks Info Channel

Just a quick feature idea i had today, this could be implemented in multiple ways, here's a couple:

  1. Allow the creation of a channel (similar to the !info command) that contains a current list of Tricks registered with the bot and their output, have this list update whenever a trick is updated

  2. Add a flag to the trick execution command to allow it to remain "updated", so whenever the command is updated the output is also updated.

  3. Similar to 1, but allow for only select tricks in the channel (to avoid "prank" tricks/etc in the channel)

Add high five feature from the Chisel IMC server

I miss the old feature from the chisel IMC where if two people typed o/ or \o in a row, the bot would mention the high five and increment their counter. Would be a nice feature to include in K9

Spigot mapping support

Would it be possible to add support for spigot's mappings as well? This discord bot seems very useful, but the thing is I would need to be able to use spigot's mappings as well. Is this something that could possibly be added?

No natives in -all package from jenkins

I got this error:

14:21:02 [elastic-2] i.n.u.i.NativeLibraryLoader Unable to load the library 'netty_transport_native_epoll_x86_64', trying other loading mechanism.
java.lang.UnsatisfiedLinkError: no netty_transport_native_epoll_x86_64 in java.library.path

!cf is broked

Curse redesign thingie seems to have broken the cf command
image

K9 0.5.0.260 (on the moddedmc server)

Suggestion: add a !react command

Add a !react command that takes a message link and emoji name as a parameter, and adds the reaction to the message, then removes it after 30 seconds. During this time, the person who used the command can click the reaction and add theirs, allowing non-nitro users to react with any emoji from a server K9 is on.

Prevent info channel command from pinging users/roles

Currently, from my reading of the code and anecdotal evidence from cpw's last updating of the #rules channel on Forgecord, whenever a channel is updated using K9's info command, it pings any users or roles within the message text (excluding embeds, because pings do not work in embeds).

This presents a difficulty whenever a server owner or administrator is updating such channels using the info command and the text contains mentions of roles or users (such as listing the staff roles of the server), because any update will cause a ping to be sent to all users, which means that server owners/administrators have to coordinate with these pinged users to make sure they know that this ping is due to an update of the rules channel (to avoid inciting irritation or anger from those users who hate pings with a passion unrivaled).

However, I have found a solution residing in the Discord Developer documentation for Channels, for the Allowed Mentions Object.
The Allowed Mentions object in messages allows granular control whether what mentions in a message will actually cause a ping to be sent to users. It allows controlling mentions for: roles, users, @everyone/@here, specific roles, and specific users.
As a side effect, it also disables the yellow background in messages with pings.

Image of my bot using the Allowed Mentions feature to prevent a ping to myself
Image of my bot using the Allowed Mentions feature to prevent a ping to another user, with their confirmation The yellow background of the bot's message is due to it being a reply message (with mention) to my own command.

Discord4J implements this through MessageCreateSpec#setAllowedMentions(AllowedMentions), taking in an AllowedMentions object, built using its own Builder class which defaults to (to my understanding) an empty AllowedMentions object which prevents all mentions from becoming pings.
As a reference, JDA implements this feature through MessageAction#allowedMentions(Collection<Message.MentionType>) and other related methods when sending messages. To implement this in my bot, I have passed in an empty collection, and the results of that are shown above.

This feature will be very useful to servers that use K9's info command to manage rules channels, so their owners/administrators can update the rules for e.g. spelling mistakes or minor clarifications, without having to ping and disturbed those mentioned users/roles. (cough Forgecord cough)

[Enhancement] Trick Aliases

Pretty simple, allow for tricks to have aliases. One thing that commonly tricks me up is a trick name being plural or not. Having aliases would be useful to solve this

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.