Fequme / Moderation-bot-discord

Старый бот модерации публичного сервера (привязка под правила)
MIT License
6 stars 0 forks source link

Привет мне пишет ошибку #2

Open Diseerr opened 5 months ago

Diseerr commented 5 months ago

DeprecationWarning: sync_commands_debug is deprecated and will be removed in a future version. Use command_sync_flags with an CommandSyncFlags instance as a replacement. client = commands.Bot( Traceback (most recent call last): File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\disnake\ext\commands\common_bot_base.py", line 452, in _load_from_module_spec spec.loader.exec_module(lib) # type: ignore File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "c:\Users\corny\OneDrive\Desktop\Moderation\client\commands\moderation\action.py", line 17, in from motor.motor_asyncio import AsyncIOMotorClient as MotorClient ModuleNotFoundError: No module named 'motor'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "c:\Users\corny\OneDrive\Desktop\Moderation\bot.py", line 46, in client.load_extension(f'client.commands.moderation.{filename[:-3]}') File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\disnake\ext\commands\common_bot_base.py", line 523, in load_extension self._load_from_module_spec(spec, name) File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\disnake\ext\commands\common_bot_base.py", line 455, in _load_from_module_spec raise errors.ExtensionFailed(key, e) from e disnake.ext.commands.errors.ExtensionFailed: Extension 'client.commands.moderation.action' raised an error: ModuleNotFoundError: No module named 'motor'

zakatik1337 commented 5 months ago

DeprecationWarning: sync_commands_debug is deprecated and will be removed in a future version. Use command_sync_flags with an CommandSyncFlags instance as a replacement. client = commands.Bot( Traceback (most recent call last): File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\disnake\ext\commands\common_bot_base.py", line 452, in _load_from_module_spec spec.loader.exec_module(lib) # type: ignore File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "c:\Users\corny\OneDrive\Desktop\Moderation\client\commands\moderation\action.py", line 17, in from motor.motor_asyncio import AsyncIOMotorClient as MotorClient ModuleNotFoundError: No module named 'motor'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "c:\Users\corny\OneDrive\Desktop\Moderation\bot.py", line 46, in client.load_extension(f'client.commands.moderation.{filename[:-3]}') File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\disnake\ext\commands\common_bot_base.py", line 523, in load_extension self._load_from_module_spec(spec, name) File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\disnake\ext\commands\common_bot_base.py", line 455, in _load_from_module_spec raise errors.ExtensionFailed(key, e) from e disnake.ext.commands.errors.ExtensionFailed: Extension 'client.commands.moderation.action' raised an error: ModuleNotFoundError: No module named 'motor'

pip install motor

Diseerr commented 5 months ago

Я импортирувал и вот ещё ошибка

sync_commands_debug is deprecated and will be removed in a future version. Use command_sync_flags with an CommandSyncFlags instance as a replacement. client = commands.Bot( Traceback (most recent call last): File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\disnake\ext\commands\common_bot_base.py", line 452, in _load_from_module_spec spec.loader.exec_module(lib) # type: ignore File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "c:\Users\corny\OneDrive\Desktop\Moderation\client\commands\moderation\action.py", line 23, in cluster = MotorClient(mongo) File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\motor\core.py", line 163, in init delegate = self.delegate_class__(*args, **kwargs) File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\pymongo\mongo_client.py", line 774, in init__ res = uri_parser.parse_uri( File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\pymongo\uri_parser.py", line 547, in parse_uri nodes = dns_resolver.get_hosts() File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\pymongo\srv_resolver.py", line 140, in gethosts , nodes = self._get_srv_response_and_hosts(True) File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\pymongo\srv_resolver.py", line 120, in _get_srv_response_and_hosts results = self._resolve_uri(encapsulate_errors) File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\pymongo\srv_resolver.py", line 114, in _resolve_uri raise ConfigurationError(str(exc)) from None pymongo.errors.ConfigurationError: The DNS query name does not exist: _mongodb._tcp.cluster0.vtarm7s.mongodb.net.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "c:\Users\corny\OneDrive\Desktop\Moderation\bot.py", line 46, in client.load_extension(f'client.commands.moderation.{filename[:-3]}') File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\disnake\ext\commands\common_bot_base.py", line 523, in load_extension self._load_from_module_spec(spec, name) File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\disnake\ext\commands\common_bot_base.py", line 455, in _load_from_module_spec raise errors.ExtensionFailed(key, e) from e disnake.ext.commands.errors.ExtensionFailed: Extension 'client.commands.moderation.action' raised an error: ConfigurationError: The DNS query name does not exist: _mongodb._tcp.cluster0.vtarm7s.mongodb.net.

zakatik1337 commented 5 months ago

Я импортирувал и вот ещё ошибка

sync_commands_debug is deprecated and will be removed in a future version. Use command_sync_flags with an CommandSyncFlags instance as a replacement. client = commands.Bot( Traceback (most recent call last): File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\disnake\ext\commands\common_bot_base.py", line 452, in _load_from_module_spec spec.loader.exec_module(lib) # type: ignore File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "c:\Users\corny\OneDrive\Desktop\Moderation\client\commands\moderation\action.py", line 23, in cluster = MotorClient(mongo) File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\motor\core.py", line 163, in init delegate = self.delegate_class(*args, kwargs) File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\pymongo\mongo_client.py", line 774, in init** res = uri_parser.parse_uri( File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\pymongo\uri_parser.py", line 547, in parse_uri nodes = dns_resolver.get_hosts() File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\pymongo\srv_resolver.py", line 140, in gethosts , nodes = self._get_srv_response_and_hosts(True) File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\pymongo\srv_resolver.py", line 120, in _get_srv_response_and_hosts results = self._resolve_uri(encapsulate_errors) File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\pymongo\srv_resolver.py", line 114, in _resolve_uri raise ConfigurationError(str(exc)) from None pymongo.errors.ConfigurationError: The DNS query name does not exist: _mongodb._tcp.cluster0.vtarm7s.mongodb.net.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "c:\Users\corny\OneDrive\Desktop\Moderation\bot.py", line 46, in client.load_extension(f'client.commands.moderation.{filename[:-3]}') File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\disnake\ext\commands\common_bot_base.py", line 523, in load_extension self._load_from_module_spec(spec, name) File "C:\Users\corny\AppData\Roaming\Python\Python310\site-packages\disnake\ext\commands\common_bot_base.py", line 455, in _load_from_module_spec raise errors.ExtensionFailed(key, e) from e disnake.ext.commands.errors.ExtensionFailed: Extension 'client.commands.moderation.action' raised an error: ConfigurationError: The DNS query name does not exist: _mongodb._tcp.cluster0.vtarm7s.mongodb.net.

mongo db подключил?

Diseerr commented 5 months ago

извиняюсь что долго не отвечал, я только-что недавно исправил ошибку

CiL2951 commented 3 months ago

C:\Users\c\Desktop\moder-staf\bot.py:20: DeprecationWarning: sync_commands_debug is deprecated and will be removed in a future version. Use command_sync_flags with an CommandSyncFlags instance as a replacement. client = commands.Bot( ←SweetNess ←COGS: ←[38;5;105maction←has been loaded ←SweetNess ←COGS: ←[38;5;105mhistory←has been loaded ←SweetNess ←COGS: ←[38;5;105mstats←has been loaded Traceback (most recent call last): File "C:\Users\Desktop\moder-staf\bot.py", line 57, in client.run(config.SWEETNESS[""])


KeyError: ''