mchangrh / sb-slash Goto Github PK
View Code? Open in Web Editor NEWSponsorblock with discord slash commands
Home Page: https://sb-slash.mchang.workers.dev/invite
License: GNU General Public License v3.0
Sponsorblock with discord slash commands
Home Page: https://sb-slash.mchang.workers.dev/invite
License: GNU General Public License v3.0
see how much skips + time saved on video
convert all strictly youtube links to sb.ltn.fi links & remove any additional parameters for a message
As suggested by caneleex
reason being
username | provided reason
add loadAvg to /status
awaiting merge to master and server update
I used /shareunsubmitted and it generated this URL:
When this link is pasted into a discord channel, notice the white un-linked ] on the end:
Without that bracket, clicking the link doesn't correctly load the segment. This can be resolved in general without damaging the URL by appending an ampersand:
So the bot should probably automatically add the & so that when it's pasted in discord it works correctly when clicked. It's easy to miss the white ]
Demo here: https://discord.com/channels/603643120093233162/603643205552177155/1014877479548227614
commands
downstream
Similar to suppressor but support live editing of repeated phrases and images
from cane
format unsubmitted segments from debug
uploaded through discord cfkv
add skipSegments endpoint but search byHash to catch nginx cache
logging
username#discriminator
downvote/undovote | UUID
example:
blabdude#9793
downvote |8..6
being able to lookup users to ping them in discord instead of issuing a warning would be more useful.
if 0 segments, return 0% instead of NaN%
Whenever a user runs the /userid command a list of userids appear. I think it would help add to functionality if these ids were also hyperlinks.
I'm trying to use the bot, but it doesn't give me commands to use
Since I can't send messages of type body.type == InteractionType.APPLICATION_COMMAND
for some reason, the bot completely ignores me when I try to use commands.
The issue starts at the bottom of this code
// Process a Discord interaction POST request
const handleInteraction = async ({ request, wait }) => {
// Get the body as a buffer and as text
const bodyBuffer = await request.arrayBuffer();
const bodyText = (new TextDecoder("utf-8")).decode(bodyBuffer);
// Verify a legitimate request
if (!handleInteractionVerification(request, bodyBuffer))
return new Response(null, { status: 401 });
// Work with JSON body going forward
const body = JSON.parse(bodyText);
// Handle a PING
if (body.type === InteractionType.PING)
return jsonResponse({
type: InteractionResponseType.PONG
});
try {
if (body.type == InteractionType.APPLICATION_COMMAND) { // handle commands
Looks like the current implementation of the Lookup Segments
message-command uses getSkipSegments()
, which returns a random non-ignored segment in case of overlapping segments with the same category (basically the same as the extension).
I think using getSearchSegments()
instead to show all segment versions would prove useful in situations like requests in the #incorrect-submissions
channel, where there may be multiple versions of the same segment, some incorrect.
The implementation could just be copied from commands/searchsegments.js
Invoking the /me slash command in the bot's private messages throws "error: TypeError: Cannot read properties of undefined (reading 'user')"
This is most likely due to src/commands/me.js, line 68 using interaction.member.user
instead of simply interaction.user
. The member parameter is not present when the interaction is invoked from a private message due to it not being in a server/guild.
Private reference link
https://discord.com/channels/603643120093233162/737501773358694431/899810915535433748
#requiredSegment=UUID
it also seems like you cannot reassign your public id, is this intended?
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.