forked from adam/discord-bot-shtik
mock mee6
This commit is contained in:
parent
5cf4e87e06
commit
fcf7d11715
19
Features.cs
19
Features.cs
@ -2,6 +2,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Discord;
|
using Discord;
|
||||||
@ -83,6 +84,24 @@ namespace silverworker_discord
|
|||||||
Console.Error.WriteLine(JsonConvert.SerializeObject(e, Formatting.Indented));
|
Console.Error.WriteLine(JsonConvert.SerializeObject(e, Formatting.Indented));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static async void mock(string contentWithoutMention, SocketUserMessage message)
|
||||||
|
{
|
||||||
|
var toPost = new StringBuilder();
|
||||||
|
for (int i = 0; i < contentWithoutMention.Length; i++)
|
||||||
|
{
|
||||||
|
if (i % 2 == 0)
|
||||||
|
{
|
||||||
|
toPost.Append(contentWithoutMention[i].ToString().ToUpper());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
toPost.Append(contentWithoutMention[i].ToString().ToLower());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await message.ReplyAsync(toPost.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
public static async void qrify(string qrContent, SocketUserMessage message)
|
public static async void qrify(string qrContent, SocketUserMessage message)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"qring: {qrContent}");
|
Console.WriteLine($"qring: {qrContent}");
|
||||||
|
12
Program.cs
12
Program.cs
@ -40,7 +40,7 @@ namespace silverworker_discord
|
|||||||
{
|
{
|
||||||
if (currentProc.ProcessName == process.ProcessName && currentProc.Id != process.Id)
|
if (currentProc.ProcessName == process.ProcessName && currentProc.Id != process.Id)
|
||||||
{
|
{
|
||||||
Console.Error.WriteLine($"Another instance of this process is already running: {process.Id}");
|
Console.Error.WriteLine($"{DateTime.Now} - Another instance of this process is already running: {process.Id}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -77,6 +77,16 @@ namespace silverworker_discord
|
|||||||
|
|
||||||
if (message.Author.IsWebhook || message.Author.IsBot)
|
if (message.Author.IsWebhook || message.Author.IsBot)
|
||||||
{
|
{
|
||||||
|
if(message.Author.Id == 159985870458322944) //MEE6
|
||||||
|
{
|
||||||
|
var contentWithoutMnetion = Regex.Replace(message.Content, "<[^>]*>", "");
|
||||||
|
if(contentWithoutMnetion.Contains("you just advanced"))
|
||||||
|
{
|
||||||
|
var newText = Regex.Replace(message.Content, "<[^>]*>", message.Author.Username);
|
||||||
|
newText = Regex.Replace(message.Content, "level [\\d]+", "level -1");
|
||||||
|
Features.mock(newText, message);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user