Open Bas-Korver opened 2 years ago
Did you fill out a correct .venv file?
I tried 3 different .env configurations:
TOKEN='OTQ2MzE5OTgxMDMxODY2Mzg4.Yhc_KQ.Q-GkCMqFzcMV6gaLLHhBZKWyKXY'
CHANNEL_NEWS_ID=946321733428858892
CHANNEL_BINNENLAND_ID=946322028640759818
CHANNEL_BUITENLAND_ID=946322045711568997
TOKEN='OTQ2MzE5OTgxMDMxODY2Mzg4.Yhc_KQ.Q-GkCMqFzcMV6gaLLHhBZKWyKXY'
CHANNEL_NEWS_ID=946321733428858892
and
TOKEN=OTQ2MzE5OTgxMDMxODY2Mzg4.Yhc_KQ.Q-GkCMqFzcMV6gaLLHhBZKWyKXY
CHANNEL_NEWS_ID=946321733428858892
CHANNEL_BINNENLAND_ID=946322028640759818
CHANNEL_BUITENLAND_ID=946322045711568997
CHANNEL_SPORTS_ID=946322045711568997
CHANNEL_REGIONAAL_ID=946322045711568997
CHANNEL_POLITIEK_ID=946322045711568997
CHANNEL_ECONOMIE_ID=946322045711568997
CHANNEL_KONINGSHUIS_ID=946322045711568997
CHANNEL_TECH_ID=946322045711568997
CHANNEL_CULTUUR_ID=946322045711568997
CHANNEL_OPMERKELIJK_ID=946322045711568997
All of them result in the same error. (The 'TOKEN' in the examples above are just placeholders, in the real .env I have the correct token)
It's probably the elections channel. Let me know if 87a8d0ecb18c5b2b98130082fd07b11393572d4b fixed it.
Edit: 808f994708139ab19465452c604c257711ca4cd4 should fix it (forgot to commit a file)
Unfortunately, that didn't fix my problem, but I think I found what the problem is.
in BotManager.ts message.crosspost()
is used which publishes a message in an announcement channel to all channels following it. But that means that the channel to which the bot is configured to send messages has to be a news channel.
I tried making that command conditional with an if statement like is example, but because typeguards are used, that if statement creates an error that says: the if statement wouldn't work because it will always be a "TextChannel".
But when I print the .type
of that channel it returns "news" when it is a news channel even though a "TextChannel" typeguard is used.
When running the bot in wsl ubuntu I get the error
DiscordAPIError: Missing Access
, I gave the bot administrator permission and the application.commands scope.Start-up and error message:
package-lock.txt