UrielCh / midjourney-client

midjourney-client in deno

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SERVER_ID

lonestar69 opened this issue · comments

Hello,

I have problems with the SERVER_ID.

I use the public discord servers. In the browser, my URL is looks like: https://discord.com/channels/@me/<CHANNEL_ID_NUMERIC>/
It seems that the SERVER_ID would be "@me", but this is not numeric.

I followed the instructions but no value is set for guild_id / server_id.
I followed this guide:

Tokens / ids extraction.

  • Open your web browser
  • Go to your discord channel
  • Open the developer bar
  • Go to network
  • Send a request to discordBot, like /settings
  • Left click on the https://discord.com/api/v9/interactions request.
  • ClickCopy
  • Click Copy as fetch
  • Save this request in a file that you will provide to the Midjourney constructor. (for my test I name this file interaction.txt)

I can easily read the messages from my channel. This command successfully delivers the messages:
const rawMessages = await client.getMessages(4);

But when I call Imagine Command I get an error message:

   const msg = await client.imagine("A photo of an astronaut riding a horse",
                                       /* add optional progress function (percent) => void */
);

Error: you must choose a channel first with setDiscordChannelUrl("https://discord.com/channels/....../......")

I also tried to determine the server ID via the Discord WebUI. I have enabled developer mode for my Discord user.
However, right-clicking on the midjourney bot only gives me the option to copy the channel ID and user ID.

How can I read out the server ID or use the API without a server ID?

can you try using a newbe channel url ?
this is the list:

general1: "https://discord.com/channels/662267976984297473/933565701162168371",
general2: "https://discord.com/channels/662267976984297473/941971306004504638",
general3: "https://discord.com/channels/662267976984297473/981832774157762570",
general4: "https://discord.com/channels/662267976984297473/984632424610824222",
general5: "https://discord.com/channels/662267976984297473/984632500875821066",
general6: "https://discord.com/channels/662267976984297473/984632520471633920",
general7: "https://discord.com/channels/662267976984297473/989274712590917653",
general8: "https://discord.com/channels/662267976984297473/989274728155992124",
general9: "https://discord.com/channels/662267976984297473/989274745495240734",
general10: "https://discord.com/channels/662267976984297473/989274756341706822",
general11: "https://discord.com/channels/662267976984297473/941582479117127680",
general12: "https://discord.com/channels/662267976984297473/995431151084773486",
general13: "https://discord.com/channels/662267976984297473/995431172375064616",
general14: "https://discord.com/channels/662267976984297473/995431233121161246",
general15: "https://discord.com/channels/662267976984297473/995431473828077618",
general16: "https://discord.com/channels/662267976984297473/995431514080813086",
general17: "https://discord.com/channels/662267976984297473/995431544019755070",
general18: "https://discord.com/channels/662267976984297473/995431387333152778",
general19: "https://discord.com/channels/662267976984297473/995431305066065950",
general20: "https://discord.com/channels/662267976984297473/995431274267279440",

check the new updated doc.