the-programmers-hangout / chronos Goto Github PK
View Code? Open in Web Editor NEWA discord bot for automating slowmode
License: MIT License
A discord bot for automating slowmode
License: MIT License
A lot of commands will be saving config to a flat json file. We need some kind of config system to make that all possible.
things that will be saved in there are: current slowmode per channel, current prefix.
Attention should be taken here to assure that if needed the config can be multi guild. I suggest a json file with this format to start with, extra fields may be needed in the future
"botOwner": 345541952500006912,
"guildConfigurations": [
{
"guildID": 699595207720566824,
"logChannel": 735931902359502888,
"prefix": "+",
"staffRole": "staff_role_name",
"slowmodeChannels": [
"735931902359502888": 1800,
"757602062241497189": 2400
]
}
]
}
undefined
or the guild config object depending on whether it's present or not.src/utilities/
folder.Commands like setStaffRole
, setLogChannel
, setThreshold
and setPrefix
. Would be stored in a JSON file.
See #7
This should take into account the config for slowmode thresholds in the config and use a timer, or perhaps a clever implementation using some kind of EvictingQueue and looking at the messages creation date
process.env.OWNERID
with the botOwner
that is in the config file.botOwner
instead of the current BotOwner
because we need to stick to camelCase
.message.member.permissions.has('ADMINISTRATOR')
or bot owner this.client.isOwner(message.author)
if there are no stored configs for the guild.true
it'll block the command from being run (inhibit
it).something like ++slowmode #hangout 10m
mentionListener
would break. ( Hint - changing this line would fix it โ )BotOwner
is in the title case. But, we are using camelCase
rename all instances of it.config.json
file is messed up. Needs fixing.Some kind of enforced style for the entire codebase
the bot prefix is saved in the config but it is hardcoded in the index.js file as "+"
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.