hyacinthbots / lilybot Goto Github PK
View Code? Open in Web Editor NEWLilyBot, a multi-purpose bot for discord!
Home Page: https://hyacinthbots.org
License: GNU General Public License v3.0
LilyBot, a multi-purpose bot for discord!
Home Page: https://hyacinthbots.org
License: GNU General Public License v3.0
/thread archive
on a thread should also remove the prevent-archiving protection if present, but it doesn'tThread archiving enabled!
No response
No response
No response
Two references are compared with the ==
/!=
operators. This may not work as expected and may cause bugs due to wrong assumptions.
There are 2 occurrences of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/IrisShaders/LilyBot/issue/JAVA-W0280/occurrences/
Is your feature request related to a problem? Please describe.
These types of messages only serve to clutter up a channel.
Describe the solution you'd like
Lily detects these messages and deletes them.
Describe alternatives you've considered
The messages have to be manually deleted.
Lily doesn't check if she has permission to send a message in a channel before sending it. Alternatively, we don't catch this error. The major culprit I see is the response helper, but I'm sure there are other locations.
Explains itself.
As Lily scales up, SQLite will have issues with performance and high concurrency. MongoDB has been suggested as an alternative.
Is your feature request related to a problem? Please describe.
Lilybot only has modlogs, message logs and member join/leave logs.
Describe the solution you'd like
Lilybot should log things like role creations/deletions/assignments/edits, channel creations/deletions/edits, and bot additions/removals.
Describe alternatives you've considered
I used dynobot for the extra logging it had before switching to lilybot.
Additional context
None.
e.g. pk;e
If possible, such messages should be checked through the PluralKit API and not logged. I have not investigated if this is viable.
Title says it all. May be difficult to deal with embeds...
Alternative to this is to create a welcome channel system using Cozy's welcome channel module, perhaps
Casting channels is generally not a great thing to do apparently. The preferred way to do the same thing is asChannelOf<channelType>()
Someone needs to go through every as channelType
and replace it with an asChannelOf<channelType>()
An auto-unarchive of sorts. I'm thinking a command with sub commands for set, unset, and list.
This data should be deleted when Lily leaves a guild. Holding onto it both uses database space and holds onto user data for no reason. There should probably be some sort of safety system so an accidental kick doesn't wipe all the guild's tags. A DM to the owner, if possible, would work well.
The current system is poorly designed and written. It's also quite likely not properly adapted to Lily being cross-guild. It needs a full rewrite, likely using a dropdown so multiple roles can be selected from one menu.
Meaning that if you opened two unmute dialogs and click yes on one, you'll unmute both (or more if there's more).
https://discord.com/channels/893172681367777281/893172681896239169/896824109240053821
Should be fixed by just appending the id of the muted user to the button too
The same may happen with report, haven't tested it.
Too lazy to send a fix rn.
Some other moderation focused bots, e.g. Zeppelin, have public responses to moderation commands. This informs any users in the conversation of the actions taken. For some communities, this is preferred, so Lily should have an option to support it.
The easiest way to do this that I can think of is to make a copy, possibly with slightly less information, of the logging embed and send it in the channel. Shenanigans with public responses might also be an option. Ephemeral moderation should remain default.
The first message in support threads is always something along the lines of "@user
, please wait for the @support role
to get back to you!" This is not always suitable, so a config option to change this would be quite nice.
This should likely be guild-specific for privacy, but a way to view all your reminders across every guild would also be good.
When running certain commands in DM's with the bot, it simply errors due to the guild being null. Lily should catch this print a subsequent error. This could be an avenue for @Miss-Corruption's suggested Exceptions that can be found here
java.lang.NullPointerException: null
at net.irisshaders.lilybot.utils._UtilsKt.getConfigPublicResponse(_Utils.kt:41)
at net.irisshaders.lilybot.extensions.util.PublicUtilities$setup$3$2$1.invokeSuspend(PublicUtilities.kt:88)
at net.irisshaders.lilybot.extensions.util.PublicUtilities$setup$3$2$1.invoke(PublicUtilities.kt)
at net.irisshaders.lilybot.extensions.util.PublicUtilities$setup$3$2$1.invoke(PublicUtilities.kt)
at com.kotlindiscord.kord.extensions.commands.application.slash.EphemeralSlashCommand.run(EphemeralSlashCommand.kt:119)
at com.kotlindiscord.kord.extensions.commands.application.slash.EphemeralSlashCommand$run$1.invokeSuspend(EphemeralSlashCommand.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:191)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:147)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:93)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:191)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:147)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:93)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:191)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:147)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:93)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:191)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:147)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:93)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:191)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:147)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:93)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
All versions
No response
This format string includes a newline character (\\n
). This may cause issues on platforms like Windows that do not use Unix line separators.
There are 2 occurrences of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/IrisShaders/LilyBot/issue/JAVA-W0379/occurrences/
Currently if the lock channel command is run in a thread, the parent channel will be locked. There should be a way to lock threads. This might need to be a separate lock thread sub command, but I haven't done enough research to be sure of that.
Expected behavior: some sort of message saying "This guild has no tags"
Is your feature request related to a problem? Please describe.
None.
Describe the solution you'd like
Lily should open a thread on creation and write a message (can be edited by the server staff) in said thread and edit in a specified role ping.
Describe alternatives you've considered
None.
Additional context
Basically what Cozy does in the Quilt discord.
Is your feature request related to a problem? Please describe.
I run a server with various ongoing projects and have people rarely participate in them because they are in threads.
Describe the solution you'd like
The ability to add any arbitrary role to a thread, ideally without pinging the role.
Describe alternatives you've considered
When the database format for something is updated, we currently have no solution for migrating it. We write a bad startup hook and then revert the commit before release. See #177 for example. We need to come up with a more permanent solution for this.
It doesn't make sense to require administrator perms for a lot of the config options (or really any of them). Almost all of GiselleBot's options can be configured by a server manager, and that is the permission gate for most of Discord's options, like changing the server name or icon. It doesn't make too much sense that a server manager can change the server name and icon but not where messages are logged, for example.
On the Debuggy Community discord, lilybot does "ping" moderators (in our case, its the staff team role) but no one is added to any threads.
No response
No response
No response
It should check to see if the roles in its roleping configs are pingable or if it has the "Ping everyone, here and roles" perm.
The clear command doesn't work.
Iris's discord has nickname permissions off to prevent hoisting, general trolling, or offensive names. As a result, users must manually request nicknames from moderators, and there's no clear way for this to be done. This command would solve that issue.
The vision is that a user would simply run the command with their requested nick. Lily would then create a message in the mod action log with a confirm/deny button. Mods could then simply press the button and Lily will nick the person, dm them, and auto-update the message.
if someone is muted then unmuted and then lily is restarted in the time the mute was supposed to last then that person will get muted again
Hastebin is a less than ideal pastebin. Previously discussed alternatives include GitHub Gists or pastebin.com
Iris support threads tend to be short-lived, but Modrinth support threads tend to require an investigation and analysis. One-hour archive times are nowhere near sufficient for us.
These should lock anyone who's not staff from speaking. It might be possible to utilize code from Cozy as was done for the thread mod inviter.
This would need:
JDA Chewtils only cares about slash commands before the onReady
event. If onReady
is called before Lily has finished registering commands, the ones left won't be registered (this is unlikely to happen since there's network, discord and more, but I think possible).
https://github.com/Chew/JDA-Chewtils/blob/21f7efbdb58a5571edc09b622fc06e8831803020/command/src/main/java/com/jagrosh/jdautilities/command/impl/CommandClientImpl.java#L580-L602 is the only reference to slashCommands
, and that's the only thing that addSlashCommand
touches (https://github.com/Chew/JDA-Chewtils/blob/21f7efbdb58a5571edc09b622fc06e8831803020/command/src/main/java/com/jagrosh/jdautilities/command/impl/CommandClientImpl.java#L346)
A fix for this may be adding slash commands before building the CommandClient
, assuming the ReadyEvent can't come before it's built. Else it's not even Lily's bug.
Another fix is sending the slash commands to discord manually, as it's called in the lib. That would also allow creating, editing and deleting commands at runtime (see https://github.com/altrisi/LilyBot/blob/a0537320e341962bb6c1fc463f356f01d7eee565/src/main/java/net/irisshaders/lilybot/commands/custom/CustomCreator.java for an example of how adding could work). But the editing and deleting part is more complicated to handle, since the maps/lists aren't exposed.
When leaving and rejoining the server, the muted role is not applied for active mutes.
Add an event listener to member join event on JDA and check against list of active mutes
When a catch
clause is empty, it essentially ignores any occurrences of the particular exception it handles. This could allow critical bugs to go undiagnosed because any relevant exceptions indicative of a bug would be discarded within this catch
block.
There is 1 occurrence of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/IrisShaders/LilyBot/issue/JAVA-W0052/occurrences/
When a log is sent as the first message of a thread in a support channel, Lily places the "Would you like to upload" dialog outside the thread.
If someone is having four different issues simultaneously then we want four different threads
No response
No response
No response
No response
Currently, they're just named after the user. While occasionally helpful, being able to see at a glance what threads are would be quite useful. Some sort of system that parses the message and names the thread accordingly, while also encouraging the user to give it a better name, would be quite useful.
This command would take a duration and a string value and remind the user with a ping after that period of time.
Both of these should be fairly trivial to implement
Is your feature request related to a problem? Please describe.
I want to have join messages on my server, but I don't want to use the built in ones which Discord provides, since they look "unprofessional" and can be deleted by the user. Discord also does not provide any leave messages.
Describe the solution you'd like
I would like a system which lets me create my own join and leave messages, with a few additional features:
Describe alternatives you've considered
It is possible to send join logs to a public channel, but not very clean. The feature could also be implemented very simply without the extra things I've suggested.
Opt-in edit logging. Works the same as delete logging, but for edited messages.
There's currently just a try/catch that swallows any errors. It'd be much better to catch errors and then respond in some way, most likely by updating the embed and outputting the stacktrace.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.