Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't start bot with CHANNEL partial #7345

Closed
MahouSirin opened this issue Jan 26, 2022 · 2 comments · Fixed by #7346
Closed

Can't start bot with CHANNEL partial #7345

MahouSirin opened this issue Jan 26, 2022 · 2 comments · Fixed by #7346

Comments

@MahouSirin
Copy link
Contributor

MahouSirin commented Jan 26, 2022

Which package is this bug report for?

discord.js

Issue description

  1. Install latest development version of discord.js
  2. Just run a bot with CHANNEL partial

Code sample

const { Client, Intents } = require('discord.js');
const client = new Client({
  intents: [Intents.FLAGS.GUILD, Intents.FLAGS.GUILD_MESSAGES],
  partials: ['CHANNEL'],
});
client.login('token');
TypeError: Cannot set property createdTimestamp of [object Object] which has only a getter
    at ThreadChannel._patch (/home/anonymous/bot/node_modules/discord.js/src/structures/ThreadChannel.js:111:31)
    at new ThreadChannel (/home/anonymous/bot/node_modules/discord.js/src/structures/ThreadChannel.js:43:20)
    at Function.create (/home/anonymous/bot/node_modules/discord.js/src/structures/Channel.js:242:23)
    at ChannelManager._add (/home/anonymous/bot/node_modules/discord.js/src/managers/ChannelManager.js:47:29)
    at Guild._patch (/home/anonymous/bot/node_modules/discord.js/src/structures/Guild.js:387:30)
    at Object.module.exports [as GUILD_CREATE] (/home/anonymous/bot/node_modules/discord.js/src/client/websocket/handlers/GUILD_CREATE.js:10:13)
    at WebSocketManager.handlePacket (/home/anonymous/bot/node_modules/discord.js/src/client/websocket/WebSocketManager.js:351:31)
    at WebSocketShard.onPacket (/home/anonymous/bot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
    at WebSocketShard.onMessage (/home/anonymous/bot/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
    at WebSocket.onMessage (/home/anonymous/bot/node_modules/ws/lib/event-target.js:199:18)

Package version

14.0.0-dev b640272

Node.js version

17.4.0

Operating system

No response

Priority this issue should have

High (immediate attention needed)

Which partials do you have configured?

CHANNEL

Which gateway intents are you subscribing to?

GUILDS, GUILD_MESSAGES

I have tested this issue on a development release

b640272

@suneettipirneni
Copy link
Member

Note: Caused by 9a16234

@suneettipirneni
Copy link
Member

suneettipirneni commented Jan 26, 2022

To clarify, this isn't because of the CHANNEL partial, it's just a bug for any thread creations.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants