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

Slash Command not appearing #19

Open
Insidiouso opened this issue Apr 2, 2023 · 2 comments
Open

Slash Command not appearing #19

Insidiouso opened this issue Apr 2, 2023 · 2 comments

Comments

@Insidiouso
Copy link

I managed to get the bot to join the server and be online but now my issues is that the slash command do not appear

@Insidiouso
Copy link
Author

I also edited the original code since it did not work for me
here it is:

import discord
from discord.ext import commands
import json
import os

with open("config.json", "r") as f:
config = json.load(f)

intents = discord.Intents.all()
client = discord.Client(intents=intents)

bot = commands.Bot(command_prefix = config["prefix"],intents=intents
)
bot.remove_command("help")

for file in os.listdir("./cogs"):
if file.endswith(".py"):
name = file[:-3]
bot.load_extension(f"cogs.{name}")

@bot.event
async def on_ready():
print(f"Bot is online")
await bot.change_presence(activity=discord.Game(name="big brain | =help"))

try:
bot.run(config["token"])
except Exception as err:
print(f"Error: {err}")

@lewynd
Copy link

lewynd commented May 9, 2023

Hey did u find the answer to this ?

Im having the same issue

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

2 participants