Coder Social home page Coder Social logo

Comments (4)

Kerollmops avatar Kerollmops commented on May 23, 2024 1

If it is 2., could you verify if you have this toggle switch turned on?

You are my savior! It was indeed the issue, thank you very much 👍

from serenity.

arqunis avatar arqunis commented on May 23, 2024

Is there a way to provide the intent to the Http client?

There is none, because intents are for the gateway only. Discord's HTTP API does not allow you to provide intents, even for ones that aren't associated with any gateway event in particular, like MESSAGE_CONTENT.

from serenity.

Kerollmops avatar Kerollmops commented on May 23, 2024

So, is there a way to get all message content in a specific channel? Should the HTTP API always return the content? Because I am constantly seeing an empty string as the content?

from serenity.

arqunis avatar arqunis commented on May 23, 2024

I am honestly not sure. I haven't had the need to fetch a Message object with the content via the HTTP API, and the documentation for the Get Channel Messages endpoint does not mention the intent at all (nor other related endpoints). I can only speculate two things:

  1. You may only receive the content of a message via the gateway. Similar for being able to receive the full Guild object rather than the PartialGuild object you get from the HTTP API.
  2. When you work with the gateway, to enable or disable intents you must specify them in the "Identify" payload upon first connecting to the gateway. Certain intents, however, require you to enable them first in your bot's developer settings, because they are privileged. MESSAGE_CONTENT is one of these. Since the HTTP API does not let you enable or disable intents much like the gateway does, it could be assumed that all intents are enabled by default. It's just that for privileged intents, they also have to be enabled in the bot settings.

If it is 2., could you verify if you have this toggle switch turned on?
image

from serenity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.