twasi / twasi-core Goto Github PK
View Code? Open in Web Editor NEWCore application and backend of the Twasi chatbot for Twitch.
License: MIT License
Core application and backend of the Twasi chatbot for Twitch.
License: MIT License
NPE:
INFORMATION: LoggerImplFactory set to org.mongodb.morphia.logging.jdk.JDKLoggerFactory
Exception in thread "main" java.lang.NullPointerException
at net.twasi.core.database.Database.connect(Database.java:43)
at net.twasi.core.Main.main(Main.java:27)
example twasi.yml
database:
type: MongoDB # Only type that is supported
hostname: localhost
port: 27017
user: root
password:
database: twasidb
port: 27017
We use the Twasi-URL-Shortener for Ref-Links. Every Twasi user can have it's own Ref Link. It's formed like this:
https://twa.si/ref/[twitchname]
, for example https://twa.si/ref/blechkelle
. Upon visiting such a link, you get redirected to the panel with a GET-Parameter ref
set.
For example: https://panel.twasi.net/?ref=blechkelle
The frontend will then save the referer in local storage. The latest referer will then be prefilled in the "referer" text field in the setup. The name can be changed of course, but the referer has to be registered at twasi.
Create a plugin for rewarding your viewers. Should come with functionalities like AntiAFK. Worth of a token should be customizable.
Other Plugins should have access to an API to add / remove tokens.
A transaction log would be nice too.
Users should be able to add variables with a custom Name and output
The !help command could be abused by viewers wich can lead to spam in our support inbox.
The command should therefore only be accessible for the streamer and the moderators of the channel.
When the bot is stopped you cannot install/uninstall plugins.
Since the first version was a little buggy the plugin needs to replaced
Create a plugin to create timed messages. They should be visible in the web interface and have a countdown until the next execution.
We need to think careful how we handle the custom threads.
Add a generic songrequests-plugin.
The plugin should be able to allow requests across the following platforms:
The user should be able to select which platforms he wants to use.
To use spotify he needs to connect his spotify account to twasi. This should be in a seperate Twasi plugin.
Make sure that the API is available to make it accessible from the panel. We need to work with websockets to allow viewers to listen directly to the music. The websocket server should be suited in the songrequests plugin.
Steps to reproduce: Just use some commands that require permission.
What happens: The Entity Cache produces an error that kills the whole permission system until a complete Twasi restart. All commands that require permission won't work except you're a global Twasi Admin (no check for a permission string in this case).
Currently you have to add them by hand, that's annoying and new Core-developers could get confused by that.
Allow mods to save quotes of the streamer. Quotes should be listed on a public page of the twasi-panel.
We should store the user profile banner in our database, so that we can show it in the background.
For admins, it should be possible to simulate that they are another user. This is useful for testing and supporting.
When an instance is stopped (e.g. by the user in the web panel), all user plugins should be disabled.
Decrease rate limiting problems by providing a bearer token for every request (as seen in https://dev.twitch.tv/docs/api/guide/#rate-limits)
Plugin to provide extensive debug information and functionality at runtime (in channel chat or by whispering the bot).
F. e.:
https://dev.twitch.tv/docs/api/reference/#get-streams
Stream Tracker
Users should be able to request help in a support ticket system that works like a chat.
A user sees the first time setup screen after his first login to twasi. He should there have the ability to "set his account up later". The bot should then ignore this user, but the user should be able to receive permissions to other streamers panels or participate in the "public services", e.g. the songrequests.
Variable names should ignore non-alphanumeric chars (They should fit into a sentence like "$sender, you are amazing" instead of "$sender , you are amazing").
They also don't parse args correctly: (name [arg1, arg2, ...])
Input | Parsed to (currently) | Parsed to (should) | Reason |
---|---|---|---|
$hello(world,123) | hello ['world', '123'] | hello ['world', '123'] | Alright |
$hello(world, 123) | hello ['world'] | hello ['world', '123'] | Whitespace behind 'world,' |
$hello(world,123 | hello ['world', '123'] | hello ['world', '123'] | Parameter list is unclosed (dirty and error prone) |
To prevent unexpected behavior they should have a smarter system that searches the closing bracket (if it has brackets, irrelevant if it hasn't) and automatically remove whitespaces between arguments.
They also need a system to prevent double variable registration.
The user should see a quick getting started guide. He should feel comfortable.
The welcome screen should be splitted into several steps:
Step 1:
Step 1.5 (Optional, only when wants to migrate):
Step 2:
Step 3:
Clarify that twasi is an open-source project created in spare time. It was created for fun, the whole code is open source.
The user should only have access to the panel after he went trough all steps.
At the moment, all users are downloaded to the local ram on startup.
This is not optimal, since it does not allow to change user data from "outside". Other changes to the database will be ignored and overwritten.
This makes also no sense performance-wise.
What would be a better option to avoid concurrency? There should only be one Object at the time.
Not everything is a plugin, and thus not everything should be listed in the plugin store. If plugins do not specify dependency: true, they won't have to specify a user plugin class. This is often used for libraries that only need to interact with other plugins, but don't have a direct connection to the user interface.
Create a plugin that tracks streams over time.
The following information should be gathered (in an interval of 1 minute):
Data structure: We create an object for Every stream. Inside this object is an array of StreamRecords that hold values during the stream. Example:
{
streams: [{
id: 'TwitchID',
isLive: true,
duration: null, // is Null because the stream is live, should be calculated
started: '2018-04-23 11:51:00',
streamRecords: [{
time: '2018-04-23 11:51:00',
viewer: 14,
game: 'Counter Strike: Global Offensive'
}]
}]
}
The confirmation email should be resendable.
Write a plugin that logs all messages sent to the users chat.
He should be able to search and filter for messages in the panel.
There is already a GitHub project with a started plugin: https://github.com/Twasi/message-logger
Sometimes (but rarely) the translations of plugins (not all, it's random!) cannot be loaded for any reason. They will keep returning the requested translation key even if there's a translation for en_gb. It can be fixed by a Twasi restart. Should be fixed anyway.
Muss:
Nice to have:
I should be able to view another streamers profile. There I should see his general twitch data (follower, views etc.) and the songrequests list, the quotes etc. (if the streamer wants that). Later should also be the player there.
If a first time user views a page of a streamer and chosses to log in, he should not need to sign up for the bot and have the option to skip the setup of the twitch bot.
Twasi Plugins should specify on which other plugins (or dependencies) they depend on.
Twasi Core must not enable them before all of their dependencies are enabled.
Otherwise some plugins might not enable correctly when they use a service of another plugin.
The README file should contain a complete list of all plugins that are currently in use. Also it should link the Homepage, the documentation and the panel.
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.