SurajBhari / clip_nightbot

make a way you can clip with a single nightbot command

Home Page:https://streamsnip.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clip_Nightbot/Streamsnip: Stream Clipping Simplified

StreamsnipChart.jsFlaskAWSPythonJavaScriptCSS3ApacheYouTubeYoutube Gaming
The primary goal of Clip_Nightbot is to streamline the clipping process, addressing challenges faced by one of my favorite streamers. Here's how you can make the most of it:

Monetization

This program is a free for everyone as of now. But you can contribute.
Buy Me A Coffee
Most of the donations goes back to development and hosting costing.

Nightbot Command:

!addcom !clip $(urlfetch https://streamsnip.com/clip/$(chatid)/$(querystring))

Just adding this command will get you started. but if you want to have a discord message. or customization then read below.

If you want to send a discord message. then I would need to add a webhook URL alongside the youtube channel ID. for that fill this form or contact me here.
Discord Badge
Server Badge

Optional Arguments:

  • showlink (default: true) - Display the link where all clips can be viewed.
  • screenshot (default: false) - Enable or disable screenshot capture. If enabled the nightbot may not get response in given time and will say "Timed out" message. but it will still clip.
  • delay (default: 0) - Introduce an artificial delay to the command. Useful for scheduling links in the future or past.
  • silent (default: 2||Highest) - Level of the clipping message. see example below.
    image
  • private (default: false) - If set to true. the clips made are not shown on the web nor impact stats. if you don't want your channel to show up on website. you use it. This override silent and returns just ​​clipped 😉
    image
  • webhook (default: None) - You can pass your own webhook rather than using the one you provided me (if you did), if combined with private you can make totally anonymous clips in a private channel. this take webhook in format of webhook_id/webhook_token ex. lets say a webhook is -> https://discord.com/api/webhooks/1211440693168447599/ieU15QcFI_PcAun88TFGpUuRMK6E7Me14jioxB1mbJrRU6ay3XI8jByeEk3XKlVKr8_s then you pass webhook=1211440693168447599/ieU15QcFI_PcAun88TFGpUuRMK6E7Me14jioxB1mbJrRU6ay3XI8jByeEk3XKlVKr8_s
  • message_level (default: 0) - Customize how the discord message should look like. to support "anonymity" Untitled
  • take_delays (default: false) - Do you consider your viewers to be smarter than average person ? if you turn this on. the first and last word will be evaluted to add/subtract delay. The following screenshot was taken with delay=0. but it still gave a delay of 20 seconds as the author wrote -20 as first word.
    image

Here's one example using all of it.

https://streamsnip.com/clip/$(chatid)/$(querystring)?showlink=false&screenshot=true&delay=-30&private=true&webhook=1211440693168447599/ieU15QcFI_PcAun88TFGpUuRMK6E7Me14jioxB1mbJrRU6ay3XI8jByeEk3XKlVKr8_s&message_level=3&take_delays=true

Examples:

  • https://streamsnip.com/clip/$(chatid)/$(querystring)?showlink=false - No links.
  • https://streamsnip.com/clip/$(chatid)/$(querystring)?showlink=false&screenshot=true - No links, but with screenshots.
  • https://streamsnip.com/clip/$(chatid)/$(querystring)?screenshot=true - Screenshots are given.
  • https://streamsnip.com/clip/$(chatid)/$(querystring)?delay=-20 - Set a delay in the past by 20 seconds.

Other Commands

  1. !delete <clip_id> - delete the given clip(s)
!addcom !delete $(urlfetch https://streamsnip.com/delete/$(query)) -ul=moderator

⚠️ don't remove the -ul=moderator part, otherwise anyone can delete your clips.
image image

  • silent (default: 2||Highest) - Level of returning message. 0 - no message. 1 - clip id(s) that was/were deleted. else no change.

  1. !edit <clip_id> <new_title> - edit the title of the given clip
!addcom !edit $(urlfetch https://streamsnip.com/edit/$(querystring)) -ul=moderator

⚠️ don't remove the -ul=moderator part, otherwise anyone can edit your clips.
image

  • silent (default: 2||Highest) - Level of returning message. 0 - no message. 1 - clip id that was edited. else no change.

  1. !clips or !export - gives link where you can see all the clips
!addcom !export $(urlfetch https://streamsnip.com/export)

image


  1. !search gives the last clip that had the query in in it.
 !addcom !search $(urlfetch https://streamsnip.com/search/$(querystring))

Args

level - (default: 0) - What level of answer you want. Here's a screenshot that showcase it. image


  1. !uptime gives uptime of the latest stream of the channel that called this command
 !addcom !uptime $(urlfetch https://streamsnip.com/uptime)

Args

level - (default: 0) - What level of answer you want. Here's a screenshot that showcase it.

image


  1. !recent gives last 5 clip details in chat. in format of | <clip_id> <description> |
 !addcom !recent $(urlfetch https://streamsnip.com/recent?count=$(1))

Args

count - (default: 5) - How many records you want.
image


  1. !clipstats gives a brief stats of number of clips in the chat. total and by the user who ran the command.
 !addcom !clipstats $(urlfetch https://streamsnip.com/nstats)

image


Super Advanced, Proceed with caution here

Click me to open advanced options.

Idea from here, You can combine !search command to give out timestamp to particular events in the stream
A combo can look like this

!addcom !clipkill $(urlfetch https://streamsnip.com/clip/$(chatid)/kill-automated)
!addcom !lastkill $(urlfetch https://streamsnip.com/search/kill-automated)

Want more advanced ? here
There is one more endpoint named /searchx/<clip-desc> that returns JSON of the clip with that clip-desc.
THIS IS JUST 1 EXAMPLE. SKY IS THE LIMIT HERE

!addcom !lastkilltime $(eval clip=$(urlfetch json https://streamsnip.com/searchx/kill-automated); clip['hms'])

returning data looks something like this
carbon (3)

  1. !streaminfo this gives streaminfo in JSON format that you can use to do some other stuff. data looks something like this. carbon

    Route is at /stream_info

    !addcom !myid $(eval info=$(urlfetch json https://streamsnip.com/stream_info); info['author_id'])

Additional Customization:

You can use -ul=userlevel to limit clipping to specific user levels (e.g., mods). Find user levels here to reduce spam and grant clipping access to specific individuals.


About

make a way you can clip with a single nightbot command

https://streamsnip.com


Languages

Language:Python 62.3%Language:HTML 31.6%Language:CSS 6.1%