remove unnecessary verbosity

This commit is contained in:
ouwou 2022-08-08 02:41:54 -04:00
parent 955b9239b9
commit 02741f2c1b
2 changed files with 1 additions and 11 deletions

View File

@ -744,22 +744,13 @@ void Abaddon::ActionChatLoadHistory(Snowflake id) {
}); });
} }
static void ChatMessageSentCallback(const ChatSubmitParams &data) {
printf("completed for %s\n", data.Message.c_str());
for (const auto &attachment : data.Attachments) {
puts(attachment.File->get_path().c_str());
}
}
void Abaddon::ActionChatInputSubmit(ChatSubmitParams data) { void Abaddon::ActionChatInputSubmit(ChatSubmitParams data) {
if (data.Message.substr(0, 7) == "/shrug " || data.Message == "/shrug") if (data.Message.substr(0, 7) == "/shrug " || data.Message == "/shrug")
data.Message = data.Message.substr(6) + "\xC2\xAF\x5C\x5F\x28\xE3\x83\x84\x29\x5F\x2F\xC2\xAF"; // this is important data.Message = data.Message.substr(6) + "\xC2\xAF\x5C\x5F\x28\xE3\x83\x84\x29\x5F\x2F\xC2\xAF"; // this is important
if (!m_discord.HasChannelPermission(m_discord.GetUserData().ID, data.ChannelID, Permission::VIEW_CHANNEL)) return; if (!m_discord.HasChannelPermission(m_discord.GetUserData().ID, data.ChannelID, Permission::VIEW_CHANNEL)) return;
m_discord.SendChatMessage(data, [data](DiscordError code) { m_discord.SendChatMessage(data, NOOP_CALLBACK);
ChatMessageSentCallback(data);
});
} }
void Abaddon::ActionChatEditMessage(Snowflake channel_id, Snowflake id) { void Abaddon::ActionChatEditMessage(Snowflake channel_id, Snowflake id) {

View File

@ -129,7 +129,6 @@ void request::add_file(std::string_view name, const Glib::RefPtr<Gio::File> &fil
// copied // copied
void request::add_field(std::string_view name, const char *data, size_t size) { void request::add_field(std::string_view name, const char *data, size_t size) {
puts(name.data());
auto *field = curl_mime_addpart(m_form); auto *field = curl_mime_addpart(m_form);
curl_mime_name(field, name.data()); curl_mime_name(field, name.data());
curl_mime_data(field, data, size); curl_mime_data(field, data, size);