#'discord' has no attribute'Bot' (RESOLVED)
1 messages · Page 1 of 1 (latest)
import discord
import asyncio
import os
from dotenv import load_dotenv
from commands.simplecommands import simple_infos
from commands.vc import tempVC
from commands.studysystem import register, profile, coinsystem
from commands.pomodoro import pomodoro
load_dotenv() # Load environment variables
# Function to run first bot (General commands bot)
async def run_bot1():
intents1 = discord.Intents.default()
intents1.message_content = True # Enable message content if needed
bot = discord.Bot(intents=intents1)
simple_infos(bot)
register(bot)
profile(bot)
coinsystem(bot)
pomodoro(bot)
@bot.event
async def on_ready():
print(f"{bot.user} (Bot 1) is ready and online!")
await bot.start(os.getenv('TOKEN')) # Start bot 1
# Function to run second bot (VC bot)
async def run_bot2():
intents2 = discord.Intents.default()
intents2.voice_states = True # Required for voice events
vcbot = discord.Bot(intents=intents2)
tempVC(vcbot)
@vcbot.event
async def on_ready():
print(f"{vcbot.user} (VC Bot) is ready and online!")
await vcbot.start(os.getenv('TOKEN2')) # Start bot 2
# Run both bots asynchronously
async def main():
await asyncio.gather(run_bot1(), run_bot2())
if __name__ == "__main__":
asyncio.run(main())
I wanted to run 2 bots so uhh
Can you show the pip list pls
pip freeze right
aiohttp 3.9.5
aiosignal 1.3.1
anyio 4.8.0
attrs 23.2.0
aw-client 0.5.15
aw-core 0.5.17
aw-watcher-spotify 0.3.0
build 1.2.2.post1
CacheControl 0.14.2
certifi 2024.8.30
charset-normalizer 3.3.2
cleo 2.1.0
click 8.1.8
colorama 0.4.6
crashtest 0.4.1
deprecation 2.1.0
distlib 0.3.9
dnspython 2.6.1
dulwich 0.22.7
fastjsonschema 2.21.1
ffmpeg-python 0.2.0
filelock 3.13.1
findpython 0.6.2
frozenlist 1.4.1
fsspec 2024.2.0
future 1.0.0
h11 0.14.0
httpcore 1.0.7
httpx 0.28.1
idna 3.7
imageio-ffmpeg 0.6.0
installer 0.7.0
iso8601 2.1.0
jaraco.classes 3.4.0
jaraco.context 6.0.1
jaraco.functools 4.1.0
Jinja2 3.1.3
jsonschema 4.23.0
jsonschema-specifications 2024.10.1
keyring 25.6.0
MarkupSafe 2.1.5
more-itertools 10.6.0
msgpack 1.1.0
multidict 6.0.5
networkx 3.2.1
numpy 2.0.1
packaging 24.2
pbs-installer 2025.2.12
peewee 3.17.9
persist-queue 1.0.0
pillow 10.2.0
pip 25.0.1
pkginfo 1.12.1.2
platformdirs 3.10.0
poetry 2.1.1
poetry-core 2.1.1
praw 7.8.1
prawcore 2.4.0
psutil 6.1.1
py-cord 2.6.1
pycolorise 1.0.0
PyGetWindow 0.0.9
pymongo 4.8.0
pyproject_hooks 1.2.0
PyRect 0.2.0
python-dotenv 1.0.1
pywin32 308
pywin32-ctypes 0.2.3
RapidFuzz 3.12.1
redis 5.0.8
referencing 0.36.2
requests 2.32.3
requests-toolbelt 1.0.0
rfc3339-validator 0.1.4
rpds-py 0.22.3
setuptools 70.0.0
shellingham 1.5.4
six 1.17.0
sniffio 1.3.1
spotipy 2.24.0
strict-rfc3339 0.7
sympy 1.12
tabulate 0.9.0
timeslot 0.1.2
tomlkit 0.13.2
torch 2.4.1+cu118
torchaudio 2.4.1+cu118
torchvision 0.19.1+cu118
tqdm 4.67.1
trove-classifiers 2025.2.18.16
typing_extensions 4.12.2
update-checker 0.18.0
urllib3 2.2.2
utils 1.0.2
virtualenv 20.29.2
watchdog 6.0.0
websocket-client 1.8.0
yarl 1.9.4
zstandard 0.23.0
try uninstalling and reinstalling py-cord
Also restart your IDE
.close
Done with your help thread?
Please close your own help thread by using </close:1009144375709814897> with @tribal girder.