column01 / discord-moderation-bot Goto Github PK
View Code? Open in Web Editor NEWModular Moderation bot for Discord
Modular Moderation bot for Discord
Why not @ mentions instead of user id's.
It would be more convenient for moderators to use @ mentions while doing the commands.
Eg: !tempmute @ricardo#9898 5s
its only tempban lol fix it
it is showing main.py not found as the error and there is no main.py
When I try running it, I receive this error:
File "main.py", line 6, in <module>
from tasks.check_punishments import check_punishments
ModuleNotFoundError: No module named 'tasks.check_punishments'
Traceback (most recent call last):
File "C:\Users\lazyn\Desktop\Discord-Moderation-Bot-master\bot.py", line 153, in
intents.message_content = True
^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Intents' object has no attribute 'message_content'
\Discord-Moderation-Bot-master\Discord-Moderation-Bot-master\bot.py", line 155, in
bot.run(token)
File "C:\Users\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\client.py", line 723, in run
return future.result()
File "C:\Users\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\client.py", line 702, in runner
await self.start(*args, **kwargs)
File "C:\Users\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\client.py", line 665, in start
await self.login(*args, bot=bot)
File "C:\Users\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\client.py", line 511, in login
await self.http.static_login(token.strip(), bot=bot)
File "C:\Users\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\discord\http.py", line 304, in static_login
raise LoginFailure('Improper token has been passed.') from exc
discord.errors.LoginFailure: Improper token has been passed.
Exception ignored in: <function _ProactorBasePipeTransport.del at 0x0000022EA815E700>
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\asyncio\proactor_events.py", line 116, in del
self.close()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\asyncio\proactor_events.py", line 108, in close
self._loop.call_soon(self._call_connection_lost, None)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 751, in call_soon
self._check_closed()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 515, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
Hello,
I have tested the bot, and noticed that once i added a role id to the mod_roles, the user ( not admin ) who has that role receives a " You must be a moderator to use this command. ".
I'm not sure if this is active but if it is...
Can someone give a brief explanation of how the storage system works. I planned to have a storage system where different things are stored in different json files but this appears to all be in one and i'm not quite sure how this works/how to use it.
Thanks.
how do I run it and where do I put the token??
Where shall i put the bot token in order to run the code?
also do i need to create json files for storage?
I have this error can you help me ?
File "E:\Claquetteria\Discord-Bot-Template\Claquetteria-Moderation\bot.py", line 154, in <module> bot = ModerationBot() File "E:\Claquetteria\Discord-Bot-Template\Claquetteria-Moderation\bot.py", line 48, in __init__ discord.Client.__init__(self) TypeError: Client.__init__() missing 1 required keyword-only argument: 'intents'
I get this error:
Initializing the command registry handler. This does not start registering commands!
Registering commands...
The bot has been initialized with the following commands: ban, unban, mod, mute, tempmute, unmute, reload, rl
Initializing the event registry handler. This does not start registering events!
Registering events...
Traceback (most recent call last):
File "C:\Users\XXXX\Bot\bot.py", line 155, in
bot = ModerationBot(intents)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\XXXX\Bot\bot.py", line 32, in init
self.event_registry.register_events()
File "C:\Users\XXXX\Bot\event_registry.py", line 89, in register_events
setattr(self.instance, event_name, asyncio.coroutine(functools.partial(self.instance.event_template, event_name=event_name)))
^^^^^^^^^^^^^^^^^
AttributeError: module 'asyncio' has no attribute 'coroutine'. Did you mean: 'coroutines'?
2021-05-09T06:59:47.600228+00:00 heroku[worker.1]: Starting process with command `python main.py`
2021-05-09T06:59:48.518755+00:00 heroku[worker.1]: State changed from starting to up
2021-05-09T06:59:51.874503+00:00 heroku[worker.1]: Process exited with status 1
2021-05-09T06:59:51.969495+00:00 heroku[worker.1]: State changed from up to crashed
2021-05-09T06:59:51.778506+00:00 app[worker.1]: Initializing the command registry handler. This does not start registering commands!
2021-05-09T06:59:51.778760+00:00 app[worker.1]: Traceback (most recent call last):
2021-05-09T06:59:51.778761+00:00 app[worker.1]: File "/app/main.py", line 180, in <module>
2021-05-09T06:59:51.778945+00:00 app[worker.1]: bot = ModerationBot()
2021-05-09T06:59:51.778949+00:00 app[worker.1]: File "/app/main.py", line 23, in __init__
2021-05-09T06:59:51.779100+00:00 app[worker.1]: from command_registry import registry
2021-05-09T06:59:51.779101+00:00 app[worker.1]: File "/app/command_registry.py", line 94, in <module>
2021-05-09T06:59:51.779256+00:00 app[worker.1]: registry = CommandRegistry()
2021-05-09T06:59:51.779257+00:00 app[worker.1]: File "/app/command_registry.py", line 16, in __init__
2021-05-09T06:59:51.779456+00:00 app[worker.1]: self.get_py_files(overwrite=True)
2021-05-09T06:59:51.779484+00:00 app[worker.1]: File "/app/command_registry.py", line 46, in get_py_files
2021-05-09T06:59:51.779713+00:00 app[worker.1]: from bot import __location__
2021-05-09T06:59:51.779816+00:00 app[worker.1]: ModuleNotFoundError: No module named 'bot'
Originally posted by davidavidavi123 December 28, 2021
um i just downloaded the bot, and trying to run it, but i get the error:
Initializing the command registry handler. This does not start registering commands!
Registering commands...
Traceback (most recent call last):
File "C:\Users\23740\Downloads\Discord-Moderation-Bot-master\Discord-Moderation-Bot-master\bot.py", line 154, in
bot = ModerationBot()
self.registry.register_commands()
File "C:\Users\23740\Downloads\Discord-Moderation-Bot-master\Discord-Moderation-Bot-master\command_registry.py", line 75, in register_commands
command_module = importlib.import_module("commands.{}".format(fname))
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\importlib_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in call_with_frames_removed
File "C:\Users\23740\Downloads\Discord-Moderation-Bot-master\Discord-Moderation-Bot-master\commands\ban.py", line 6, in
from helpers.embed_builder import EmbedBuilder
ModuleNotFoundError: No module named 'helpers.embed_builder'
PS C:\Users\23740\Downloads\Discord-Moderation-Bot-master\Discord-Moderation-Bot-master> python3 bot.py
Initializing the command registry handler. This does not start registering commands!
Registering commands...
Traceback (most recent call last):
File "C:\Users\23740\Downloads\Discord-Moderation-Bot-master\Discord-Moderation-Bot-master\bot.py", line 154, in
bot = ModerationBot()
File "C:\Users\23740\Downloads\Discord-Moderation-Bot-master\Discord-Moderation-Bot-master\bot.py", line 25, in init
self.registry.register_commands()
File "C:\Users\23740\Downloads\Discord-Moderation-Bot-master\Discord-Moderation-Bot-master\command_registry.py", line 75, in register_commands
command_module = importlib.import_module("commands.{}".format(fname))
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.0_x64__qbz5n2kfra8p0\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "C:\Users\23740\Downloads\Discord-Moderation-Bot-master\Discord-Moderation-Bot-master\commands\ban.py", line 6, in
from helpers.embed_builder import EmbedBuilder
ModuleNotFoundError: No module named 'helpers.embed_builder'
i think the helpers file is not importing correctly, pls help
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.