discord.errors.HTTPException: 401 Unauthorized (error code: 0): 401: Unauthorized - When trying to launch Discord bot

Viewed 32

I am trying to bring my Discord bot online and I am getting this error. I had it working previously but the new update to Discord.py seems to have caused it to throw this error.

import discord
from discord.ext import commands
import datetime
from datetime import datetime
from config import *
from game import *

bot = commands.Bot(intents=discord.Intents.all(), command_prefix=PREFIX, description="Test Bot for discord.py")


# Heart beat bot event
@bot.event
async def on_ready():
    print("I am alive!")

bot.run(TOKEN, reconnect=True)
0 Answers
Related