mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-19 20:11:59 +03:00
allow using animated emojis + emojis from other servers w/ nitro
also hide unavailable emojis and role-locked emojis. if you have the role it still wont show up yet though
This commit is contained in:
@@ -1617,6 +1617,13 @@ std::set<Snowflake> DiscordClient::GetPrivateChannels() const {
|
||||
return ret;
|
||||
}
|
||||
|
||||
PremiumType DiscordClient::GetSelfPremiumType() const {
|
||||
const auto &data = GetUserData();
|
||||
if (data.PremiumType.has_value())
|
||||
return *data.PremiumType;
|
||||
return PremiumType::None;
|
||||
}
|
||||
|
||||
void DiscordClient::HeartbeatThread() {
|
||||
while (m_client_connected) {
|
||||
if (!m_heartbeat_acked) {
|
||||
|
||||
@@ -75,6 +75,8 @@ public:
|
||||
std::set<Snowflake> GetMessagesForChannel(Snowflake id) const;
|
||||
std::set<Snowflake> GetPrivateChannels() const;
|
||||
|
||||
PremiumType GetSelfPremiumType() const;
|
||||
|
||||
void FetchMessagesInChannel(Snowflake id, std::function<void(const std::vector<Snowflake> &)> cb);
|
||||
void FetchMessagesInChannelBefore(Snowflake channel_id, Snowflake before_id, std::function<void(const std::vector<Snowflake> &)> cb);
|
||||
std::optional<Message> GetMessage(Snowflake id) const;
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
#include "json.hpp"
|
||||
#include <string>
|
||||
|
||||
enum class PremiumType {
|
||||
None = 0,
|
||||
NitroClassic = 1,
|
||||
Nitro = 2,
|
||||
};
|
||||
|
||||
struct UserData {
|
||||
enum {
|
||||
DiscordEmployee = 1 << 0,
|
||||
@@ -36,7 +42,7 @@ struct UserData {
|
||||
std::optional<bool> IsVerified;
|
||||
std::optional<std::string> Email; // null
|
||||
std::optional<uint64_t> Flags;
|
||||
std::optional<int> PremiumType; // null
|
||||
std::optional<PremiumType> PremiumType; // null
|
||||
std::optional<uint64_t> PublicFlags;
|
||||
|
||||
// undocumented (opt)
|
||||
|
||||
Reference in New Issue
Block a user