Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sichere ProgrammierungWe shipped guest play at 17:39 and deleted it at 18:35(21.09.2026 um 13:32 Uhr)
Sichere ProgrammierungBest MCP Servers 2026: 10 Worth Installing (Tested)(21.09.2026 um 13:42 Uhr)
Sichere ProgrammierungThe Resume Is Dying. What's Replacing It?(21.09.2026 um 13:44 Uhr)
Sichere Programmierung38 clamps, four probits, and one coefficient rounded to 15 digits(21.09.2026 um 13:46 Uhr)
Sichere ProgrammierungGmail deletes your SVG logo and Outlook ignores your flexbox(21.09.2026 um 13:47 Uhr)
Sichere Programmierung'2026-27' is a better database key than a date range(21.09.2026 um 13:49 Uhr)
Sichere ProgrammierungThe CoreDNS Black Hole: how one dead DNS pod broke our API gateway(21.09.2026 um 13:53 Uhr)
Sichere ProgrammierungWe shipped guest play at 17:39 and deleted it at 18:35(21.09.2026 um 13:32 Uhr)
Sichere ProgrammierungBest MCP Servers 2026: 10 Worth Installing (Tested)(21.09.2026 um 13:42 Uhr)
Sichere ProgrammierungThe Resume Is Dying. What's Replacing It?(21.09.2026 um 13:44 Uhr)
Sichere Programmierung38 clamps, four probits, and one coefficient rounded to 15 digits(21.09.2026 um 13:46 Uhr)
Sichere ProgrammierungGmail deletes your SVG logo and Outlook ignores your flexbox(21.09.2026 um 13:47 Uhr)
Sichere Programmierung'2026-27' is a better database key than a date range(21.09.2026 um 13:49 Uhr)
Sichere ProgrammierungThe CoreDNS Black Hole: how one dead DNS pod broke our API gateway(21.09.2026 um 13:53 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

How lazy I was to study discordgo and I wrote my own library

So, as it was said in the title, I was too lazy to study discordgo for developing a bot on go. Why? Well.. I just sat down to study go and didn't have a clear idea of what and how, so I decided not to go into the library from 15 years ago,…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!

So, as it was said in the title, I was too lazy to study discordgo for developing a bot on go. Why? Well.. I just sat down to study go and didn't have a clear idea of what and how, so I decided not to go into the library from 15 years ago, which clearly has a lot of legacy code.



The link: https://github.com/IIIoooRRR/G4D



Instead, I decided to write my own project for small bots. However, I didn't know exactly how to do this. I started studying the in-depth documentation of discord - oops! The structure of the network core was gradually drawn by itself.



Everything was originally based on parsing through map[string]struct{}, at that time I didn't even know about the existence of the basic encoder, sonic, zap, and the like



Then I accidentally deleted (after about half a month, a month) all the commits of the repository. The token turned out to be a problem there, which resulted in the network, and that's how it turned out.



Over time, I began to understand: I like the development of this library, I can't do without it, periodically I come back to it in bursts, I try something and forget again for a week or two.



What have I been able to do in these 4 months?



Here is a short list:




  1. Lock free structure. There are almost never mutexes. I tried to change everything to atomics and work with them. Soon I wanted to rewrite the api package for rw mutexes, since it went to fanaticism and one uncritical problem appeared.

  2. DI structure. Literally, today's commit solved my previous problem - I did everything through singletons (I tried to do it), and now I'm transferring everything, if not already, to the di architecture.

  3. cli and yaml are supported in the library. There are several yaml examples in the repository itself, while the cli is still used to initialize the project. It builds the project structure that I used to work with my bot.

  4. Partial modularity. It's easy to rewrite everything except the network core and the basic structure of the bot. I tried to divide the project itself into atomic particles. I'm sorry, I'm a former Javist.

  5. Clear typing. I tried to make sure that the fields could not be confused when interacting with the fields of the discord api.



In general, that's all I could tell you about the library. I tried to save and do everything without the divine structures, I like easy and convenient work with libraries, but I'm bad at writing documentation. The main examples are described in the readme, and I also tried to document the code as I wrote the project.

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How lazy I was to study discordgo and I wrote my own library

Thematisch verwandte Begriffe: lazy, study, discordgo, wrote · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-94040 | A flaw has been found in vas3k TaxHacker up to 0.8.5. Affected by this v…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick