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 ;
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 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
{
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
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 ;
}
}