Created
January 14, 2019 12:53
-
-
Save simontime/7c1f81bfec7bc6b45f2f5662c412ed94 to your computer and use it in GitHub Desktop.
Sex-B-Gone Discord Bot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using DSharpPlus; | |
using System.Threading.Tasks; | |
using System.Text.RegularExpressions; | |
using System; | |
using System.IO; | |
class Program { | |
static DiscordClient Client = new DiscordClient( | |
new DiscordConfiguration { Token = File.ReadAllText("token.txt") }); | |
static void Main() => Bot().GetAwaiter().GetResult(); | |
static async Task Bot() { | |
Client.MessageCreated += Yeet; | |
await Client.ConnectAsync(); | |
Console.WriteLine("Nut detectors on"); | |
await Task.Delay(-1); | |
} | |
static async Task Yeet(DSharpPlus.EventArgs.MessageCreateEventArgs e) { | |
if (Regex.IsMatch(e.Message.Content, "(?i)sex dating") || | |
Regex.IsMatch(e.Message.Content, "(?i)sexdating")) { | |
await e.Message.DeleteAsync(); | |
await e.Channel.SendMessageAsync($"Lol goodbye sex bot xd"); | |
Console.WriteLine("Yeeted a sex bot in {0} lmao", e.Guild.Name); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment