Coder Social home page Coder Social logo

chat-bot's People

Contributors

11k avatar deen17 avatar dependabot[bot] avatar derdeidra avatar dotted avatar gabrieljablonski avatar iliedaboutcake avatar jjayl avatar johnpyp avatar kierk avatar mitchdev avatar ohslyfox avatar quikstrike avatar riott avatar shadedred avatar tbreslein avatar vyneer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chat-bot's Issues

Add redditVote to config sample

I needed something like this in my config to run npm start without throwing an error

  "redditVote":{
    "enabled": false,
    "scriptPath":""
  }

Update packages.json to support Node 14

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.

Prevent !youtube command from posting deleted videos

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

Update !live to support all platforms

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.

Add YouTube chat platform support

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.

Fix names that match regex for bans

RightToBearArmsLOL: !ipban 15hourdays cute_sc2
Bot: ourdays banned through bot by RightToBearArmsLOL. Reason: cute_sc2

Should produce a ban for 15hourdays

Bot is in UTC Time

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:

  1. Get banned for a short period of time.
  2. Refresh the chat once.

Note the error goes away if you refresh more than once

Bonus meme:

████████▓▓████████▓▓█████████████
██████▓▓█████████████▓███████████
█████▓███████████████▓███████████
████▓█████████████████▒██████████
████▓▓▓▒░░▒▒▒▒▒▒▒▒▒▒▒▒▒██████████
████▒▒░▒▒░▒▒▗▒▒▒▒▒▒▗▒▒▒██████████
████▒▒▒░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██████████
████░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒█████████
█████▒▒▒▒▒▒▒▒▃▒░░░▒▃▒▒███████████
██████▓▒▒▒▒▒▃▒▒▒▒▒▒▒▃░▒▒█████████
███████▒▒▒▒░▒▒▒▒▒▒▒▒▒▒░██████████
█████████▒░░░░░░░░░░░░░██████████
██████████░▒░░░░░░░░░░██▓▒▒▒▒▒▓▒▓
▓▓█████████████▒░░░▒████▒▒▒▒▒▓▓▒▓
▒▒▒▒▒▒▓███████████████████▒░░▒▒▒█
▒▒▒▒▒▓▓▒▒█████████████▒████░▒████
█▒▒▒▓▓▒▒▒████████████▒███████████
███▓▒▓▓▒█████████████████████████
░░█▀▀░░█▄░█░█▀▀█░█▄░▄█░█▀▀░█▀▄
░░█░▀█░█░▀█░█░░█░█░▀░█░█▀▀░█░█
░░▀▀▀░░▀░░▀░▀▀▀▀░▀░░░▀░▀▀▀░▀▀░

Persist nuke history

!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?

stacking mutes

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.

`!sch` command doesn't correctly handle all-day events

  • Consider updating googleapis, which could make implementing these changes easier. The docs for the version of the library currently in use 404s.
  • Convert start time of all-day events to broadcaster's timezone (as configured in bot). Currently, the start time is in UTC.
  • Detect when it's during an all-day event and convey that to the user.
  • If it's during an all-day event and there is a scheduled event during the all-day event, tell the user when it begins.

!aegis removing recent manual permaban

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

image
*Viewer card times in CST

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.

Youtube Publish date vs Upload date

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.

Flashbang Defender

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

Increase Logging Verbosity

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.

New Feature: Anti-Linker Mode

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.

image

Limit mute commands to max time 1 day

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.

Unit tests are broken

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.

Node.js 14 is officially EOL at the end of April

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.

Documentation improvements to help contributors get their local environment set up

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;

Reimplement !live command for YouTube using the Live Streaming API

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!

Tweet Notifications in Chat

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.

!addban functionality in twitch

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

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.