public async Task AddCustomResponse(string onEvent, string message, ulong serverId) { var query = new GetResponseQuery(onEvent); var response = (await this._queryBus.ExecuteAsync(query)).Response; var addResponse = new Response(onEvent, message, serverId, response.AvailableVariables); var command = new AddResponseCommand(addResponse); await this._commandBus.ExecuteAsync(command); }
public async Task <Response> GetResponseByOnEvent(string onEvent, ulong serverId = 0) { var query = new GetResponseQuery(onEvent, serverId); var queryResult = await this._queryBus.ExecuteAsync(query); var response = queryResult.Response; return(response); }