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) {
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
if (!m_discord.HasChannelPermission(m_discord.GetUserData().ID, data.ChannelID, Permission::VIEW_CHANNEL)) return;
m_discord.SendChatMessage(data, [data](DiscordError code) {
ChatMessageSentCallback(data);
});
m_discord.SendChatMessage(data, NOOP_CALLBACK);
}
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
void request::add_field(std::string_view name, const char *data, size_t size) {
puts(name.data());
auto *field = curl_mime_addpart(m_form);
curl_mime_name(field, name.data());
curl_mime_data(field, data, size);