What's the hardest part about making skimmed milk? Throwing the cows across the lake.
Discord: @itshobbes (formerly itsHobbes#1985)
Mimic is a discord bot built originally for The Programmer's Hangout that creates sentences based on its users.
License: MIT License
Is your feature request related to a problem? Please describe.
Currently markov chains are created by pairing a word and a follow word. Only two words are considered at a time as a Bigram.
Describe the solution you'd like
Quality of generated sentences may be improved by using a tri-gram (or n-gram higher) method instead.
• Create a markov interface
• Allow multiple implementations of markov chains to be used.
Is your feature request related to a problem? Please describe.
Basic analytics were added for logging command usage of mimic!self
, mimic!rand
, and mimic!all
. But there is currently no command to view these analytics.
Describe the solution you'd like
• Add a mimic!analytics
command to view the analytics for the server the command is invoked in.
• The command should display the usage for each of the mimic commands over time.
• The command should accept a number of days argument. (min: 7, default: 30, max: 90)
• The command should respond with an image graph of usage for each command (The XChart library looks like a good option)
• The command should have a cooldown of 30 seconds, scoped to the channel.
Is your feature request related to a problem? Please describe.
Current functionality means a user that has opted-in on multiple servers would have to opt out of each server individually.
Describe the solution you'd like
This FR proposes an optional --global
argument to the opt-out command allowing the user to opt-out of all servers they have joined.
Is your feature request related to a problem? Please describe.
Code snippets are a big part of helping out users that are learning to code. There is room for this bot to read and parse specific language code snippets from discord.
Describe the solution you'd like
```js
mimic!js
, mimic!java
Describe alternatives you've considered
For now this implementation is open for discussion. Additional details, changes, and suggestions are welcome.
Describe the solution you'd like
If a user leaves a server the data deletion should be queued for 24 hours before data is deleted, in the case of a mistaken ban/kick or mistaken server leave.
Currently the edit message listener ignores the message length required by the Markov chain.
Steps to reproduce:
< 3
Expected Result
Short message edits are ignored. Markov chains can be built without issue
Actual result
Short message edits are not ignored. Causing Markov chains to fail
Additional Info
Caused by: java.lang.IllegalArgumentException: Input '<:pleb_this:582076395119706113>'is too short. Must be greater than 3 tokens.
at uk.co.markg.bertrand.markov.Markov.parseInput(Markov.java:110) ~[bertrand-1.0.jar:?]
at uk.co.markg.bertrand.markov.Markov.parseInput(Markov.java:98) ~[bertrand-1.0.jar:?]
at uk.co.markg.bertrand.markov.Markov.<init>(Markov.java:26) ~[bertrand-1.0.jar:?]
at uk.co.markg.bertrand.markov.Markov.load(Markov.java:37) ~[bertrand-1.0.jar:?]
at uk.co.markg.bertrand.markov.Markov.load(Markov.java:31) ~[bertrand-1.0.jar:?]
at uk.co.markg.bertrand.command.markov.MarkovSelf.execute(MarkovSelf.java:27) ~[bertrand-1.0.jar:?]
Is your feature request related to a problem? Please describe.
Server-wide chain caching is currently done by serialising the markov class into a file and reading the file. The cache expires after 2 hours. This can be improved
Describe the solution you'd like
Cache timings should scale in line with the number of messages saved per server. If a server is low on total messages read, mimic!all
will perform poorly if it must wait 2 hours to utilise any new messages.
Example functionality:
• servers with x < 10_000
messages stored should not be cached
• servers with 10_000 > x < 100_000
messages stored should be cached for 1 hours
• servers with 100_000 < x
messages stored should be cached for 6 hours
Cache timing and message limits can be subject to change.
It would be worth experimenting between the memory usage of caching the chain in a byte array vs reading the serialised from a file.
Describe the solution you'd like
If the bot leaves a server the data deletion should be queued to initiate in 24 hours instead of immediately in the case where the leave event is triggered due to a discord outage, or a bot is mistakenly removed from a server.
Is your feature request related to a problem? Please describe.
Current the bot does not support multi-guild operations.
Describe the solution you'd like
Additional context
Commits can be prefixed with [db] for database related commits (updating schema, updating JOOQ files, updating repository classes) and [command] for command based commits.
Is your feature request related to a problem? Please describe.
Mimic seems to be able to run commands through mimic!start
E.G. mimic!start tph!selfmute
Describe the solution you'd like
mimic!start
could use a Zero Width Space in front of the result
Describe alternatives you've considered
Additional context
Tried in TPH (I got told) and I think an attacker could be able to run things from mimic, even though I failed
Is your feature request related to a problem? Please describe.
There is currently no cooldown on channel commands.
Describe the solution you'd like
Cool downs should be added to channels.edit
, channels.add
, and channels.remove
.
Cool down should be 5 seconds and scoped to the user.
Cooldowns should not send the cooldown message. If disparse has been updated (BoscoJared/disparse#26), then the cooldown reaction should be sent.
Describe the solution you'd like
The command should allow the user to start a sentence so that mimic can finish it.
Example usage:
mimic!start I like
-> mimic's response: I like ....
This should use the global server chain.
Is your feature request related to a problem? Please describe.
Users are currently unable to view the list of channels that the bot can is configured to read messages from.
Describe the solution you'd like
mimic!read
)Additional context
Commit name should be prefixed with [command]
for command related changes or [db]
for database related changes.
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.