Compare commits
No commits in common. "26dcd962b8741519c62954fcdfb8028ace9d3196" and "38d0539a5fa87fad5ace6c77f938339a67381e67" have entirely different histories.
26dcd962b8
...
38d0539a5f
32
.drone.yml
32
.drone.yml
@ -1,30 +1,24 @@
|
|||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: publish-bot
|
name: build-app
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build-dotnet
|
- name: build-dotnet
|
||||||
image: mcr.microsoft.com/dotnet/sdk:6.0
|
image: mcr.microsoft.com/dotnet/sdk:6.0
|
||||||
commands:
|
commands:
|
||||||
- dotnet publish
|
- dotnet build
|
||||||
|
|
||||||
- name: build-image
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
registry: git.kizaing.ca
|
|
||||||
username:
|
|
||||||
from_secret: DOCKER_USER
|
|
||||||
password:
|
|
||||||
from_secret: DOCKER_PASS
|
|
||||||
repo: git.kizaing.ca/kizaing/TeleTok
|
|
||||||
tags: latest
|
|
||||||
platform: linux/amd64,linux/arm64
|
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build-docker
|
||||||
|
image: docker:dind
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
|
||||||
# Commented out until stuff actually works
|
# Commented out until stuff actually works
|
||||||
trigger:
|
#trigger:
|
||||||
branch:
|
# branch:
|
||||||
- main
|
# - main
|
||||||
event:
|
# event:
|
||||||
- push
|
# - push
|
@ -2,6 +2,10 @@ FROM mcr.microsoft.com/dotnet/runtime:6.0-alpine3
|
|||||||
|
|
||||||
WORKDIR /app/teletok
|
WORKDIR /app/teletok
|
||||||
|
|
||||||
COPY bin/Debug/net6.0/publish/* /app/teletok/
|
RUN apk update && apk add --update nodejs nodejs-npm
|
||||||
|
|
||||||
|
RUN npm i -g tiktok-scraper
|
||||||
|
|
||||||
|
COPY bin/Debug/net6.0/* /app/teletok/
|
||||||
|
|
||||||
CMD [ "TeleTok" ]
|
CMD [ "TeleTok" ]
|
@ -55,22 +55,15 @@ namespace TeleTok
|
|||||||
// Passes the url along to the video downloader if it is valid AND a tiktok link
|
// Passes the url along to the video downloader if it is valid AND a tiktok link
|
||||||
if (isUri)
|
if (isUri)
|
||||||
{
|
{
|
||||||
try
|
if(messageText.Contains("tiktok.com"))
|
||||||
{
|
{
|
||||||
if(messageText.Contains("tiktok.com"))
|
proxyUrl = VidDownload.TikTokURL(messageText);
|
||||||
{
|
|
||||||
proxyUrl = VidDownload.TikTokURL(messageText);
|
|
||||||
|
|
||||||
Message ttVideo = await botClient.SendVideoAsync(
|
Message ttVideo = await botClient.SendVideoAsync(
|
||||||
chatId: chatId,
|
chatId: chatId,
|
||||||
video: proxyUrl,
|
video: proxyUrl,
|
||||||
cancellationToken: cancellationToken
|
cancellationToken: cancellationToken
|
||||||
);
|
);
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
Console.WriteLine("Valid TikTok URI was sent, but was not a video!");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user