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/WishLuck.cs
adam 7c7793f3b2 send message works!
...messages aren't getting stored, though.
2025-05-29 13:09:57 -04:00

34 lines
852 B
C#

namespace vassago.Behavior;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using vassago.Models;
[StaticPlz]
public class WishLuck : Behavior
{
public override string Name => "wish me luck";
public override string Trigger => "wish me luck";
public override string Description => "wishes you luck";
public override async Task<bool> ActOn(Message message)
{
var toSend = "☘️";
if (Shared.r.Next(20) == 0)
{
toSend = "\U0001f340";//4-leaf clover
}
if(message.Channel.EffectivePermissions.ReactionsPossible == true)
Behaver.Instance.React(message.Id, toSend);
else
Behaver.Instance.SendMessage(message.Channel.Id, toSend);
return true;
}
}