fix
This commit is contained in:
parent
b8c42bb22c
commit
237ba0f434
@ -25,8 +25,8 @@
|
||||
// internet connectivity.
|
||||
.dependencies = .{
|
||||
.zlib = .{
|
||||
.url = "https://github.com/yuzudev/zig-zlib/archive/refs/heads/main.zip",
|
||||
.hash = "zlib-0.1.0-AAAAAKm6QADNBB6NBPHanW9G0EOPTmgJsRO6NFT__arp",
|
||||
.url = "https://git.yuzucchii.xyz/yuzucchii/zlib/archive/master.tar.gz",
|
||||
.hash = "zlib-0.1.0-AAAAALW6QABbti7dQfKuK0IQb-xdcp3SI8zdTvs5ouUD",
|
||||
},
|
||||
.websocket = .{ .url = "https://github.com/karlseguin/websocket.zig/archive/refs/heads/master.zip", .hash = "websocket-0.1.0-ZPISdYBIAwB1yO6AFDHRHLaZSmpdh4Bz4dCmaQUqNNWh" },
|
||||
},
|
||||
|
0
src/session.zig
Normal file
0
src/session.zig
Normal file
@ -858,12 +858,10 @@ pub fn Shard(comptime Table: TableTemplate) type {
|
||||
};
|
||||
|
||||
// default handler for whoever wants it
|
||||
//if (self.handler.any) |anyEvent|
|
||||
//try anyEvent(self, payload);
|
||||
if (self.handler.any) |anyEvent|
|
||||
try anyEvent(self, payload);
|
||||
}
|
||||
|
||||
pub const RequestFailedError = MakeRequestError || error{FailedRequest} || json.ParseError(json.Scanner);
|
||||
|
||||
// start http methods
|
||||
|
||||
/// Retrieves the messages in a channel.
|
||||
@ -2905,10 +2903,12 @@ pub fn Shard(comptime Table: TableTemplate) type {
|
||||
|
||||
return req.delete(path);
|
||||
}
|
||||
inline fn logif(self: *Self, comptime format: []const u8, args: anytype) void {
|
||||
|
||||
pub fn logif(self: *Self, comptime format: []const u8, args: anytype) void {
|
||||
internalLogif(self.log, format, args);
|
||||
}
|
||||
|
||||
pub const RequestFailedError = MakeRequestError || error{FailedRequest} || json.ParseError(json.Scanner);
|
||||
|
||||
};
|
||||
}
|
||||
|
@ -29,7 +29,6 @@ fn ready(_: *anyopaque, payload: Discord.Ready) !void {
|
||||
fn message_create(shard_ptr: *anyopaque, message: Discord.Message) !void {
|
||||
// set custom cache
|
||||
const session: *Shard(Cache) = @ptrCast(@alignCast(shard_ptr));
|
||||
|
||||
if (message.content != null and std.ascii.eqlIgnoreCase(message.content.?, "!hi")) {
|
||||
var result = try session.sendMessage(message.channel_id, .{ .content = "hi :)" });
|
||||
defer result.deinit();
|
||||
|
Loading…
x
Reference in New Issue
Block a user