Esempio n. 1
0
 public AntiSpamCommand(string name, string description, string example, CommandType type, Bot bot, Func<ReceivedMessage, bool> condition, Action<ReceivedMessage> response, SpamCounter.SpamType spamCounterType, Action<ReceivedMessage> antiSpamResponse, bool canBeMuted = true)
 {
     this.Name = name;
     this.Description = description;
     this.Example = example;
     this.Type = type;
     this.Bot = bot;
     this.Condition = condition;
     this.Response = response;
     this.CanBeMuted = canBeMuted;
     this.SpamCounterType = spamCounterType;
     this.AntiSpamResponse = antiSpamResponse;
 }
Esempio n. 2
0
 public void IncreaseAntiSpamCounter(SpamCounter counter)
 {
     counter.Counter++;
     TimerHelper.ExecuteDelayedActionAsync(() =>
     {
         counter.Counter--;
     }, new TimeSpan(0, 5, 0));
 }