My bot was working just fine (slash commands and prefixed commands at once) but after reinstalling my OS I had to reinstall my IDE as well (pycharm). So i created new virtual environment for my project, and installed all packages that I was using including pycord and it isn't working anymore.
Should I have discord.py or discord.ext installed alongside pycord, because i don't recall having it on my old venv.?
The important parts of code that I've tried:
import discord
from discord.ext import commands
import datetime
intents = discord.Intents.default()
bot = commands.Bot(command_prefix=commands.when_mentioned_or("!"), case_insensitive=True, intents=intents,
debug_guilds=["956899584716718101", "756115812443619357"])
@bot.command()
async def time(ctx):
"""Shows current time"""
t = datetime.datetime.now()
await ctx.respond(f"Time is: {t.hour:02d}:{t.minute:02d}:{t.second:02d} {t.day:02d}.{t.month:02d}.{t.year}")
load_dotenv()
TOKEN = os.getenv('DISCORD_TOKEN')
bot.run(TOKEN)