diff --git a/src/discord/snowflake.hpp b/src/discord/snowflake.hpp index a5c0e6c..83a2bc3 100644 --- a/src/discord/snowflake.hpp +++ b/src/discord/snowflake.hpp @@ -2,6 +2,7 @@ #include #include #include +#include struct Snowflake { Snowflake(); @@ -39,6 +40,13 @@ private: unsigned long long m_num; }; +template<> +struct fmt::formatter : fmt::formatter { + auto format(Snowflake id, format_context &ctx) -> decltype(ctx.out()) { + return format_to(ctx.out(), "[id: {}]", static_cast(id)); + } +}; + namespace std { template<> struct hash {