You are browsing as a guest. Sign up (or log in) to start making projects!

musty

@musty

Joined May 31st, 2026

  • 1Devlogs
  • 3Projects
  • 0Ships
  • 0Votes
generational larp
Open comments for this post

2h 50m 46s logged

Verbosity Devlog #1: The Foundation Was Fine. The Ground Wasn’t.

websocket closed unexpectedly
websocket: close 4017: E2EE/DAVE protocol required

That’s the line my terminal spit out that marked the end of my very first devlog. Nothing wrong with my syntax, no bad token, no accidentally deleted code. Everything should’ve been going great until Discord’s servers slammed the door shut on every attempt to join a voice channel. Why?

I’ll get to that. But first, some context.

What is Verbosity?

Verbosity is a lightweight, self-hosted voice moderation bot for Discord. The kind of specialised, efficient machine you could run at home on a Raspberry Pi or small VPS without needing to destroy a small town’s water supply by using a data centre and a hundred GPUs.

The core idea is that Discord text moderation is very oversaturated, while voice moderation is practically a ghost town. Normally, you’d have to hope a moderator is already in the voice channel to witness someone’s misconduct. That’s where Verbosity comes in: it keeps a constantly overwriting 30-second rolling buffer of audio for every speaker. Nothing is permanently recorded, and the bot is open source. If a moderator runs /clip, or an automated trigger fires (like someone yelling slurs or blasting extremely loud audio), a clip is pulled from the buffer and saved much like saving footage from a dashcam. Otherwise, it just rolls over and disappears.

No cloud APIs, third parties, etc. Just efficient local processing and a buffer that’s always recording only the last 30 seconds.

That said, today was supposed to be the boring part: get the bot online, responding to slash commands, and make sure the skeleton worked. It mostly did. Right up until it didn’t.

The boring (but important) part:

Every feature this bot will eventually have (/clip, /protect, etc.) will arrive as a slash command. Before any of that exists, there needs to be a clean, obvious place where commands get registered/routed. If I get this wrong now, the project will become a mess later as every new command turns into a special case. If I get it right, every new command should mostly be a matter of adding another entry to a table or switch statement.

So I started by cooking up ping, join, and leave.

/ping came first and replied instantly - great! The first real proof the bot was alive and listening.

/join was the more pressing matter because it’s the doorway to all of Verbosity. Every audio frame the bot will ever process starts with joining a voice channel. Fail = no bot. Success = everything else becomes possible.

First Lesson: Discord is impatient

The first lesson - and a useful one if you’re doing anything with Discord’s interaction API - is that slash commands must send an initial response within 3 seconds or Discord shows the user the gloomy little “This application did not respond” message. /join has to open a voice gateway connection and a UDP socket, and it’s perfectly normal for that to take longer than three seconds.

The fix is a deferred response: acknowledge the command immediately with something like “Verbosity is thinking…”, then send the real answer once the slow work finishes. Discord then gives you a generous 15-minute window to send the real response.

Second Lesson: Door Slam

4017: E2EE/DAVE protocol required

A 4017 close code doesn’t mean my code is flawed - it means Discord’s voice servers don’t recognise the protocol being used.

The reason is a platform change. Back in March, Discord made DAVE (its end-to-end voice encryption protocol) mandatory for all bots. Older libraries, like discordgo (which I’m using), don’t support DAVE.

So I’ll have to pivot and use something like disgo + godave to fix this in devlog #2.

Till next time!
https://hackclub.enterprise.slack.com/archives/C0BAKC9E71S/p1781437448856899

0
Original post
@musty

Verbosity Devlog #1: The Foundation Was Fine. The Ground Wasn’t.

websocket closed unexpectedly
websocket: close 4017: E2EE/DAVE protocol required

That’s the line my terminal spit out that marked the end of my very first devlog. Nothing wrong with my syntax, no bad token, no accidentally deleted code. Everything should’ve been going great until Discord’s servers slammed the door shut on every attempt to join a voice channel. Why?

I’ll get to that. But first, some context.

What is Verbosity?

Verbosity is a lightweight, self-hosted voice moderation bot for Discord. The kind of specialised, efficient machine you could run at home on a Raspberry Pi or small VPS without needing to destroy a small town’s water supply by using a data centre and a hundred GPUs.

The core idea is that Discord text moderation is very oversaturated, while voice moderation is practically a ghost town. Normally, you’d have to hope a moderator is already in the voice channel to witness someone’s misconduct. That’s where Verbosity comes in: it keeps a constantly overwriting 30-second rolling buffer of audio for every speaker. Nothing is permanently recorded, and the bot is open source. If a moderator runs /clip, or an automated trigger fires (like someone yelling slurs or blasting extremely loud audio), a clip is pulled from the buffer and saved much like saving footage from a dashcam. Otherwise, it just rolls over and disappears.

No cloud APIs, third parties, etc. Just efficient local processing and a buffer that’s always recording only the last 30 seconds.

That said, today was supposed to be the boring part: get the bot online, responding to slash commands, and make sure the skeleton worked. It mostly did. Right up until it didn’t.

The boring (but important) part:

Every feature this bot will eventually have (/clip, /protect, etc.) will arrive as a slash command. Before any of that exists, there needs to be a clean, obvious place where commands get registered/routed. If I get this wrong now, the project will become a mess later as every new command turns into a special case. If I get it right, every new command should mostly be a matter of adding another entry to a table or switch statement.

So I started by cooking up ping, join, and leave.

/ping came first and replied instantly - great! The first real proof the bot was alive and listening.

/join was the more pressing matter because it’s the doorway to all of Verbosity. Every audio frame the bot will ever process starts with joining a voice channel. Fail = no bot. Success = everything else becomes possible.

First Lesson: Discord is impatient

The first lesson - and a useful one if you’re doing anything with Discord’s interaction API - is that slash commands must send an initial response within 3 seconds or Discord shows the user the gloomy little “This application did not respond” message. /join has to open a voice gateway connection and a UDP socket, and it’s perfectly normal for that to take longer than three seconds.

The fix is a deferred response: acknowledge the command immediately with something like “Verbosity is thinking…”, then send the real answer once the slow work finishes. Discord then gives you a generous 15-minute window to send the real response.

Second Lesson: Door Slam

4017: E2EE/DAVE protocol required

A 4017 close code doesn’t mean my code is flawed - it means Discord’s voice servers don’t recognise the protocol being used.

The reason is a platform change. Back in March, Discord made DAVE (its end-to-end voice encryption protocol) mandatory for all bots. Older libraries, like discordgo (which I’m using), don’t support DAVE.

So I’ll have to pivot and use something like disgo + godave to fix this in devlog #2.

Till next time!
https://hackclub.enterprise.slack.com/archives/C0BAKC9E71S/p1781437448856899

Replies

Loading replies…

0
1

Followers

Loading…