Ardnozz / DiscordEmailBot

Discord bot that handles IMAP requests and sends the content to the user.
0 stars 0 forks source link

Getting error message white `npm start` #1

Open ghost opened 5 months ago

ghost commented 5 months ago
> discord-email@1.2 start
> ts-node app.ts

(node:5711) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Logged in as Who Mailed Me#6261!
Started refreshing application (/) commands.
/home/anonxpro/Downloads/DiscordEmailBot/node_modules/@discordjs/rest/src/lib/handlers/Shared.ts:148
                        throw new DiscordAPIError(data, 'code' in data ? data.code : data.error, status, method, url, requestData);
         ^
DiscordAPIError[10004]: Unknown Guild
    at handleErrors (/home/anonxpro/Downloads/DiscordEmailBot/node_modules/@discordjs/rest/src/lib/handlers/Shared.ts:148:10)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async SequentialHandler.runRequest (/home/anonxpro/Downloads/DiscordEmailBot/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:398:20)
    at async SequentialHandler.queueRequest (/home/anonxpro/Downloads/DiscordEmailBot/node_modules/@discordjs/rest/src/lib/handlers/SequentialHandler.ts:168:11)
    at async _REST.request (/home/anonxpro/Downloads/DiscordEmailBot/node_modules/@discordjs/rest/src/lib/REST.ts:211:20)
    at async GuildManager.fetch (/home/anonxpro/Downloads/DiscordEmailBot/node_modules/discord.js/src/managers/GuildManager.js:272:20)
    at async MainStorage.setDataAfterLogin (/home/anonxpro/Downloads/DiscordEmailBot/src/mainStorage.ts:44:18) {
  requestBody: { files: undefined, json: undefined },
  rawError: { message: 'Unknown Guild', code: 10004 },
  code: 10004,
  status: 404,
  method: 'GET',
  url: 'https://discord.com/api/v10/guilds/119359356********?with_counts=true'
}
Ardnozz commented 5 months ago

Hello, you have to set up your own .env file that should look like this:

TOKEN="Bot token"
CLIENT_ID="client_id"
GUILD_ID="guild ID that the bot is connected to"
ERROR_CHANNEL_ID="error channel id in guild mentioned above"

If you are sure that you've written your ids correctly, please, provide more information.

ghost commented 5 months ago

Yes, I wrote correctly in .env file.

And I don't know how to provide more information. I copy-pasted the error message from terminal.