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); }
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"); }
public void Execute(HelperBrain brain, string[] packet) { SqlDatabaseManager.ConnectionString = ""; SqlDatabaseManager.GlobalConnectionString = ""; }
public void Execute(HelperBrain brain, string[] packet) { Global.Close(); }
public void Execute(HelperBrain brain, string[] packet) { HelperBrain.SendCommand(new PongCommand()); }