(ixbots) add new class to configure a bot to simplify passing options around
This commit is contained in:
@@ -16,15 +16,9 @@
|
||||
|
||||
namespace ix
|
||||
{
|
||||
int64_t cobra_to_sentry_bot(const CobraConfig& config,
|
||||
const std::string& channel,
|
||||
const std::string& filter,
|
||||
const std::string& position,
|
||||
int64_t cobra_to_sentry_bot(const CobraBotConfig& config,
|
||||
SentryClient& sentryClient,
|
||||
bool verbose,
|
||||
bool enableHeartbeat,
|
||||
int heartBeatTimeout,
|
||||
int runtime)
|
||||
bool verbose)
|
||||
{
|
||||
CobraBot bot;
|
||||
bot.setOnBotMessageCallback([&sentryClient, &verbose](const Json::Value& msg,
|
||||
@@ -77,12 +71,6 @@ namespace ix
|
||||
});
|
||||
});
|
||||
|
||||
return bot.run(config,
|
||||
channel,
|
||||
filter,
|
||||
position,
|
||||
enableHeartbeat,
|
||||
heartBeatTimeout,
|
||||
runtime);
|
||||
return bot.run(config);
|
||||
}
|
||||
} // namespace ix
|
||||
|
||||
Reference in New Issue
Block a user