<commit_before>#pragma once
#include <vector>
#include "discord_object_interface.h"
#include "snowflake.h"
#include "server.h"
#include "channel.h"
#include "embed.h"
#include "message.h"
#include "user.h"

namespace SleepyDiscord {
	
	struct InteractionData;

	struct AppCommand : public IdentifiableDiscordObject<AppCommand> {
		AppCommand() = default;
		AppCommand(json::Value & json);
		AppCommand(const nonstd::string_view& json) :
			AppCommand(json::fromJSON<AppCommand>(json)) {}
		
		struct Option : public DiscordObject {
			Option() = default;
			Option(json::Value & json);
			Option(const nonstd::string_view& json) :
				AppCommand::Option(json::fromJSON<AppCommand::Option>(json)) {}

			enum class Type : int {
				NONE              = 0, //made up type
				SUB_COMMAND       = 1,
				SUB_COMMAND_GROUP = 2,
				STRING            = 3,
				INTEGER	          = 4,
				BOOLEAN	          = 5,
				USER              = 6,
				CHANNEL           = 7,
				ROLE              = 8,
				MENTIONABLE       = 9,
				NUMBER            = 10
			};

			template<class T, class C = void>
			struct TypeHelper {};

			template<Type type, class T>
			struct TypeHelperImpl {
				static constexpr Type getType() { return _type; }
			private:
				static constexpr Type _type = type;
			};

			template<> struct TypeHelper<bool, void> : public TypeHelperImpl<Type::BOOLEAN, bool    > {};
			template<> struct TypeHelper<std::string, void> : public TypeHelperImpl<Type::STRING, std::string> {};
			template<> struct TypeHelper<Channel, void> : public TypeHelperImpl<Type::CHANNEL, Channel> {};
			template<> struct TypeHelper<Role, void> : public TypeHelperImpl<Type::ROLE, Role> {};
			template<> struct TypeHelper<User, void> : public TypeHelperImpl<Type::USER, User> {};

			template<class Integer>
			struct TypeHelper<
				Integer, typename std::enable_if < std::is_integral< Integer >::value >::type
			> : public TypeHelperImpl< Type::INTEGER, Integer > {};

			template<class Number>
			struct TypeHelper<
				Number, typename std::enable_if < std::is_floating_point< Number >::value >::type
			> : public TypeHelperImpl< Type::NUMBER, Number > {};

			struct Choice : public DiscordObject {
				Choice() = default;
				Choice(json::Value & json);
				Choice(const nonstd::string_view& json) :
					AppCommand::Option::Choice(json::fromJSON<AppCommand::Option::Choice>(json)) {}

				std::string name;
				json::Value value;
<commit_msg>AutoDocs Fix try 4<commit_after>#pragma once
#include <vector>
#include "discord_object_interface.h"
#include "snowflake.h"
#include "server.h"
#include "channel.h"
#include "embed.h"
#include "message.h"
#include "user.h"

namespace SleepyDiscord {
	
	struct InteractionData;

	struct AppCommand : public IdentifiableDiscordObject<AppCommand> {
		AppCommand() = default;
		AppCommand(json::Value & json);
		AppCommand(const nonstd::string_view& json) :
			AppCommand(json::fromJSON<AppCommand>(json)) {}
		
		struct Option : public DiscordObject {
			Option() = default;
			Option(json::Value & json);
			Option(const nonstd::string_view& json) :
				AppCommand::Option(json::fromJSON<AppCommand::Option>(json)) {}

			enum class Type : int {
				NONE              = 0, //made up type
				SUB_COMMAND       = 1,
				SUB_COMMAND_GROUP = 2,
				STRING            = 3,
				INTEGER	          = 4,
				BOOLEAN	          = 5,
				USER              = 6,
				CHANNEL           = 7,
				ROLE              = 8,
				MENTIONABLE       = 9,
				NUMBER            = 10
			};

			template<class T, class C = void>
			struct TypeHelper {};

			template<Type type, class T>
			struct TypeHelperImpl {
				static constexpr Type getType() { return _type; }
			private:
				static constexpr Type _type = type;
			};

			template<> struct TypeHelper<bool, void> : public TypeHelperImpl<Type::BOOLEAN, bool    > {};
			template<> struct TypeHelper<std::string, void> : public TypeHelperImpl<Type::STRING, std::string> {};
			template<> struct TypeHelper<Channel, void> : public TypeHelperImpl<Type::CHANNEL, Channel> {};
			template<> struct TypeHelper<Role, void> : public TypeHelperImpl<Type::ROLE, Role> {};
			template<> struct TypeHelper<User, void> : public TypeHelperImpl<Type::USER, User> {};

			template<class Integer, class C = void>
			struct isInt {};
			template<class Int>
			struct isInt<Int, typename std::enable_if < std::is_integral< Int >::value >::type> {
				using Type = void;
			};

			template<class Number, class C = void>
			struct isNum {};
			template<class Num>
			struct isNum<Num, typename std::enable_if < std::is_floating_point< Num >::value >::type> {
				using Type = void;
			};

			template<class Int>
			struct TypeHelper<
				Int, typename isInt<Int>::Type
			> : public TypeHelperImpl< Type::INTEGER, Int > {};

			template<class Num>
			struct TypeHelper<
				Num, typename isNum<Num>::Type
			> : public TypeHelperImpl< Type::NUMBER, Num > {};

			struct Choice : public DiscordObject {
				Choice() = default;
				Choice(json::Value & json);
				Choice(const nonstd::string_view& json) :
					AppCommand::Option::Choice(json::fromJSON<AppCommand::Option::Choice>(json)) {}

				std::string name;
				json::Value value;

{'fraction_non_alphanumeric': 0.12982998454404945, 'fraction_numerical': 0.004829984544049459, 'mean_word_length': 3.417235494880546, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 75, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5093821', 'n_tokens_mistral': 1883, 'n_tokens_neox': 1547, 'n_words': 397}