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

An error occurs "Failed to execute 'postMessage' on 'Window' " when execute DiscordSDK.commands.getChannel() #69

Open
Daikonnbatake opened this issue Mar 28, 2024 · 2 comments

Comments

@Daikonnbatake
Copy link

Daikonnbatake commented Mar 28, 2024

English (google translate):
An error occurs when using the getChannel() function as shown below.
I think the error is probably occurring when messages are passed between Discord Client and embedded-app-sdk.

This screenshot is taken when trying to get the voice channel.
Strangely, this error occurs only for voice channels and textchannels that have at least one text message.
Also, it seems that the channel data is being acquired correctly on the SDK side.

We would appreciate it if you could check it out.
Thank you.

日本語 (original):
下記の通り getChannel() 関数を使用するとエラーが発生します。
おそらく Discord Client と embedded-app-sdk の間でメッセージを受け渡すタイミングで発生しているエラーだと思います。

このスクリーンショットはボイスチャンネルを取得しようとした際のものです。
奇妙なことに voice channel でも、textchannel でも text message が 1 件以上あるチャンネルでのみこのエラーが発生します。
またチャンネルのデータは SDK 側では正しく取得できているようです。

ご確認いただけますと幸いです。
よろしくお願いいたします。

const channelId = <my channel id>;
const result = await DiscordSDK.commands.GetChannel({ channel_id: channelId });

log

@Daikonnbatake Daikonnbatake changed the title An error occurs "Failed to execute 'postMessage' on 'Window' " when execute DiscordSDK.commands.GetChannel() An error occurs "Failed to execute 'postMessage' on 'Window' " when execute DiscordSDK.commands.getChannel() Mar 29, 2024
@Daikonnbatake
Copy link
Author

English (google translate):
This error seems to occur when using the MESSAGE_READ permission.
Removing MESSAGE_READ fixed the error.

日本語 (original):
このエラーは MESSAGE_READ 権限を使用すると発生するようです。
MESSAGE_READ を削除するとエラーが解消されました

@matthova
Copy link
Collaborator

Thank you for making this issue and describing the minimal repro. We're going to look into a patch for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants