<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/bot-that-optimizes-engagement-zb6vhmc8d" -->

---
title: Bot That Optimizes Engagement | daily.dev
description: A live coding session implementing a naive Bayes classifier to optimize a Discord chatbot's engagement. The bot's "grok" command currently returns random...
canonical: https://daily.dev/posts/bot-that-optimizes-engagement-zb6vhmc8d
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Bot That Optimizes Engagement | daily.dev
og:description: A live coding session implementing a naive Bayes classifier to optimize a Discord chatbot's engagement. The bot's "grok" command currently returns random...
og:url: https://daily.dev/posts/bot-that-optimizes-engagement-zb6vhmc8d
og:image: https://api.daily.dev/og/posts/Zb6VhmC8D.png
og:image:alt: Bot That Optimizes Engagement
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Bot That Optimizes Engagement

**[Tsoding Daily](https://daily.dev/sources/tsoding_daily)** · 189 min read · 0 upvotes · 0 comments

## Summary

A live coding session implementing a naive Bayes classifier to optimize a Discord chatbot's engagement. The bot's "grok" command currently returns random yes/no responses, but the goal is to make it learn from user reactions by tracking which responses generate more engagement. The session covers parsing CSV logs, handling timestamps in Go, setting up PostgreSQL infrastructure, and preparing training data by pairing messages with yes/no responses based on time deltas.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=zwaT9myowuU>

## Similar posts on daily.dev

- [A Guide to Grok Bot 2026](https://daily.dev/posts/a-guide-to-grok-bot-2026-c5bednlv4) · Medium · 0 upvotes · 0 comments

---

Tags: [#machine-learning](https://daily.dev/tags/machine-learning), [#golang](https://daily.dev/tags/golang), [#postgresql](https://daily.dev/tags/postgresql), [#bots](https://daily.dev/tags/bots), [#discord](https://daily.dev/tags/discord)

[View this post on daily.dev](https://daily.dev/posts/bot-that-optimizes-engagement-zb6vhmc8d)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Bot That Optimizes Engagement","url":"https://daily.dev/posts/bot-that-optimizes-engagement-zb6vhmc8d","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/bot-that-optimizes-engagement-zb6vhmc8d"},"datePublished":"2026-02-17T12:03:53.819Z","dateModified":"2026-02-17T12:04:14.213Z","description":"A live coding session implementing a naive Bayes classifier to optimize a Discord chatbot's engagement. The bot's \"grok\" command currently returns random...","image":"https://i.ytimg.com/vi/zwaT9myowuU/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/zwaT9myowuU/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Tsoding Daily","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Tsoding Daily","logo":"https://media.daily.dev/image/upload/s--6msWm9pp--/f_auto/v1728806157/logos/tsoding_daily","url":"https://daily.dev/sources/tsoding_daily"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/bot-that-optimizes-engagement-zb6vhmc8d","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"machine-learning,golang,postgresql,bots,discord","timeRequired":"PT189M","video":{"@type":"VideoObject","name":"Bot That Optimizes Engagement","description":"A live coding session implementing a naive Bayes classifier to optimize a Discord chatbot's engagement. The bot's \"grok\" command currently returns random...","thumbnailUrl":"https://i.ytimg.com/vi/zwaT9myowuU/sddefault.jpg","uploadDate":"2026-02-17T12:03:53.819Z","duration":"PT189M","url":"https://api.daily.dev/r/Zb6VhmC8D","embedUrl":"https://www.youtube.com/embed/zwaT9myowuU"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Tsoding Daily","item":"https://daily.dev/sources/tsoding_daily"},{"@type":"ListItem","position":3,"name":"Bot That Optimizes Engagement"}]}
```

