forked from adam/discord-bot-shtik
more shtikbot error handling
This commit is contained in:
parent
8fa439b232
commit
32242c9cb4
@ -23,6 +23,8 @@ namespace silverworker_discord
|
|||||||
ytdl.FFmpegPath = "ffmpeg";
|
ytdl.FFmpegPath = "ffmpeg";
|
||||||
ytdl.OutputFolder = "";
|
ytdl.OutputFolder = "";
|
||||||
ytdl.OutputFileTemplate = "tiktokbad.%(ext)s";
|
ytdl.OutputFileTemplate = "tiktokbad.%(ext)s";
|
||||||
|
try
|
||||||
|
{
|
||||||
var res = await ytdl.RunVideoDownload(link.ToString());
|
var res = await ytdl.RunVideoDownload(link.ToString());
|
||||||
if (!res.Success)
|
if (!res.Success)
|
||||||
{
|
{
|
||||||
@ -52,6 +54,12 @@ namespace silverworker_discord
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Console.Error.WriteLine(e);
|
||||||
|
await message.AddReactionAsync(Emote.Parse("<:problemon:859453047141957643>"));
|
||||||
|
}
|
||||||
|
}
|
||||||
public static async void deheic(SocketUserMessage message, Attachment att)
|
public static async void deheic(SocketUserMessage message, Attachment att)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
Loading…
Reference in New Issue
Block a user