Add API endpoint for server invite background

댓글

댓글 6개

  • Donovan_DMC

    This is in the api already, see the docs. The api Discord uses in-app is the same api, the only difference is the authorization. In the app, it uses your access token, in requests you make to the api on your own, you use your bot token with Bot added to the beginning.

    Some endpoints are unusable by bots, or undocumented yes, but they still share the same api.

     

    splash is the invite splash (invite background), ex the top of this screenshot.

    when submitting it, you provide a base64 encoded image in the splash property of /guilds/:id

    request body

    request headers

    audit log entry

    there are some online services to convert images to base64, and this stack exchange answer for node.js

     

  • SoreGums

    hmm are you sure it's the same as the Nitro/Boost Custom Server Invite Background?

    I can't really test it as I would need to buy multiple Nitros and am not feeling that generous :)

     

  • Soheab_

    Already possible.. if you use discord.py it’s `guild.splash`

  • Donovan_DMC

    @SoreGums yes, I am 100% sure it's the same thing, I literally tested it out with a direct request, setting it in Discord, and with a bot. The bot makes the same request your client makes, just with your bot token.

  • Donovan_DMC

    Nitro Boosting provides a way to get normally partnered/veified features without having either of those, they use the same methods.

  • SoreGums

    ok great - thanks :)

댓글을 남기려면 로그인하세요.