Qolors / Clam-Shell

Discord File & URL Monitoring Anti-Virus Engine
26 stars 0 forks source link

Intents for bot #4

Open maaknaamaan opened 3 weeks ago

maaknaamaan commented 3 weeks ago

Could you tell me what intents I need for the bot to work? Currently won't come up and it looks like it's the intents that are not correct, but I have no clue what is needed.

19:41:12 Gateway     Connecting

19:41:13 Gateway     System.Exception: WebSocket connection was closed

 ---> Discord.Net.WebSocketClosedException: The server sent close 4014: "Disallowed intent(s)."

   at Discord.Net.WebSockets.DefaultWebSocketClient.RunAsync(CancellationToken cancelToken)

   --- End of inner exception stack trace ---

   at Discord.WebSocket.DiscordSocketClient.OnConnectingAsync()

   at Discord.ConnectionManager.ConnectAsync(CancellationTokenSource reconnectCancelToken)

   at Discord.ConnectionManager.<>c__DisplayClass29_0.<<StartAsync>b__0>d.MoveNext()

19:41:13 Gateway     Disconnecting

19:41:13 Gateway     Disconnected
maaknaamaan commented 3 weeks ago
Privileged Gateway Intents
Some [Gateway Intents](https://discord.com/developers/docs/topics/gateway#gateway-intents) require approval if your bot is verified. If your bot is not verified, you can toggle those intents below to access them.

Presence Intent
Required for your bot to receive [Presence Update] events.

Server Members Intent
Required for your bot to receive events listed under [GUILD_MEMBERS]

Message Content Intent
Required for your bot to receive in most messages.

I ticked all 3 and it's online now, but are all needed?

Qolors commented 3 weeks ago

Hey @maaknaamaan, what's in the code for intents is:

I believe where this codebase currently stands you would only need message intents, but you would have to change that in the codebase itself and build from source. The intents are in the main entry of the program here.

Otherwise just keep those intents on. I had planned to use them for further moderation, but the development of this has taken a hard stop due to life :) hope this helps in some way