Skip to content

Commit

Permalink
Added aliases (#146)
Browse files Browse the repository at this point in the history
* Added aliases handlers

* Added aliases to alerts

* Added help message

* Added alerts templates

* Added templates for discord alerts

* Improved templates

* Fixed review issues

* Added new lines

* Removed a useless function

* Logged an error instead of returning

* Remove unused param in 'StartPubMessagingServer'.

* Removed spaces in one of the templates

* Returned an error

* Removed a useless argument

* Added a log

* Added tests for alert templates

* Add newlines.

* Add types for templates rendering.

* Used types for templates rendering in tests.

* Change a bit height alert '.md' template.

---------

Co-authored-by: Nikolay Eskov <[email protected]>
  • Loading branch information
esuwu and nickeskov authored Jan 27, 2023
1 parent 491eff6 commit a500244
Show file tree
Hide file tree
Showing 37 changed files with 981 additions and 176 deletions.
10 changes: 5 additions & 5 deletions cmd/bots/discord/discord.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ func runDiscordBot() error {
ctx, done := signal.NotifyContext(context.Background(), os.Interrupt)
defer done()

discordBotEnv, err := initial.InitDiscordBot(discordBotToken, discordChatID, zap)
pairRequest := make(chan pairResponses.RequestPair)
pairResponse := make(chan pairResponses.ResponsePair)

discordBotEnv, err := initial.InitDiscordBot(discordBotToken, discordChatID, zap, pairRequest, pairResponse)
if err != nil {
return errors.Wrap(err, "failed to init discord bot")
}

pairRequest := make(chan pairResponses.RequestPair)
pairResponse := make(chan pairResponses.ResponsePair)
handlers.InitDscHandlers(discordBotEnv, pairRequest, pairResponse)
handlers.InitDscHandlers(discordBotEnv, pairRequest, pairResponse, zap)

go func() {
err := pubsub.StartSubMessagingClient(ctx, nanomsgPubSubURL, discordBotEnv, zap)
Expand Down
Loading

0 comments on commit a500244

Please sign in to comment.