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

BlockBot doesn't come online; throws 403 Forbidden Missing Access null #41

Open
Reimnop opened this issue Feb 21, 2022 · 6 comments
Open

Comments

@Reimnop
Copy link

Reimnop commented Feb 21, 2022

I was trying to setup BlockBot but no matter what I do, it doesn't work and keeps throwing 403 Forbidden.
Bot token is correct, guild id is correct, channel id is correct, I have GUILD_MEMBERS intent, application.commands and administrator.
Build 2.0.0-beta
I don't know what to do. Can anyone help?

[22:11:16] [DefaultDispatcher-worker-1/ERROR]: Uncaught exception in thread "DefaultDispatcher-worker-1"
io.github.quiltservertools.blockbotdiscord.libs.dev.kord.rest.request.KtorRequestException: REST request returned an error: 403 Forbidden  Missing Access null
        at io.github.quiltservertools.blockbotdiscord.libs.dev.kord.rest.request.KtorRequestHandler.handle(KtorRequestHandler.kt:62) ~[blockbot-discord-2.0.0-beta.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.dev.kord.rest.request.KtorRequestHandler$handle$1.invokeSuspend(KtorRequestHandler.kt) ~[blockbot-discord-2.0.0-beta.jar:?]
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) [org_jetbrains_kotlin_kotlin-stdlib-1.6.10-cf953ebebc036e3.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:191) [blockbot-discord-2.0.0-beta.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:147) [blockbot-discord-2.0.0-beta.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15) [blockbot-discord-2.0.0-beta.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:93) [blockbot-discord-2.0.0-beta.jar:?]
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) [org_jetbrains_kotlin_kotlin-stdlib-1.6.10-cf953ebebc036e3.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:191) [blockbot-discord-2.0.0-beta.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:147) [blockbot-discord-2.0.0-beta.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15) [blockbot-discord-2.0.0-beta.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:93) [blockbot-discord-2.0.0-beta.jar:?]
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) [org_jetbrains_kotlin_kotlin-stdlib-1.6.10-cf953ebebc036e3.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:191) [blockbot-discord-2.0.0-beta.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:147) [blockbot-discord-2.0.0-beta.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15) [blockbot-discord-2.0.0-beta.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:93) [blockbot-discord-2.0.0-beta.jar:?]
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) [org_jetbrains_kotlin_kotlin-stdlib-1.6.10-cf953ebebc036e3.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:191) [blockbot-discord-2.0.0-beta.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:147) [blockbot-discord-2.0.0-beta.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15) [blockbot-discord-2.0.0-beta.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:93) [blockbot-discord-2.0.0-beta.jar:?]
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) [org_jetbrains_kotlin_kotlin-stdlib-1.6.10-cf953ebebc036e3.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(SuspendFunctionGun.kt:191) [blockbot-discord-2.0.0-beta.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:147) [blockbot-discord-2.0.0-beta.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.io.ktor.util.pipeline.SuspendFunctionGun.access$loop(SuspendFunctionGun.kt:15) [blockbot-discord-2.0.0-beta.jar:?]
        at io.github.quiltservertools.blockbotdiscord.libs.io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(SuspendFunctionGun.kt:93) [blockbot-discord-2.0.0-beta.jar:?]
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) [org_jetbrains_kotlin_kotlin-stdlib-1.6.10-cf953ebebc036e3.jar:?]
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) [org_jetbrains_kotlinx_kotlinx-coe-jvm-1.5.2-83ec1384e22258cd.jar:?]
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) [org_jetbrains_kotlinx_kotlinx-coe-jvm-1.5.2-83ec1384e22258cd.jar:?]
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) [org_jetbrains_kotlinx_kotlinx-coe-jvm-1.5.2-83ec1384e22258cd.jar:?]
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) [org_jetbrains_kotlinx_kotlinx-coe-jvm-1.5.2-83ec1384e22258cd.jar:?]
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665) [org_jetbrains_kotlinx_kotlinx-coe-jvm-1.5.2-83ec1384e22258cd.jar:?]
@Reimnop
Copy link
Author

Reimnop commented Feb 21, 2022

My config, if that is required

[bot]
# Discord Bot token
token = "Redacted"
# Discord guild/server id
guild = 945301763085447228

    # Channel IDs for the bot to use. Only the `chat` channel is required, others can be added or deleted
    [bot.channels]
    # Chat relay channel
    chat = 945301763085447231
    # Console relay channel (can be deleted)
    # console =

[ChatRelay]
# Allow minecraft chat to mention/ping users and roles
allowMentions = true
# Convert discord formatting to minecraft formatting
convertMarkdown = true
# Try to escape player markdown sent in game
escapeIngameMarkdown = false

