lipfangmoe/zigcord
Discord Bot library for the Zig Programming Language. (This is a mirror, main repository linked below)
masterA Discord API for the Zig programming language.
Currently built off of Zig Version 0.15.2. If you notice that it is broken
on a more recent patch of Zig, please create an issue!
To include this in your zig project, use the Zig Package Manager:
# you can get a specific version by replacing "main" with the version number, ie #v0.2.3
zig fetch --save 'git+https://codeberg.org/lipfang/zigcord#main'
Then, make sure something similar to the following is in your build.zig:
const zigcord_dependency = b.dependency("zigcord", .{});
const zigcord_module = zigcord_dependency.module("zigcord");
const mybot_module = b.addModule("myBot", .{
.root_source_file = "src/main.zig",
.imports = &.{.{ .name = "zigcord", .module = zigcord_module }},
});
const my_bot_exe = b.addExecutable(.{ .name = "myBot", .root_module = mybot_module });
b.installArtifact(gateway_bot);
std.Io.Reader and std.Io.Writer interfacesThe best way to look at examples is to look at the examples directory.
The examples are also runnable with zig build examples:gateway and zig build examples:interaction (or simply zig build examples to build all examples)