destinygg / chat-bot Goto Github PK
View Code? Open in Web Editor NEWThe Current Moderation Chat Bot running on destiny.gg
License: MIT License
The Current Moderation Chat Bot running on destiny.gg
License: MIT License
lines {265,160}
contact me on instagram : ikzmoo
I needed something like this in my config to run npm start
without throwing an error
"redditVote":{
"enabled": false,
"scriptPath":""
}
Production is currently running Node 10 and cannot be upgraded to 12+ without throwing package errors + node gyp compile errors.
package.json
should be bumped to the latest stable versions + any changed required to make the bot run under Node 14.
eg: !mute Kogasa, tng69, Cake
!ipban Kogasa, tng69, Momomo
The !youtube command is currently not playing well with the livestreams, since the YouTube vod is unlisted/deleted after streaming.
This command should only post Public videos.
21:56 Cake: !yt
21:56 Bot: "Deleted video" posted 6 hours ago https://youtu.be/BJe5c4WcWVk
DGG API returns a live status for Twitch (lol), YouTube, Rumble, and Kick.
!live should dynamically support all platforms and when live on multiple platforms offer a total view count.
Automod mute/bans should be able to use regular expressions, and case insensitive like current string based automod
The bot should be adapted to connect to the Destiny livestream and moderate / act the same way as the bot already does in DGG/Twitch.
RightToBearArmsLOL: !ipban 15hourdays cute_sc2
Bot: ourdays banned through bot by RightToBearArmsLOL. Reason: cute_sc2
Should produce a ban for 15hourdays
From the addition of YouTube into the live command from #70
YouTube API limits suck, should be cached or another solution created.
chat-bot/tests/lib/services/gulag.test.js
Line 32 in 7878af5
mmacheerpuppy not in list
When you are banned and refresh the page for the first time, the bot displays the ban time in UTC and, if the difference between your local date and UTC date is different, will say "tomorrow" instead of today for short length bans.
Visual screen shot of error: https://i.imgur.com/0uUcIxX.png
Reproduction steps:
Note the error goes away if you refresh more than once
Bonus meme:
████████▓▓████████▓▓█████████████
██████▓▓█████████████▓███████████
█████▓███████████████▓███████████
████▓█████████████████▒██████████
████▓▓▓▒░░▒▒▒▒▒▒▒▒▒▒▒▒▒██████████
████▒▒░▒▒░▒▒▗▒▒▒▒▒▒▗▒▒▒██████████
████▒▒▒░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████████
████░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█████████
█████▒▒▒▒▒▒▒▒▃▒░░░▒▃▒▒███████████
██████▓▒▒▒▒▒▃▒▒▒▒▒▒▒▃░▒▒█████████
███████▒▒▒▒░▒▒▒▒▒▒▒▒▒▒░██████████
█████████▒░░░░░░░░░░░░░██████████
██████████░▒░░░░░░░░░░██▓▒▒▒▒▒▓▒▓
▓▓█████████████▒░░░▒████▒▒▒▒▒▓▓▒▓
▒▒▒▒▒▒▓███████████████████▒░░▒▒▒█
▒▒▒▒▒▓▓▒▒█████████████▒████░▒████
█▒▒▒▓▓▒▒▒████████████▒███████████
███▓▒▓▓▒█████████████████████████
░░█▀▀░░█▄░█░█▀▀█░█▄░▄█░█▀▀░█▀▄
░░█░▀█░█░▀█░█░░█░█░▀░█░█▀▀░█░█
░░▀▀▀░░▀░░▀░▀▀▀▀░▀░░░▀░▀▀▀░▀▀░
!aegis would be the most recent nuke
!aegis 2 would be the nuke before the most recent nuke
Store I dunno, 5 of the past nukes per chat?
mutes stacks for things that might be accidental, which is ok
mutes do not stack for the mute caused by saying the n slur, which is 99% of cases is not accidental.
This isn't very logical.
!meganuke yeehaw //Bans everyone who says yeehaw, all other nuke logic applies
This happened in twitch chat a while ago (Feb 28th UTC), But !aegis appeared to unban a recent, manually perma banned chatter.
Relevant logs:
[01:07:45] zadeh: @destiny Maybe she does not want to break the session? you dumbfuck LULW
[01:07:58] destiny banned zadeh
[01:46:18] loomies: !nuke 10m youtube
[01:47:58] loomies: !aegis
[01:48:03] destinyggbot unbanned zadeh
Some notes:
The user didn't appear to have said "youtube" in their previous logs that day
Aegis unban event was 40 minutes after the manual perma ban by destiny
This doesn't seem like intended behavior unless we've overlooked something else that would've prompted the save by aegis.
Initially caught by EMPIREF4N.
Pretty minor issue.
https://i.imgur.com/1dPuk9g.png
Looks like the !yt command is pulling the Upload date instead of the Published date for the latest video.
In this case the editor uploaded the video 2 months ago, but didn't initially publish back then so there would be uploads available for low content times (Like when streamer man is on vacation). That video was then published yesterday.
I think the expected behaviour would be to show the "published" date instead the "upload" date for the yt videos.. if that's even a value you can pull. glhf.
as we know destiny refuses to turn on dark mode for literally anything
https://chrome.google.com/webstore/detail/previews-for-ttv-yt/hpmbiinljekjjcjgijnlbmgcmoonclah
https://github.com/MarkM-dev/Previews-client
this extension for youtube and twitch has a feature that dims the screen to defend against retarded streamers who fucking refuse to be considerate to their viewers
https://imgur.com/a/Oi53zRB heres an example of how it works
i wouldnt be making this feature request if the dev wasnt dormant and refused to fix the issue for over 2 years now where the feature doesnt work when embedded
so im just requesting this feature really just to ask someone to steal his code and implement it into dgg to do his job for him
Bot currently has little logging or observability into errors or debugging unexpected behavior.
This includes websocket errors, sqlite errors, or actions of chat commands / automod.
A new feature mode should include a command-togglable to mute links in the chat. Mute should be 10 minutes,
The command should be a bool toggle, same to enable and disable.(!mutelinks on
/!mutelinks off
).
If you're feeling adventurous, you could make it act similar to a nuke, but only for links. (!mutelinks on 1h
)
When enabled: all hyperlinks in chat are 10 minute muted. Hyperlinks in chat are valid without http(s):// in the URL.
Pretty simple, add an enable/disable flag to the bot config for lastfm song commands
Chat mute commands in both dgg/twitch should be limited to 1 day in time, for example a command !mute 1024h RTBALOL should be rounded out to 24 hours.
A command similar to !listcommands
But it only lists the commands currently scheduled.
Many unit tests broke after changes in recent PRs. This might also be a good opportunity to fix the tests that were broken before then, too.
Besides any upcoming security issues associated with the EOL, setting up a dev environment with Node 14 is challenging. I couldn't install dependencies on my machine (macOS Monterey 12.6.4) without Python 2.
Should upgrade to the current LTS version: Node 18.
List of notes to improve readme for first time setup (will be editing this issue as I find more improvements)
create an empty file named bot.db and mention that location in the config prod.config.json file
Code updates:
update sample.config.json to mention redditVote
Not sure if this a version specific thing for node js:
change
const { readFile, writeFile } = require('fs/promises');
to
const { readFile, writeFile } = require('fs').promises;
Currently the YouTube Data API is used to grab the livestream video ID to get the concurrent viewer count off youtube, however the quota cost of doing this is very high (100 points, of the 10000 daily allotment) even if you are using etags, as they are seemingly ignored in terms of quota cost for searches effectively making #90 entirely useless.
Now we can do some caching which prevents a lot of search api calls when the broadcast is live, which would no doubt actually reduce the API usage quite dramatically. However it does nothing if there is no stream, therefore each !live command invocation will incur the the 100 point quota cost. We could get creative and instead of doing the search we could probably check the X number of latest videos for liveStreamingDetails and if they dont have a live viewer count assume there is not stream. Alternatively assume there is never a YouTube stream without a Twitch stream and only perform the search api call on youtube if there is an active twitch stream, but that that excludes !live from working if Destiny is talking to a person banned on twitch ie. Vaush.
So the real solution is to use the YouTube Live Streaming API instead, which I'd be happy to do however that will require OAuth tokens to Destiny's channel to make it work in production.
GOOD LUCK!
If a message contains two banned terms "A" and "B", and "A" is a 10 minute mute, but "B" is a 20 minute mute ,it should choose the 20 minute mute regardless of order
Seems like an easy way to drive traffic / activity on twitter posts for the less twitter obsessed users.
Something as simple as Tweet posted --> Bot notification in chat
Example chat line:
"Bot: New tweet has been posted! twitter.com/TheOmniLiberal"
or could be a little more specific and pull the actual Tweet link instead of the generic twitter link.
Write a valid Dockerfile and include docker-compose for running in production with both DGG and Twitch chats.
When !addban is used in twitch or dgg it results in permanent bans for users in twitch chat regardless of the time specified.
This happens because there is no such thing as a timed ban in twitch chat. All timed events are timeouts and have a max of 2 weeks.
!addban should be updated to issue timeouts (instead of bans) in twitch chat
OR
if !addban isn't all that important.... !addban could just be added as an alias for the !addmute command.
OOOO
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.