new feature: pulse check. also, assets folder
This commit is contained in:
parent
589d27434e
commit
d90123a56d
16
Features.cs
16
Features.cs
@ -18,6 +18,12 @@ namespace silverworker_discord
|
|||||||
public static Random r = new Random();
|
public static Random r = new Random();
|
||||||
public static async void detiktokify(Uri link, SocketUserMessage message)
|
public static async void detiktokify(Uri link, SocketUserMessage message)
|
||||||
{
|
{
|
||||||
|
//yes, even if there is a problem later.
|
||||||
|
#pragma warning disable 4014
|
||||||
|
message.AddReactionAsync(Emote.Parse("<:tiktok:1070038619584200884>"));
|
||||||
|
#pragma warning restore 4014
|
||||||
|
|
||||||
|
|
||||||
var ytdl = new YoutubeDLSharp.YoutubeDL();
|
var ytdl = new YoutubeDLSharp.YoutubeDL();
|
||||||
ytdl.YoutubeDLPath = "yt-dlp";
|
ytdl.YoutubeDLPath = "yt-dlp";
|
||||||
ytdl.FFmpegPath = "ffmpeg";
|
ytdl.FFmpegPath = "ffmpeg";
|
||||||
@ -147,7 +153,7 @@ namespace silverworker_discord
|
|||||||
}
|
}
|
||||||
public static async void Joke(SocketUserMessage message)
|
public static async void Joke(SocketUserMessage message)
|
||||||
{
|
{
|
||||||
var jokes = File.ReadAllLines("jokes.txt");
|
var jokes = File.ReadAllLines("assets/jokes.txt");
|
||||||
jokes = jokes.Where(l => !string.IsNullOrWhiteSpace(l))?.ToArray();
|
jokes = jokes.Where(l => !string.IsNullOrWhiteSpace(l))?.ToArray();
|
||||||
if(jokes?.Length == 0){
|
if(jokes?.Length == 0){
|
||||||
await message.Channel.SendMessageAsync("I don't know any. Adam!");
|
await message.Channel.SendMessageAsync("I don't know any. Adam!");
|
||||||
@ -183,13 +189,13 @@ namespace silverworker_discord
|
|||||||
{
|
{
|
||||||
switch (r.Next(5))
|
switch (r.Next(5))
|
||||||
{
|
{
|
||||||
case 0:
|
default:
|
||||||
await message.Channel.SendFileAsync("./coding and algorithms.png", "i am actually niether neural-net processor nor a learning computer. but I do use **coding** and **algorithms**.");
|
await message.Channel.SendFileAsync("assets/coding and algorithms.png", "i am actually niether neural-net processor nor a learning computer. but I do use **coding** and **algorithms**.");
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 4:
|
||||||
await message.AddReactionAsync(new Emoji("\U0001F644")); //eye roll emoji
|
await message.AddReactionAsync(new Emoji("\U0001F644")); //eye roll emoji
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 5:
|
||||||
await message.AddReactionAsync(new Emoji("\U0001F611")); //emotionless face
|
await message.AddReactionAsync(new Emoji("\U0001F611")); //emotionless face
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
0
Jenkinsfile
vendored
Normal file
0
Jenkinsfile
vendored
Normal file
@ -204,6 +204,10 @@ namespace silverworker_discord
|
|||||||
{
|
{
|
||||||
Features.Joke(message);
|
Features.Joke(message);
|
||||||
}
|
}
|
||||||
|
if (Regex.IsMatch(msgText, "!pulse ?check\\b"))
|
||||||
|
{
|
||||||
|
message.Channel.SendFileAsync("assets/ekgblip.png");
|
||||||
|
}
|
||||||
if (msgText.Contains("cognitive dissonance") == true)
|
if (msgText.Contains("cognitive dissonance") == true)
|
||||||
{
|
{
|
||||||
message.ReplyAsync("that's not what cognitive dissonance means. Did you mean \"hypocrisy\"?");
|
message.ReplyAsync("that's not what cognitive dissonance means. Did you mean \"hypocrisy\"?");
|
||||||
|
Before Width: | Height: | Size: 293 KiB After Width: | Height: | Size: 293 KiB |
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 107 KiB |
BIN
assets/ekgblip.png
Normal file
BIN
assets/ekgblip.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
@ -19,10 +19,10 @@
|
|||||||
<None Update="AppSettings.json">
|
<None Update="AppSettings.json">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Update="jokes.txt">
|
<None Update="assets/jokes.txt">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Update="coding and algorithms.png">
|
<None Update="assets/coding and algorithms.png">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
Reference in New Issue
Block a user