aternosorg / modbot Goto Github PK
View Code? Open in Web Editor NEWAn open source moderation bot with advanced features developed by Aternos.
License: MIT License
An open source moderation bot with advanced features developed by Aternos.
License: MIT License
Hi, im trying to run the code but i dont know where i can change the bot token
Does anyone know the possible causes of this issue?
pi@raspberrypi:~/Desktop/modbot $ node index.js
./commands/settings/PrefixCommand.js doesn't support slash commands!
./commands/user/DeleteCommandsCommand.js doesn't support slash commands!
./commands/utility/ImportCommand.js doesn't support slash commands!
Connected!
Loading slash commands!
DiscordAPIError: Missing Access
at RequestHandler.execute (/home/pi/Desktop/modbot/node_modules/discord.js/src/rest/RequestHandler.js:350:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (/home/pi/Desktop/modbot/node_modules/discord.js/src/rest/RequestHandler.js:51:14)
at async GuildApplicationCommandManager.set (/home/pi/Desktop/modbot/node_modules/discord.js/src/managers/ApplicationCommandManager.js:146:18)
at async Bot._loadSlashCommands (/home/pi/Desktop/modbot/src/Bot.js:134:13)
at async Promise.all (index 2)
at async Bot.start (/home/pi/Desktop/modbot/src/Bot.js:64:9) {
method: 'put',
path: '/applications/939187322476437525/guilds/702883639574396969/commands',
code: 50001,
httpStatus: 403,
requestData: {
json: [
[Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object]
],
files: []
}
}
pi@raspberrypi:~/Desktop/modbot $
Hi there aternos team,
I was gonna use this bot in my server but it isn't verified so I cant add it to my server because the 100 un-verified slots are taken up, if you do verify it than infinite servers can use it.
have a good day,
Krissy
Muted role command won’t work for me and it gives me errors, what do I do? I’m probably doing it wrong so I need assistance. I tried !mutedrole create [id] but it didn’t work. !mutedrole enable isn’t a command. !mutedrole disable is though. Please help me.
Well i cant the file that provides the invite command i tried doing a file search but still cant find it
It could be cool if the badword logs sent in another channel. For not mixing it with the mod actions like mute, bans, etc.
I noticed that you cannot turn off the linkcooldown feature. This problem dosen't apply on the others automod settings.
I've been looking around, Most bots have slash commands and prefixes. And ModBot doesn't have /prefix, Is there any way to add a prefix?
Error: Cannot find module '../config.json'
This time the error appeared on the ping command.
!help ping (ik it's useless since everyone should know what this type of command do).
And on the logchannel one (this one without input)
!logchannel
proof
Hello, im pretty new with Node.js and in general with Discord bots, so i tried to learn from ModBot since i really want to make my own bot. I followed all the steps from the intall guide but it still not working... I dont know wy here is the error log. (I also installed Discord.js)
internal/modules/cjs/loader.js:969
throw err;
^
Error: Cannot find module 'C:\Users\alumne\downloads\modbot-master\bot.js'
�[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)�[39m
�[90m at Function.Module._load (internal/modules/cjs/loader.js:842:27)�[39m
�[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)�[39m
�[90m at internal/main/run_main_module.js:17:47�[39m {
code: �[32m'MODULE_NOT_FOUND'�[39m,
requireStack: []
}
Help
How to change the status of the bot?
like watching you to a custom one?
:)
When using Citizens plugin and Sentinel plugins to get NPCs that attack other mobs (1.19.2, latest versions of plugins) Sentinel plugin is broken. The same goes for 1.19 and 1.19.1. Latest Paper version.
Citizens2: https://aternos.org/addons/a/artemis-bukkit/citizens (2.0.30)
Sentinel: https://aternos.org/addons/a/spigot/22017 (2.6.5)
this issue is directly related to the 2 weeks old messages. (bots cannot ddelete them).
btw the bot output had an error when he tried to delete messages in an empty channel or a channel were the most recent messages was at least 2 weeks old.
i also self-hosted the bot, but when i tried to fix the issue i failed.
log output below.
Like ModBot, add description to show what it does
i updated my instance of the bot by downloading it directly from here, but when i have done my tests i found out a strange error with the command lock, both the global/id/argument give the same result.
An error occurred while executing command lock: Error: ER_BAD_FIELD_ERROR: Unknown column 'guildid' in 'field list' at Query.Sequence._packetToError (C:\Users\salvi\Desktop\discord bots\modbot-master\node_modules\mysql\lib\protocol\sequences\Sequence.js:47:14) at Query.ErrorPacket (C:\Users\salvi\Desktop\discord bots\modbot-master\node_modules\mysql\lib\protocol\sequences\Query.js:79:18) at Protocol._parsePacket (C:\Users\salvi\Desktop\discord bots\modbot-master\node_modules\mysql\lib\protocol\Protocol.js:291:23) at Parser._parsePacket (C:\Users\salvi\Desktop\discord bots\modbot-master\node_modules\mysql\lib\protocol\Parser.js:433:10) at Parser.write (C:\Users\salvi\Desktop\discord bots\modbot-master\node_modules\mysql\lib\protocol\Parser.js:43:10) at Protocol.write (C:\Users\salvi\Desktop\discord bots\modbot-master\node_modules\mysql\lib\protocol\Protocol.js:38:16) at Socket.<anonymous> (C:\Users\salvi\Desktop\discord bots\modbot-master\node_modules\mysql\lib\Connection.js:88:28) at Socket.<anonymous> (C:\Users\salvi\Desktop\discord bots\modbot-master\node_modules\mysql\lib\Connection.js:526:10) at Socket.emit (events.js:315:20) at addChunk (internal/streams/readable.js:309:12) -------------------- at Protocol._enqueue (C:\Users\salvi\Desktop\discord bots\modbot-master\node_modules\mysql\lib\protocol\Protocol.js:144:48) at Connection.query (C:\Users\salvi\Desktop\discord bots\modbot-master\node_modules\mysql\lib\Connection.js:198:25) at C:\Users\salvi\Desktop\discord bots\modbot-master\src\Database.js:97:39 at processTicksAndRejections (internal/process/task_queues.js:93:5) { code: 'ER_BAD_FIELD_ERROR', errno: 1054, sqlMessage: "Unknown column 'guildid' in 'field list'", sqlState: '42S22', index: 0, sql: 'INSERT INTO
channels (config,id,guildid) VALUES (\'{\\"id\\":\\"744256496677945486\\",\\"lock\\":{\\"SEND_MESSAGES\\":null,\\"ADD_REACTIONS\\":null}}\',\'744256496677945486\',\'712196984496455690\')' }
The main bot seems unaffected
look, ive been looking for a discord bot that works with aternos for a few weeks and they all miss the point. i would love a discord bot that starts or ends your server thats it. With a sign up or someting like that thx
I dont udnerstand what you mean by start index.js file
do i use node . or npm start
my operating system is Fedora OS
Hello!
Would anyone be against rewriting this in TypeScript? I ask as I don't want to make a PR if the aternos team is not familiar with TS. I'm just looking for something to do.
This sounds confusing but if you invite modbot without the bot scope, it'll throw errors when viewing stuff like autoresponse list and adding autoresponses and other commands
Example invite: https://discord.com/oauth2/authorize?client_id=790967448111153153&scope=applications.commands&permissions=1099780074518
Obviously unless your trying to screw something up, this won't happen but i thought it'd be something to at least know of
It would be fine and best to implement slash commands currently or start for discord.js v13. Especially for moderation commands
Error?
Error: connect ECONNREFUSED 127.0.0.1:3306 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1146:16) -------------------- at Protocol._enqueue (C:\Users\CJ\OneDrive\Documents\GitHub\Bot\node_modules\mysql\lib\protocol\Protocol.js:144:48) at Protocol.handshake (C:\Users\CJ\OneDrive\Documents\GitHub\Bot\node_modules\mysql\lib\protocol\Protocol.js:51:23) at Connection.connect (C:\Users\super\OneDrive\Documents\GitHub\Bot\node_modules\mysql\lib\Connection.js:116:18) at new Database (C:\Users\CJ\OneDrive\Documents\GitHub\Bot\src\Database.js:21:14) at new Bot (C:\Users\CJ\OneDrive\Documents\GitHub\Bot\src\Bot.js:48:26) at Function.<static_initializer> (C:\Users\CJ\OneDrive\Documents\GitHub\Bot\src\Bot.js:11:23) at Object.<anonymous> (C:\Users\CJ\OneDrive\Documents\GitHub\Bot\src\Bot.js:8:22) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) { errno: -4078, code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 3306, fatal: true }
When editing a badword's type, the modal / popup that appears will not say "regex" and fill in /regex/flags, but will still show e.g. "Trigger" for when it was a text.
Creating the badword like this:
and then editing it while changing the type to e.g. regex, it will still show it like this
Also, creating a punishment without any punishment selected yields [object Object]
I don't know why I am getting this error,
`PS C:\Users\super\OneDrive\Documents\GitHub\AndroBot> node .
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module '../config.json'
Require stack:
I know this is a weird one but i cannot physically locate a help file
Im here to left my suggestion. Create a 'Say' command. Use it to talk through the bot. Ex: make an announce or talk important things.
!say (message) | !say (channelID) (message)
It would look neat if the commands were categorised in the help menu. It would make finding a command easier
I set my bot to use the prefix m at first and swapped to m! but it still responds to m not m!
My Code:
"db": {
"host": "localhost",
"user": "modbot",
"password": "",
"database": "modbot",
"charset": "utf8mb4",
"supportBigNumbers": true,
"bigNumberStrings": true
},
Error:
Error: connect ECONNREFUSED 127.0.0.1:3306
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
--------------------
at Protocol._enqueue (/home/pi/modbot/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Protocol.handshake (/home/pi/modbot/node_modules/mysql/lib/protocol/Protocol.js:51:23)
at Connection.connect (/home/pi/modbot/node_modules/mysql/lib/Connection.js:116:18)
at Database._connect (/home/pi/modbot/src/Database.js:42:16)
at new Database (/home/pi/modbot/src/Database.js:14:14)
at new Bot (/home/pi/modbot/src/Bot.js:36:26)
at Function.<static_fields_initializer> (/home/pi/modbot/src/Bot.js:9:23)
at Object. (/home/pi/modbot/src/Bot.js:6:17)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 3306,
fatal: true
}
pi@pi4:~/modbot $ node index.js
Error: connect ECONNREFUSED 127.0.0.1:3306
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
--------------------
at Protocol._enqueue (/home/pi/modbot/node_modules/mysql/lib/protocol/Protocol.js:144:48)
at Protocol.handshake (/home/pi/modbot/node_modules/mysql/lib/protocol/Protocol.js:51:23)
at Connection.connect (/home/pi/modbot/node_modules/mysql/lib/Connection.js:116:18)
at Database._connect (/home/pi/modbot/src/Database.js:42:16)
at new Database (/home/pi/modbot/src/Database.js:14:14)
at new Bot (/home/pi/modbot/src/Bot.js:36:26)
at Function.<static_fields_initializer> (/home/pi/modbot/src/Bot.js:9:23)
at Object. (/home/pi/modbot/src/Bot.js:6:17)
at Module._compile (internal/modules/cjs/loader.js:1068:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 3306,
fatal: true
}
In one of my tests of the new version i found this strange error that dosen't let the bot define the name const when executing moderation commands.
proof
the error dosen't seem to affect the official bot, i just wanted to warn you guys about this
The above problem was pretty much fixed in #256 but now everytime the commands !delmod (case ID) or the clearmods (user) are used, the bot hit the database ratelimit showing this error. proof (i cannot be sure if this error apply on the official bot too since you can view it only from the console).
do we need to set the google api key
When you use the deletecommad (cmd) without any input the bot will output an error instead of showing the usual hep menu. Using the command help deletemoderation work as intended tho.
proof.
sometime it say it crash when I had just done the server and start it so i need to remake a new everytime
so i will try to remeber my mods
i support ya aternos
I'd suggest adding ui
as alias to userinfo
It would be quite nice to add a Discord context menu on user, to see their history quickly and privately. This could be added alongside the slash commands, not many changes I think.
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.