Discord.py set botstatus without type

Question:

While I check if my code worked and my bot has the new status I just saw the bot YAGPDB.xyz#8760 has no type set. Now I wonder if and how it worksin in ```Discord.py``

Thx to everyone who helps :smiley:

Hey @Babychaosfloh!

Can you provide a link to your Repl so we can take a look at your problem?

import discord

from keep_alive import keep_alive

from discord import app_commands

intents = discord.Intents.default()
client = discord.Client(intents=intents)
tree = app_commands.CommandTree(client)


@tree.command(
    name="kick",
    description="Kicks a User",
    guild=discord.Object(id=GUILD_ID)
  
)
async def kick(ctx: discord.Interaction, users: discord.User, reason: str):
  if not reason:
        await ctx.response.send_message("Please provide a reason for kicking the user.")
  elif ctx.user.guild_permissions.kick_members:
        await users.kick(reason=reason)
        text = discord.Embed(
            title=f"@{users} has been kicked!",
            description=f"Kicked by: @{ctx.user}\nReason: {reason}",
            color=discord.Color.red()
        )
        await ctx.response.send_message(embed=text)




@client.event
async def on_ready():
  await client.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name='You'))
    
  await tree.sync(guild=discord.Object(id=GUILD_ID))
  print("🥇Ready!")
  print('Connected to bot: {}'.format(client.user.name))
  print('Bot ID: {}'.format(client.user.id))


client.run("BOT_TOKEN")

#print('Bot has Crashed')

Hello @Babychaosfloh!

Pingers like keep-alive do not work on Replit anymore. Instead, use a Reserved VM > Background worker deployment.

2 Likes