[ChatRelay.MinecraftFormat]
# Discord -> Minecraft message format
# Placeholders: {sender}, {sender_colored}, {top_role}, {message}
# Supports Simplified Text Format and Placeholder API with server context
messageFormat = "<color:#7289DA>Discord</color> <dark_gray>|</dark_gray> {sender_colored} <dark_gray>»</dark_gray> {message}"
# Discord -> Minecraft reply format
# Placeholders: {sender}, {summary}
# Supports Simplified Text Format and Placeholder API with server context
replyFormat = "<gray>(Replying to @{sender}: {summary})</gray>"
# Try to add images to messages
appendImages = false
# Use image interpolation
imageInterpolation = false

    # Used when not using Webhook
    [ChatRelay.DiscordMessageFormat]

    # Placeholders: {sender}, {sender_display}, {message}
    # Supports discord markdown and Placeholder API with player context
    # Minecraft -> Discord message format
    messageFormat = "{sender_display} » {message}"
    # Minecraft -> Discord annoucement format (/say)
    announcementFormat = "{sender_display} » **{message}**"
    # Minecraft -> Discord emote format (/me)
    emoteFormat = "*{sender_display} {message}*"

    # Supports discord markdown and Placeholder API with player context
    playerJoin = "%player:displayname% joined the game"
    playerLeave = "%player:displayname% left the game"
    # Placeholders: {message}
    playerDeath = "{message}"
    # Placeholders: {advancement}
    playerAdvancement = "%player:displayname% has made the advancement [{advancement}]"

    serverStart = ":green_circle: Server Started"
    serverStop = ":octagonal_sign: Server Stopped"

    [ChatRelay.Webhook]
    # Use a webhook (less compact) to display player names and avatars
    useWebhook = true
    # Name of the webhook for messages not from players
    webhookName = "Server"
    # URL for the webhook avatar for messages not from players
    webhookAvatar = "https://i.imgur.com/IxPg1R2.png"
    # URL to get the webhook avatar from for players
    playerAvatarUrl = "https://cravatar.eu/helmavatar/{uuid}/128.png?{texture}"

    # Placeholders: {sender}, {sender_display}, {message}
    # Supports discord markdown and Placeholder API with player context
    # Used when using Webhook
    [ChatRelay.DiscordWebhookFormat]
    messageFormat = "{message}"
    announcementFormat = "**{message}**"
    emoteFormat = "*{sender} {message}*"
    # Placeholders: {sender}, {sender_display}
    authorFormat = "{sender}"

[ConsoleRelay]
# Format to use for the console relay
pattern = "[%level] (%logger{1}) %msg%n"
# Minium logger level to show in the console relay. OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE, ALL
minLevel = "INFO"
# Require administator on discord to use console
requireAdmin = true

[InlineCommands]
# Enables the /mc discord slash command to run in game commands from discord
enabled = true
# Comma seperated list of the role ID's allowed to use the command
allowedRoles = []
# OP permission level to restrict commands
opLevel = 3

[Presence]
# The type of presence. Can be "Game", "Listening", "Watching", "Competing"
# Updates every 400 ticks (20 seconds)
activityType = "Game"
activityText = "Minecraft | %server:online%/%server:max_players%"

[MemberCommands]
# Enables the /playerlist discord slash command to get the players online
playerList = true
# Enables the /whitelist discord slash command to allow discord users to whitelist players
whitelist = false

[Linking]
# Enable account linking between Minecraft and discord. Enables /link in game and in discord
enabled = false
# Requires a linked account to join (Like a whitelist) Shows linking code on disconnect screen
requireLinking = false
# Sync the linked users discord nickname to their minecraft username
nicknameSync = false
# Comma seperated list of role ID's allowed to join the server. Leave blank to allow any linked account to join. Also restricts /link command in discord
requiredRoles = []
# Require linked players to be in the main discord
requireInServer = false
# Message to show when linked players try to join without the required role
requiredRoleDisconnectMessage = "<red>You don't have the required discord role to join"
# Message to show when unlinked players try to join and requireLinking is true
unlinkedDisconnectMessage = [
    "<yellow>A linked Discord account is required to join",
    "<yellow>Use <gray>/link</gray> in discord to link your account",
    "<gray>Link Code: <green><bold>{code}",
    "<gray>Discord: <blue><underline>discord.gg/INVITECODE"
]
# Message to inform players they must be in the discord server to join
notInServerMessage = "<red>You must be in the discord server to join"
    # Messages for the /link minecraft and discord commands
    [Linking.Messages]
    noLinkedAccounts = "<red>There are no matching linked accounts"
    alreadyLinked = "<red>This account is already linked to <blue>{user}"
    failedUnlink = "<red>Failed to unlink these accounts!"
    successfulUnlink = "<blue>Successfully unlinked your account"
    successfulLink = "Account successfully linked to: {player}"
    linkCode = "<blue>Link your account with <gray>/link</gray> in discord. Code: <green><bold>{code}"

@Reimnop
Copy link
Author

Reimnop commented Feb 21, 2022

Curiously, the exact same server configuration works flawlessly on my other PC.

@PotatoPresident
Copy link
Member

That error generally means your missing the application.commands scope. Maybe double check and reinvite it?

@Reimnop
Copy link
Author

Reimnop commented Feb 21, 2022

That error generally means your missing the application.commands scope. Maybe double check and reinvite it?

Thank you for your response. Unfortunately I've double checked it many times, reinvited it with application.commands and it still doesn't work.
The exact same server configuration running on the exact same bot token works perfectly fine on my laptop.

@Reimnop
Copy link
Author

Reimnop commented Feb 21, 2022

This is what happens when I run the server on my laptop
image

@object-Object
Copy link

This error also occurs if the bot doesn't have the Manage Webhooks permission, because it always creates a webhook even if you disable the useWebhook option.
(I know this is a necro, but I also encountered this issue and it might help other people finding 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

3 participants