Skip to content

Conversation

@Jaskowicz1
Copy link
Contributor

@Jaskowicz1 Jaskowicz1 commented Oct 6, 2025

This PR allows bots to edit their banner, avatar and bio, per guild.

Code change checklist

  • I have ensured that all methods and functions are fully documented using doxygen style comments.
  • My code follows the coding style guide.
  • I tested that my change works before raising the PR.
  • I have ensured that I did not break any existing API calls.
  • I have not built my pull request using AI, a static analysis tool or similar without any human oversight.

@netlify
Copy link

netlify bot commented Oct 6, 2025

Deploy Preview for dpp-dev ready!

Name Link
🔨 Latest commit a6d7a5e
🔍 Latest deploy log https://app.netlify.com/projects/dpp-dev/deploys/68ea3482f7f34b0008376790
😎 Deploy Preview https://deploy-preview-1502--dpp-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added documentation Improvements or additions to documentation code Improvements or additions to code. labels Oct 6, 2025
@Jaskowicz1
Copy link
Contributor Author

This needs #1503 merged and then coro needs to be auto generated.

@Jaskowicz1
Copy link
Contributor Author

This needs testing in a bot before we go ahead with marking as Ready for Review

@Jaskowicz1
Copy link
Contributor Author

This is working!

Here is my test bot before:
image

Here is only with name and bio set:
image

Here is with name, avatar, banner, bio:
image

It does also reset when you pass a blank string to all fields.

@Jaskowicz1 Jaskowicz1 marked this pull request as ready for review October 9, 2025 19:07
@Jaskowicz1
Copy link
Contributor Author

PR has now been marked as ready for review

Copy link
Member

@Mishura4 Mishura4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have minor changes to request and I can't do it on mobile, blocking this until tomorrow 😈

@Jaskowicz1 Jaskowicz1 requested a review from Mishura4 October 11, 2025 10:24
Comment on lines 67 to 68
const std::string post_data = j.dump(-1, ' ', false, json::error_handler_t::replace);
rest_request<confirmation>(this, API_PATH "/guilds", std::to_string(guild_id), "members/@me", m_patch, std::move(post_data), std::move(callback));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const std::string post_data = j.dump(-1, ' ', false, json::error_handler_t::replace);
rest_request<confirmation>(this, API_PATH "/guilds", std::to_string(guild_id), "members/@me", m_patch, std::move(post_data), std::move(callback));
std::string post_data = j.dump(-1, ' ', false, json::error_handler_t::replace);
rest_request<confirmation>(this, API_PATH "/guilds", std::to_string(guild_id), "members/@me", m_patch, std::move(post_data), std::move(callback));

You have to remove the const too, moving a const object just copies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code Improvements or additions to code. documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants