i fucking hate git

This commit is contained in:
lolcat 2024-03-31 02:01:54 +00:00
parent 7bb22325fa
commit bd24f30de9
1 changed files with 10 additions and 1 deletions

View File

@ -408,7 +408,7 @@ deek.on("message", async function(msg, user){
try{
if(tweet = link.match(/https?:\/\/(?:www\.)?twitter\.com\/[A-Za-z0-9_]+\/status\/([0-9]+)/)){
if(tweet = link.match(/https?:\/\/(?:www\.)?twitter\.com\/[A-Za-z0-9_]+\/status\/([0-9]+)/i)){
tweet = tweet[1];
var res = await fetch("https://cdn.syndication.twimg.com/tweet-result?id=" + tweet + "&token=2rkokdcv41v");
@ -417,6 +417,15 @@ deek.on("message", async function(msg, user){
var title = json.user.name + " (@" + json.user.screen_name + ") " + " on twatter";
var description = json.text;
}else if(watch = link.match(/(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]{11})/i)){
watch = watch[1];
var res = await fetch("https://youtube.com/oembed?url=/watch?v=" + watch);
var json = await res.json();
var title = json.title;
var description = "By " + json.author_name;
}else{
var res = await fetch(