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 Newtonsoft.Json;
|
|
|
|
using vassago.Models;
|
2023-07-04 13:31:19 -04:00
|
|
|
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 GeneralSnarkCloudNative : Behavior
|
|
|
|
{
|
|
|
|
public override string Name => "general snarkiness: cloud native";
|
|
|
|
|
|
|
|
public override string Trigger => "certain tech buzzwords that no human uses in normal conversation";
|
2023-06-19 11:03:06 -04:00
|
|
|
public override bool ShouldAct(Message message)
|
2023-06-19 01:14:04 -04:00
|
|
|
{
|
2024-01-05 21:39:31 -05:00
|
|
|
if(Behaver.Instance.IsSelf(message.Author.Id))
|
2023-06-20 21:26:44 -04:00
|
|
|
return false;
|
2023-07-04 13:31:19 -04:00
|
|
|
|
2023-11-30 12:50:51 -05:00
|
|
|
if(message.Channel.EffectivePermissions.ReactionsPossible)
|
2023-07-04 13:31:19 -04:00
|
|
|
return false;
|
|
|
|
|
|
|
|
if((MeannessFilterLevel)message.Channel.EffectivePermissions.MeannessFilterLevel < MeannessFilterLevel.Medium)
|
|
|
|
return false;
|
|
|
|
|
2023-06-19 01:14:04 -04:00
|
|
|
return Regex.IsMatch(message.Content, "\\bcloud( |-)?native\\b", RegexOptions.IgnoreCase) ||
|
|
|
|
Regex.IsMatch(message.Content, "\\benterprise( |-)?(level|solution)\\b", 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
|
|
|
{
|
|
|
|
switch (Shared.r.Next(2))
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
await message.React("\uD83E\uDD2E"); //vomit emoji
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
await message.React("\uD83C\uDDE7"); //B emoji
|
|
|
|
await message.React("\uD83C\uDDE6"); //A
|
|
|
|
await message.React("\uD83C\uDDF3"); //N
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|