This repository has been archived on 2023-06-01. You can view files and clone it, but cannot push or open issues or pull requests.
discord-bot-shtik/Behavior/GeneralSnarkPlaying.cs

38 lines
1.3 KiB
C#
Raw Normal View History

2023-06-19 01:14:04 -04:00
namespace vassago.Behavior;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using vassago.Models;
using static vassago.Models.Enumerations;
2023-06-19 01:14:04 -04:00
2023-06-20 21:26:44 -04:00
[StaticPlz]
2023-06-19 01:14:04 -04:00
public class GeneralSnarkPlaying : Behavior
{
public override string Name => "playin Snarkiness";
public override string Trigger => "he thinks i'm playin";
public override string Description => "I didn't think you were playing, but now I do";
2023-06-19 11:03:06 -04:00
public override bool ShouldAct(Message message)
2023-06-19 01:14:04 -04:00
{
if(Behaver.Instance.IsSelf(message.Author.Id))
2023-06-20 21:26:44 -04:00
return false;
if((MeannessFilterLevel)message.Channel.EffectivePermissions.MeannessFilterLevel < MeannessFilterLevel.Medium ||
(LewdnessFilterLevel)message.Channel.EffectivePermissions.LewdnessFilterLevel < LewdnessFilterLevel.Moderate)
return false;
2023-06-19 01:14:04 -04:00
return Regex.IsMatch(message.Content, "^(s?he|(yo)?u|y'?all|they) thinks? i'?m (playin|jokin|kiddin)g?$", RegexOptions.IgnoreCase);
}
2023-06-19 11:03:06 -04:00
public override async Task<bool> ActOn(Message message)
2023-06-19 01:14:04 -04:00
{
await message.Channel.SendMessage("I believed you for a second, but then you assured me you's a \uD83C\uDDE7 \uD83C\uDDEE \uD83C\uDDF9 \uD83C\uDDE8 \uD83C\uDDED");
return true;
}
}