sleepy-discord
sleepy-discord copied to clipboard
createTextChannel() doesn't work
This function does not work. I would like to be able to create categories and text channels.
hmm, I plan on making making a new type template called json::Dynamic<Type>
, looking at this endpoint, I think this will be a very good use case.
To give a bit of an update, I've renamed it to json::Maybe<Type>
and I've pushed it to the develop branch, https://github.com/yourWaifu/sleepy-discord/commit/327042c60d1cb6bf07ab82f85feb1450adca7531
I might make another one called json::Optional<Type>
if I think it'll be useful, the main difference is that Maybe is a pointer while Optional is a union, which allows it to be on the stack but will always take up memory even when null.
According to https://discord.com/developers/docs/resources/channel#channel-object-channel-types request(Post, path("guilds/{guild.id}/channels", { serverID }), settings, "{"name": " + json::string(name) + ", "type": "text"}") Should be: request(Post, path("guilds/{guild.id}/channels", { serverID }), settings, "{"name": " + json::string(name) + ", "type": 0}")