0

I want to create a Discord bot using Python for my server. I read the documentation of discord.py and tried to run the sample posted there. The code is running, but don't know why I have this warning "unresolved import discord.ext.tasks". Tried with Python 3.7 and got none of the packages imported. Anyone can help me solving that?

the error + code (photo)

baoke03
  • 1
  • 3
  • 1
    The answer to this question already exists. See https://stackoverflow.com/questions/53939751/pylint-unresolved-import-error-in-visual-studio-code – robinsax May 10 '20 at 22:28
  • One more thing, always include the code here and try to not attach screenshots of the code. – ChaoticNebula Sep 25 '21 at 09:57

2 Answers2

0

Do not use visual studio 2019 it cant import discord.ext correctly, I had the same issue use Visual Studio Code

Blo
  • 17
  • 3
0

Don't use

from discord.ext import commands

Instead use

from discord.ext import tasks, commands
Syhmac
  • 1