コード例 #1
0
ファイル: ModCommander.cs プロジェクト: destinygg/bot
 public ModCommander(Message message, IEnumerable<Message> context, MessageProcessor messageProcessor)
 {
     _message = message;
       _context = context;
       _messageProcessor = messageProcessor;
       _compiledRegex = messageProcessor.CompiledRegex;
       LoadCommandDictionary();
 }
コード例 #2
0
ファイル: Banner.cs プロジェクト: destinygg/bot
 public Banner(Message input, MessageProcessor messageProcessor, List<Message> context = null)
 {
     _messageProcessor = messageProcessor;
       _message = input;
       //_text = StringTools.RemoveDiacritics(input.Text); //todo use this somehow.
       _text = input.SanitizedText;
       _originalText = input.OriginalText;
       if (context != null)
     _context = context;
 }
コード例 #3
0
ファイル: Commander.cs プロジェクト: destinygg/bot
 public Commander(Message message, MessageProcessor messageProcessor)
 {
     _message = message;
       _text = message.SanitizedText.Substring(1);
       _messageProcessor = messageProcessor;
       _commandDictionary = new Dictionary<List<string>, Func<string>> {
       { new List<string> { "playlist" },
     () => "Playlist at last.fm/user/StevenBonnellII" },
       { new List<string> { "rules", "unmoddharma" },
     () => "github.com/destinygg/bot" },
       { new List<string> { "refer", "sponsor" },
     () => "destiny.gg/amazon ☜(゚ヮ゚☜) Amazon referral ☜(⌒▽⌒)☞ 25$ off Sprint network (☞゚ヮ゚)☞ destiny.gg/ting" },
       { new List<string> { "irc" },
     () => "IRC will be implemented Soon™. For now, chat is echoed to Rizon IRC at qchat.rizon.net/?channels=#destinyecho . Forwarding of IRC chat to Destiny.gg Chat is available" },
       { new List<string> { "time" },
     () =>
       $"{TimeZoneInfo.ConvertTimeBySystemTimeZoneId(DateTime.UtcNow, Settings.Timezone).ToShortTimeString()} Central Steven Time"
       },
       { new List<string> { "live" },
     () => Tools.LiveStatus() },
       { new List<string> { "blog", "blag" },
     () => Tools.FallibleCode(Blog) },
       { new List<string> { "starcraft", "sc" },
     () => Tools.FallibleCode(Starcraft) },
       { new List<string> { "song" },
     () => Tools.FallibleCode(Song) },
       { new List<string> { "pastsong", "lastsong", "previoussong", "earliersong" },
     () => Tools.FallibleCode(EarlierSong) },
       { new List<string> { "twitter", "tweet", "twatter" },
     () => Tools.FallibleCode(() => Twitter("OmniDestiny")) },
       { new List<string> { "youtube", "yt" },
     () => Tools.FallibleCode(Youtube) },
       { new List<string> { "strim", "stream", "overrustle" },
     () => Tools.FallibleCode(Overrustle) },
       { new List<string> { "randomaslan", "randomcat", "cat" },
     () => Tools.FallibleCode(RandomAslan) },
       { new List<string> { "aslan" },
     () => Twitter("AslanVondran") },
       };
 }
コード例 #4
0
ファイル: Nuke.cs プロジェクト: mikehrod2016/bot
 public Nuke(Regex regex, TimeSpan duration, IEnumerable <Message> context, MessageProcessor messageProcessor)
 {
     _messageProcessor = messageProcessor;
     Regex             = regex;
     Load(duration, context);
 }
コード例 #5
0
ファイル: Nuke.cs プロジェクト: mikehrod2016/bot
 public Nuke(string word, TimeSpan duration, IEnumerable <Message> context, MessageProcessor messageProcessor)
 {
     _messageProcessor = messageProcessor;
     Word = word;
     Load(duration, context);
 }
コード例 #6
0
ファイル: Commander.cs プロジェクト: mikehrod2016/bot
 public Commander(Message message, MessageProcessor messageProcessor)
 {
     _message           = message;
     _text              = message.SanitizedText.Substring(1);
     _messageProcessor  = messageProcessor;
     _commandDictionary = new Dictionary <List <string>, Func <string> > {
         { new List <string> {
               "playlist"
           },
           () => "Playlist at last.fm/user/StevenBonnellII" },
         { new List <string> {
               "rules", "unmoddharma"
           },
           () => "github.com/destinygg/bot" },
         { new List <string> {
               "refer", "sponsor"
           },
           () => "destiny.gg/amazon ☜(゚ヮ゚☜) Amazon referral ☜(⌒▽⌒)☞ 25$ off Sprint network (☞゚ヮ゚)☞ destiny.gg/ting" },
         { new List <string> {
               "irc"
           },
           () => "IRC will be implemented Soon™. For now, chat is echoed to Rizon IRC at qchat.rizon.net/?channels=#destinyecho . Forwarding of IRC chat to Destiny.gg Chat is available" },
         { new List <string> {
               "time"
           },
           () =>
           $"{TimeZoneInfo.ConvertTimeBySystemTimeZoneId(DateTime.UtcNow, Settings.Timezone).ToShortTimeString()} Central Steven Time" },
         { new List <string> {
               "live"
           },
           () => Tools.LiveStatus() },
         { new List <string> {
               "blog", "blag"
           },
           () => Tools.FallibleCode(Blog) },
         { new List <string> {
               "starcraft", "sc"
           },
           () => Tools.FallibleCode(Starcraft) },
         { new List <string> {
               "song"
           },
           () => Tools.FallibleCode(Song) },
         { new List <string> {
               "pastsong", "lastsong", "previoussong", "earliersong"
           },
           () => Tools.FallibleCode(EarlierSong) },
         { new List <string> {
               "twitter", "tweet", "twatter"
           },
           () => Tools.FallibleCode(() => Twitter("OmniDestiny")) },
         { new List <string> {
               "youtube", "yt"
           },
           () => Tools.FallibleCode(Youtube) },
         { new List <string> {
               "strim", "stream", "overrustle"
           },
           () => Tools.FallibleCode(Overrustle) },
         { new List <string> {
               "randomaslan", "randomcat", "cat"
           },
           () => Tools.FallibleCode(RandomAslan) },
         { new List <string> {
               "aslan"
           },
           () => Twitter("AslanVondran") },
     };
 }
コード例 #7
0
ファイル: Nuke.cs プロジェクト: destinygg/bot
 public Nuke(Regex regex, TimeSpan duration, IEnumerable<Message> context, MessageProcessor messageProcessor) {
   _messageProcessor = messageProcessor;
   Regex = regex;
   Load(duration, context);
 }
コード例 #8
0
ファイル: Nuke.cs プロジェクト: destinygg/bot
 public Nuke(string word, TimeSpan duration, IEnumerable<Message> context, MessageProcessor messageProcessor) {
   _messageProcessor = messageProcessor;
   Word = word;
   Load(duration, context);
 }
コード例 #9
0
ファイル: AntiNuke.cs プロジェクト: mikehrod2016/bot
 public AntiNuke(MessageProcessor messageProcessor)
 {
     _messageProcessor = messageProcessor;
 }
コード例 #10
0
ファイル: PrimaryLogic.cs プロジェクト: destinygg/bot
 public PrimaryLogic(IClientVisitor client)
 {
     _client = client;
       _messageProcessor = new MessageProcessor(_client);
 }
コード例 #11
0
ファイル: AntiNuke.cs プロジェクト: destinygg/bot
 public AntiNuke(MessageProcessor messageProcessor) {
   _messageProcessor = messageProcessor;
 }