public void Execute(HelperBrain brain, string[] packet)
        {
            var request = new DiscordChannelMessageRequest();

            request.Read(packet);

            var globalRoom = Chat.Chat.StorageManager.Rooms[0];

            ChatClient.SendToRoom("j%" + globalRoom.Id + "@" + request.Username.Replace("#", "|") + "@" + request.Content + "@" +
                                  1 + "#", globalRoom);
        }
Exemple #2
0
        public static void Execute(DiscordClient client, string[] packet)
        {
            var sessionRequest = new SessionInitRequest();

            sessionRequest.Read(packet);
            var brain = new HelperBrain(client)
            {
                DiscordId = sessionRequest.DiscordId, DiscordName = sessionRequest.DiscordName
            };

            HelperBrain._instance = brain;
            var connectedSessions = World.StorageManager.GameSessions;
            List <ConnectedPlayer> playersConnected = new List <ConnectedPlayer>();

            foreach (var session in connectedSessions)
            {
                playersConnected.Add(new ConnectedPlayer(session.Value.Player.Id, session.Value.Player.GlobalId, session.Value.Player.Name));
            }

            HelperBrain.SendCommand(new InitializeSessionCommand(playersConnected));
            Console.WriteLine("BOT [Helper] successfully connected");
        }
Exemple #3
0
 public void Execute(HelperBrain brain, string[] packet)
 {
     SqlDatabaseManager.ConnectionString       = "";
     SqlDatabaseManager.GlobalConnectionString = "";
 }
 public void Execute(HelperBrain brain, string[] packet)
 {
     Global.Close();
 }
Exemple #5
0
 public void Execute(HelperBrain brain, string[] packet)
 {
     HelperBrain.SendCommand(new PongCommand());
 }