This commit is contained in:
yuzu 2025-05-16 11:36:28 -05:00
parent 8c427231de
commit 08728161dd

View File

@ -418,15 +418,6 @@ pub fn connect(self: *Self) ConnectError!void {
net.Stream.ReadError.NotOpenForReading => { net.Stream.ReadError.NotOpenForReading => {
std.debug.panic("Shard {d}: Stream closed unexpectedly", .{self.id}); // still check your intents std.debug.panic("Shard {d}: Stream closed unexpectedly", .{self.id}); // still check your intents
}, },
// debug this further
error.DataError => |e| {
std.debug.panic("Shard {d} DATA ERROR: panicked with error {s} code {d} in thread {any}", .{
self.id,
@errorName(e),
@intFromError(e),
std.Thread.getCurrentId(),
});
},
else => { else => {
// log that the connection died, but don't stop the bot // log that the connection died, but don't stop the bot
self.logif("Shard {d} closed with error: {s}", .{self.id, @errorName(err)}); self.logif("Shard {d} closed with error: {s}", .{self.id, @errorName(err)});